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

Function countperfectmips

source/src/world.cpp:808–818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

806COMMANDN(recalc, calclight, "");
807
808void countperfectmips(int mip, int xx, int yy, int bs, int *stats)
809{
810 int mfactor = sfactor - mip;
811 if(!bs) bs = 1 << mfactor;
812 for(int y = yy; y < yy + bs; y++) for(int x = xx; x < xx + bs; x++)
813 {
814 sqr *r = SWS(wmip[mip], x, y, mfactor);
815 if(r->defer && mip > 0) countperfectmips(mip - 1, x * 2, y * 2, 2, stats);
816 else stats[mip]++;
817 }
818}
819
820COMMANDF(calcmipstats, "", ()
821{

Callers 2

world.cppFile · 0.85
mapmrproperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected