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

Function update

src/OpenLoco/src/Map/TileManager.cpp:997–1032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

995 }
996
997 static bool update(TileElement& el, const World::Pos2& loc)
998 {
999 switch (el.type())
1000 {
1001 case ElementType::surface:
1002 {
1003 auto& elSurface = el.get<SurfaceElement>();
1004 return updateSurface(elSurface, loc);
1005 }
1006 case ElementType::building:
1007 {
1008 auto& elBuilding = el.get<BuildingElement>();
1009 return elBuilding.update(loc);
1010 }
1011 case ElementType::tree:
1012 {
1013 auto& elTree = el.get<TreeElement>();
1014 return updateTreeElement(elTree, loc);
1015 }
1016 case ElementType::road:
1017 {
1018 auto& elRoad = el.get<RoadElement>();
1019 return elRoad.update(loc);
1020 }
1021 case ElementType::industry:
1022 {
1023 auto& elIndustry = el.get<IndustryElement>();
1024 return elIndustry.update(loc);
1025 }
1026 case ElementType::track: break;
1027 case ElementType::station: break;
1028 case ElementType::signal: break;
1029 case ElementType::wall: break;
1030 }
1031 return true;
1032 }
1033
1034 // 0x00463ABA
1035 void update()

Callers

nothing calls this directly

Calls 11

updateSurfaceFunction · 0.85
updateTreeElementFunction · 0.85
setUpdatingCompanyIdFunction · 0.85
toTileSpaceFunction · 0.85
toWorldSpaceFunction · 0.85
updateProducedCargoStatsFunction · 0.85
typeMethod · 0.80
getFunction · 0.70
hasFlagsFunction · 0.50
updateMethod · 0.45
isGhostMethod · 0.45

Tested by

no test coverage detected