MCPcopy Create free account
hub / github.com/assaultcube/AC / loopirev

Function loopirev

source/src/worldlight.cpp:134–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132void postlightarealine(sqr *s, int len)
133{
134 loopirev(len)
135 {
136 #define median(m) s->m = (s->m*2 + SW(s,1,0)->m*2 + SW(s,0,1)->m*2 \
137 + SW(s,-1,0)->m*2 + SW(s,0,-1)->m*2 \
138 + SW(s,1,1)->m + SW(s,1,-1)->m \
139 + SW(s,-1,1)->m + SW(s,-1,-1)->m)/14; // median is 4/2/1 instead
140 median(r);
141 median(g);
142 median(b);
143 s += 2;
144 }
145}
146
147void postlightarea(const block &a) // median filter, smooths out random noise in light and makes it more mipable

Callers 3

blockcopyFunction · 0.70
blocktexusageFunction · 0.70
blockpasteFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected