MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / unload

Function unload

src/OpenLoco/src/Objects/ObjectManager.cpp:589–599  ·  view source on GitHub ↗

0x00471FF8

Source from the content-addressed store, hash-verified

587
588 // 0x00471FF8
589 void unload(const ObjectHeader& header)
590 {
591 auto handle = findObjectHandle(header);
592 if (!handle)
593 {
594 return;
595 }
596 unload(*handle);
597 free(_objectRepository[enumValue(handle->type)].objects[handle->id]);
598 _objectRepository[enumValue(handle->type)].objects[handle->id] = reinterpret_cast<Object*>(-1);
599 }
600
601 // 0x00471BCE
602 bool load(const ObjectHeader& header)

Callers 11

aiDestroyFunction · 0.85
drawFunction · 0.85
currencyDropdownFunction · 0.85
importSaveToGameStateFunction · 0.85
loadScenarioProgressFunction · 0.85
writePackedObjectsFunction · 0.85
unloadAllFunction · 0.85
changeCompanyFaceFunction · 0.85

Calls 4

findObjectHandleFunction · 0.85
enumValueFunction · 0.85
getAnyFunction · 0.85
callObjectUnloadFunction · 0.85

Tested by

no test coverage detected