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

Method load

src/OpenLoco/src/Objects/HillShapesObject.cpp:20–36  ·  view source on GitHub ↗

0x00463B70

Source from the content-addressed store, hash-verified

18
19 // 0x00463B70
20 void HillShapesObject::load(const LoadedObjectHandle& handle, std::span<const std::byte> data, ObjectManager::DependentObjects*)
21 {
22 auto remainingData = data.subspan(sizeof(HillShapesObject));
23
24 // Load object name string
25 auto strRes = ObjectManager::loadStringTable(remainingData, handle, 0);
26 name = strRes.str;
27 remainingData = remainingData.subspan(strRes.tableLength);
28
29 // Load images
30 auto imageRes = ObjectManager::loadImageTable(remainingData);
31 image = imageRes.imageOffset;
32 imageHills = imageRes.imageOffset + this->hillHeightMapCount;
33
34 // Ensure we've loaded the entire object
35 assert(remainingData.size() == imageRes.tableLength);
36 }
37
38 // 0x00463B9F
39 void HillShapesObject::unload()

Callers

nothing calls this directly

Calls 3

loadStringTableFunction · 0.85
loadImageTableFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected