//
// GameObject::getRelativeSpriteColor from 0x1002ff050 to 0x1002ff0c0 (112 bytes)
//
// 21 xrefs:
// > sub_100057C10 @ 0x100057c30
// > sub_100057C10 @ 0x100057c48
// > sub_100057C10 @ 0x100057ca4
// > sub_100057C10 @ 0x100057cc4
// > CustomizeObjectLayer::getActiveMode @ 0x1000588c0
// > CustomizeObjectLayer::getActiveMode @ 0x10005890c
// > CustomizeObjectLayer::updateSelected @ 0x100058d40
// > CustomizeObjectLayer::updateSelected @ 0x100058d9c
// > CustomizeObjectLayer::hsvPopupClosed @ 0x100059018
// > CustomizeObjectLayer::hsvPopupClosed @ 0x100059048
// > ConfigureHSVWidget::getHSV @ 0x100125298
// > sub_100234C04 @ 0x100234c24
// > sub_100234C04 @ 0x100234c3c
// > sub_100234C04 @ 0x100234c84
// > sub_100234C04 @ 0x100234ca4
// > HSVLiveOverlay::hsvChanged @ 0x100234fac
// > GameObject::setupCustomSprites @ 0x100362e3c
// > EditorUI::updateObjectInfoLabel @ 0x1004756e8
// > EditorUI::updateObjectInfoLabel @ 0x100475724
// > EditorUI::updateObjectInfoLabel @ 0x100475820
// > EditorUI::updateObjectInfoLabel @ 0x10047586c
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:03:04 +0000
//
__int64 __fastcall GameObject::getRelativeSpriteColor(__int64 a1, int a2)
{
int v2; // w8
__int64 v3; // x8
int v5; // w8
bool v6; // zf
if ( *(_WORD *)(a1 + 1040) == 1 || !*(_WORD *)(a1 + 1040) && (*(_BYTE *)(a1 + 1292) & 1) != 0 || *(_QWORD *)(a1 + 888) )
{
v2 = 0;
}
else
{
v5 = *(_DWORD *)(*(_QWORD *)(a1 + 1096) + 4LL);
v6 = v5 == 1004 || v5 == 0;
v2 = !v6;
}
if ( a2 == 2 )
{
v6 = v2 == 0;
v3 = 1104;
if ( !v6 )
v3 = 1096;
}
else
{
if ( (v2 & 1) != 0 )
return 0;
v3 = 1096;
}
return *(_QWORD *)(a1 + v3);
}