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

Function getAttachedInteractionInfo

src/OpenLoco/src/Paint/Paint.cpp:1273–1287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1271 }
1272
1273 static std::optional<InteractionArg> getAttachedInteractionInfo(const Gfx::RenderTarget& rt, const InteractionItemFlags flags, const PaintStruct& ps)
1274 {
1275 std::optional<InteractionArg> info = std::nullopt;
1276 for (auto* attachedPS = ps.attachedPS; attachedPS != nullptr; attachedPS = attachedPS->next)
1277 {
1278 if (isSpriteInteractedWith(&rt, attachedPS->imageId, attachedPS->vpPos + ps.vpPos))
1279 {
1280 if (isPSSpriteTypeInFilter(ps.type, flags))
1281 {
1282 info = { ps };
1283 }
1284 }
1285 }
1286 return info;
1287 }
1288
1289 // 0x0045ED91
1290 [[nodiscard]] InteractionArg PaintSession::getNormalInteractionInfo(const InteractionItemFlags flags) const

Callers 1

Calls 2

isSpriteInteractedWithFunction · 0.85
isPSSpriteTypeInFilterFunction · 0.85

Tested by

no test coverage detected