sets up the free list & init player & whatever else
| 1413 | |
| 1414 | // sets up the free list & init player & whatever else |
| 1415 | void InitObjects() { |
| 1416 | int i; |
| 1417 | |
| 1418 | // Initialize the collision system |
| 1419 | CollideInit(); |
| 1420 | |
| 1421 | // Mark all the objects as unused |
| 1422 | ResetObjectList(); |
| 1423 | |
| 1424 | // Make sure no rooms are using any objects |
| 1425 | for (i = 0; i < MAX_ROOMS; i++) { |
| 1426 | Rooms[i].objects = -1; |
| 1427 | Rooms[i].vis_effects = -1; |
| 1428 | } |
| 1429 | |
| 1430 | InitVisEffects(); |
| 1431 | |
| 1432 | atexit(FreeAllObjects); |
| 1433 | } |
| 1434 | |
| 1435 | // link the object into the list for its room |
| 1436 | void ObjLink(int objnum, int roomnum) { |
no test coverage detected