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

Function isSpriteInteractedWith

src/OpenLoco/src/Paint/Paint.cpp:1215–1227  ·  view source on GitHub ↗

0x00447A0E

Source from the content-addressed store, hash-verified

1213
1214 // 0x00447A0E
1215 static bool isSpriteInteractedWith(const Gfx::RenderTarget* rt, ImageId imageId, const Ui::Point& coords)
1216 {
1217 auto paletteMap = Gfx::PaletteMap::getDefault();
1218 if (imageId.hasPrimary())
1219 {
1220 ExtColour index = imageId.hasSecondary() ? static_cast<ExtColour>(imageId.getPrimary()) : imageId.getRemap();
1221 if (auto pm = Gfx::PaletteMap::getForColour(index))
1222 {
1223 paletteMap = *pm;
1224 }
1225 }
1226 return isSpriteInteractedWithPaletteSet(rt, imageId, coords, paletteMap);
1227 }
1228
1229 // 0x0045EDFC
1230 static bool isPSSpriteTypeInFilter(const InteractionItem spriteType, InteractionItemFlags filter)

Callers 2

Calls 7

getDefaultFunction · 0.85
getForColourFunction · 0.85
hasPrimaryMethod · 0.80
hasSecondaryMethod · 0.80
getPrimaryMethod · 0.80
getRemapMethod · 0.80

Tested by

no test coverage detected