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

Function createAnimation

src/OpenLoco/src/Map/AnimationManager.cpp:27–47  ·  view source on GitHub ↗

0x004612A6

Source from the content-addressed store, hash-verified

25
26 // 0x004612A6
27 void createAnimation(uint8_t type, const Pos2& pos, tile_coord_t baseZ)
28 {
29 if (numAnimations() >= Limits::kMaxAnimations)
30 {
31 return;
32 }
33
34 for (size_t i = 0; i < numAnimations(); i++)
35 {
36 auto& animation = rawAnimations()[i];
37 if (animation.type == type && animation.pos == pos && animation.baseZ == baseZ)
38 {
39 return;
40 }
41 }
42
43 auto& newAnimation = rawAnimations()[numAnimations()++];
44 newAnimation.baseZ = baseZ;
45 newAnimation.type = type;
46 newAnimation.pos = pos;
47 }
48
49 // 0x00461166
50 void reset()

Callers 10

createMapAnimationsMethod · 0.85
updateMethod · 0.85
updateMethod · 0.85
leaveLevelCrossingFunction · 0.85
setSignalStateFunction · 0.85
createBuildingFunction · 0.85
createBuildingFunction · 0.85
createSignalFunction · 0.85
placeIndustryBuildingFunction · 0.85
createBuildingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected