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

Function loopv

source/src/rendertext.cpp:145–155  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143 igraph *ig = NULL;
144 glColor4ub(255, 255, 255, 255);
145 loopv(igraphbatch)
146 {
147 if(last != igraphbatch[i].key) ig = getusedigraph((last = igraphbatch[i].key)), ishc = last > 0 && last < 10 ? 1 : 0;
148 if(ig && ig->tex)
149 {
150 int &x = igraphbatch[i].val1, &y = igraphbatch[i].val2, fpos = ((totalmillis + x * x + VIRTW * y) % ig->frames.last() + ig->frames.last()) % ig->frames.last(), frame = 0;
151 float fw = min(1.0f, float(ig->tex->ys) / ig->tex->xs);
152 if(igraphanimate) loopvj(ig->frames) if(ig->frames[j] < fpos) frame++;
153 quad(ig->tex->id, x + offs[ishc], y + offs[ishc], w[ishc], (frame % max(1, ig->tex->xs / ig->tex->ys)) * fw, 0, fw, 1);
154 }
155 }
156}
157
158//stack[sp] is current color index

Callers 1

addigraphFunction · 0.70

Calls 5

getusedigraphFunction · 0.85
minFunction · 0.85
quadFunction · 0.85
maxFunction · 0.85
loopvjFunction · 0.70

Tested by

no test coverage detected