MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / Load

Method Load

src/openrct2/object/TerrainSurfaceObject.cpp:23–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21namespace OpenRCT2
22{
23 void TerrainSurfaceObject::Load()
24 {
25 GetStringTable().Sort();
26 NameStringId = LanguageAllocateObjectString(GetName());
27 IconImageId = LoadImages();
28 if (Flags.hasAny(TerrainSurfaceFlag::smoothWithSelf, TerrainSurfaceFlag::smoothWithOther))
29 {
30 PatternBaseImageId = IconImageId + 1;
31 EntryBaseImageId = PatternBaseImageId + 6;
32 }
33 else
34 {
35 EntryBaseImageId = IconImageId + 1;
36 }
37 NumEntries = (GetImageTable().GetCount() - EntryBaseImageId) / kNumImagesInEntry;
38 }
39
40 void TerrainSurfaceObject::Unload()
41 {

Callers

nothing calls this directly

Calls 5

hasAnyMethod · 0.80
GetNameFunction · 0.50
SortMethod · 0.45
GetCountMethod · 0.45

Tested by

no test coverage detected