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

Function reloadAll

src/OpenLoco/src/Objects/ObjectManager.cpp:359–374  ·  view source on GitHub ↗

0x0047237D

Source from the content-addressed store, hash-verified

357
358 // 0x0047237D
359 void reloadAll()
360 {
361 Core::Timer reloadTimer;
362 size_t loadedObjects{};
363
364 setTotalNumImages(Gfx::G1ExpectedCount::kDisc + Gfx::G1ExpectedCount::kTemporaryObjects);
365
366 forEachLoadedObject([&loadedObjects](const LoadedObjectHandle& handle) {
367 auto* obj = getAny(handle);
368 auto& extHdr = getRepositoryItem(handle.type).objectEntryExtendeds[handle.id];
369 callObjectLoad(handle, *obj, std::span<const std::byte>(reinterpret_cast<std::byte*>(obj), extHdr.dataSize));
370 loadedObjects++;
371 });
372
373 Logging::verbose("Loaded {} objects in {} milliseconds.", loadedObjects, reloadTimer.elapsed());
374 }
375
376 // 0x00472754
377 static uint32_t computeChecksum(std::span<const std::byte> data, uint32_t seed)

Callers 15

initFunction · 0.85
startFunction · 0.85
aiDestroyFunction · 0.85
drawFunction · 0.85
onCloseFunction · 0.85
languageDropdownFunction · 0.85
currencyDropdownFunction · 0.85
exportGameStateToFileFunction · 0.85
importSaveToGameStateFunction · 0.85
loadPreferredCurrencyFunction · 0.85
createIndexFunction · 0.85

Calls 6

setTotalNumImagesFunction · 0.85
forEachLoadedObjectFunction · 0.85
getAnyFunction · 0.85
callObjectLoadFunction · 0.85
verboseFunction · 0.85
elapsedMethod · 0.80

Tested by

no test coverage detected