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

Function paintExhaustEntity

src/OpenLoco/src/Paint/PaintEffectEntity.cpp:53–73  ·  view source on GitHub ↗

0x00440331

Source from the content-addressed store, hash-verified

51
52 // 0x00440331
53 static void paintExhaustEntity(PaintSession& session, Exhaust* exhaustEntity)
54 {
55 const Gfx::RenderTarget* rt = session.getRenderTarget();
56 if (rt->zoomLevel > 1)
57 {
58 return;
59 }
60 const auto* steamObject = exhaustEntity->getObject();
61
62 const auto& frameInfo = steamObject->getFramesInfo(exhaustEntity->isSubObjType1());
63 const auto imageId = ImageId{ frameInfo.second[exhaustEntity->frameNum].imageOffset + steamObject->baseImageId + steamObject->var_0A };
64
65 if (!steamObject->hasFlags(SteamObjectFlags::unk3))
66 {
67 session.addToPlotListAsParent(imageId, { 0, 0, exhaustEntity->position.z }, { 1, 1, 0 });
68 }
69 else
70 {
71 session.addToPlotListAsParent(imageId, { 0, 0, exhaustEntity->position.z }, { -12, -12, exhaustEntity->position.z }, { 24, 24, 0 });
72 }
73 }
74
75 // 0x004403C5
76 static void paintRedGreenCurrencyEntity(PaintSession& session, MoneyEffect* moneyEffect)

Callers 1

paintEffectEntityFunction · 0.85

Calls 6

getRenderTargetMethod · 0.80
getFramesInfoMethod · 0.80
isSubObjType1Method · 0.80
addToPlotListAsParentMethod · 0.80
getObjectMethod · 0.45
hasFlagsMethod · 0.45

Tested by

no test coverage detected