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

Function AllocRoomChange

Descent3/room.cpp:1276–1287  ·  view source on GitHub ↗

Returns index of room change allocatd, else -1 on error

Source from the content-addressed store, hash-verified

1274
1275// Returns index of room change allocatd, else -1 on error
1276int AllocRoomChange() {
1277 for (int i = 0; i < MAX_ROOM_CHANGES; i++) {
1278 if (Room_changes[i].used == 0) {
1279 memset(&Room_changes[i], 0, sizeof(room_changes));
1280 Room_changes[i].used = 1;
1281 return i;
1282 }
1283 }
1284
1285 Int3(); // Couldn't allocate room change!
1286 return -1;
1287}
1288
1289// Does whatever fading/changing of room stuff that needs to be done this frame
1290void DoRoomChangeFrame() {

Callers 1

SetRoomChangeOverTimeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected