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

Function getWallImageId

src/OpenLoco/src/Paint/PaintWall.cpp:86–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84 }
85
86 static ImageId getWallImageId(ImageIndex imageIndex, bool isGhost, const World::WallElement& elWall, const WallObject* wallObject)
87 {
88 if (isGhost)
89 {
90 return Gfx::applyGhostToImage(imageIndex);
91 }
92
93 ImageId imageId{ imageIndex };
94
95 if ((wallObject->flags & WallObjectFlags::hasPrimaryColour) != WallObjectFlags::none)
96 {
97 imageId = imageId.withPrimary(elWall.getPrimaryColour());
98 }
99
100 if ((wallObject->flags & WallObjectFlags::hasSecondaryColour) != WallObjectFlags::none)
101 {
102 imageId = imageId.withSecondary(elWall.getSecondaryColour());
103 }
104
105 return imageId;
106 }
107
108 // 0x004C3D7C
109 void paintWall(PaintSession& session, const World::WallElement& elWall)

Callers 1

paintWallFunction · 0.85

Calls 5

applyGhostToImageFunction · 0.85
withPrimaryMethod · 0.80
getPrimaryColourMethod · 0.80
withSecondaryMethod · 0.80
getSecondaryColourMethod · 0.80

Tested by

no test coverage detected