//
// GameObject::getParentMode from 0x1002f943c to 0x1002f94a0 (100 bytes)
//
// 6 xrefs:
// > SetGroupIDLayer::init @ 0x10003f97c
// > SetGroupIDLayer::init @ 0x10003f9cc
// > sub_1002F352C @ 0x1002f3654
// > GameObject::claimParticle @ 0x1002f9014
// > GameObject::addMainSpriteToParent @ 0x1002f9fb4
// > GameObject::playDestroyObjectAnim @ 0x1003e86f0
//
// 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:01 +0000
//
__int64 __fastcall GameObject::getParentMode(__int64 a1)
{
unsigned int v1; // w8
v1 = *(unsigned __int16 *)(a1 + 1018);
if ( v1 == 0xFFFF )
{
if ( (*(_BYTE *)(a1 + 772) & 1) != 0 )
{
LOWORD(v1) = 4;
}
else if ( (*(_BYTE *)(a1 + 1052) & 1) != 0 )
{
LOWORD(v1) = 1;
}
else
{
v1 = *(_DWORD *)(a1 + 1028) - 142;
if ( v1 >> 1 > 0x896 )
LOWORD(v1) = 0;
else
LOWORD(v1) = word_100769462[v1];
}
*(_WORD *)(a1 + 1018) = v1;
}
return (unsigned int)(__int16)v1;
}