Returns index of room change allocatd, else -1 on error
| 1274 | |
| 1275 | // Returns index of room change allocatd, else -1 on error |
| 1276 | int 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 |
| 1290 | void DoRoomChangeFrame() { |
no outgoing calls
no test coverage detected