sources » TacticalClass » ClearDirtyAreas
// a DirtyArea is used ingame to track rectangles on the visible map that need redrawing due to rubble and stuff
// this func is used only when initializing a scenario, and generating a random map
static void TacticalClass::ClearDirtyAreas() {
int len = vec_DirtyAreas.Length;
while(len) {
--len;
vec_DirtyAreas.Length = len;
if(len <= 0) {
break;
}
for(int idx = 0; idx < len; ++idx) {
// this copies one DirtyArea from position x to position x - 1
memcpy(&vec_DirtyAreas[idx], &vec_DirtyAreas[idx + 1], sizeof(DirtyArea));
}
}
}