MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / ClearAllObjectLightmaps

Function ClearAllObjectLightmaps

Descent3/object_lighting.cpp:500–513  ·  view source on GitHub ↗

Frees all the memory associated with lightmap objects

Source from the content-addressed store, hash-verified

498
499// Frees all the memory associated with lightmap objects
500void ClearAllObjectLightmaps(int terrain) {
501 int i;
502
503 for (i = 0; i <= Highest_object_index; i++) {
504 object *obj = &Objects[i];
505
506 if ((OBJECT_OUTSIDE(obj) != 0) != (terrain != 0))
507 continue;
508
509 if (obj->lm_object.used == 1) {
510 ClearObjectLightmaps(obj);
511 }
512 }
513}
514
515// Sets up the memory to be used by an object for lightmaps
516void SetupObjectLightmapMemory(object *obj) {

Callers 3

OnClearLightmapsMethod · 0.85
DoRadiosityForRoomsFunction · 0.85
DoRadiosityForTerrainFunction · 0.85

Calls 1

ClearObjectLightmapsFunction · 0.85

Tested by

no test coverage detected