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

Function ResetObjectList

Descent3/object.cpp:1395–1412  ·  view source on GitHub ↗

Resets the object list: sets all objects to unused, intializes handles, & sets roomnums to -1 Called by the editor to init a new level.

Source from the content-addressed store, hash-verified

1393// Resets the object list: sets all objects to unused, intializes handles, & sets roomnums to -1
1394// Called by the editor to init a new level.
1395void ResetObjectList() {
1396 int i;
1397
1398 // Init data for each object
1399 for (i = 0; i < MAX_OBJECTS; i++) {
1400 Objects[i].handle = i;
1401 Objects[i].type = OBJ_NONE;
1402 Objects[i].roomnum = -1;
1403 }
1404
1405 // Build the free object list
1406 ResetFreeObjects();
1407
1408 // Say no big objects
1409 InitBigObjects();
1410
1411 ObjResetPositionHistory();
1412}
1413
1414// sets up the free list & init player & whatever else
1415void InitObjects() {

Callers 3

CreateNewMineFunction · 0.85
LoadLevelFunction · 0.85
InitObjectsFunction · 0.85

Calls 3

ResetFreeObjectsFunction · 0.85
InitBigObjectsFunction · 0.85
ObjResetPositionHistoryFunction · 0.85

Tested by

no test coverage detected