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

Function ClearRoomLightmaps

Descent3/room.cpp:863–875  ·  view source on GitHub ↗

Clears lightmaps for a single room

Source from the content-addressed store, hash-verified

861
862// Clears lightmaps for a single room
863void ClearRoomLightmaps(int roomnum) {
864 int t;
865
866 ASSERT(Rooms[roomnum].used);
867
868 for (t = 0; t < Rooms[roomnum].num_faces; t++) {
869 if (Rooms[roomnum].faces[t].lmi_handle != BAD_LMI_INDEX) {
870 FreeLightmapInfo(Rooms[roomnum].faces[t].lmi_handle);
871 Rooms[roomnum].faces[t].lmi_handle = BAD_LMI_INDEX;
872 Rooms[roomnum].faces[t].flags &= ~FF_LIGHTMAP;
873 }
874 }
875}
876
877// Removes all room lightmaps from memory and sets indoor faces accordingly
878// External=1 means to perform the operation on external rooms only, 0 means indoor rooms only

Callers 2

ClearAllRoomLightmapsFunction · 0.85

Calls 1

FreeLightmapInfoFunction · 0.85

Tested by

no test coverage detected