//
// GJGameState::controlTweenAction from 0x59ce7a to 0x59cec8 (78 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::controlTriggersWithControlID @ 0x5a1af0
// > GJBaseGameLayer::controlTriggersInGroup @ 0x5b1e68
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:13 +0000
//
int __fastcall GJGameState::controlTweenAction(int result, int a2, int a3, int a4)
{
int v5; // r1
_DWORD *v6; // r5
bool v9; // zf
v5 = *(_DWORD *)(result + 552);
v6 = (_DWORD *)(result + 544);
while ( v5 )
{
if ( a3 == -1 )
v9 = *(_DWORD *)(v5 + 44) == a2;
else
v9 = *(_DWORD *)(v5 + 48) == a3;
if ( v9 )
{
if ( a4 )
{
if ( a4 == 1 )
{
*(_BYTE *)(v5 + 41) = 1;
}
else if ( a4 == 2 )
{
*(_BYTE *)(v5 + 41) = 0;
}
goto LABEL_14;
}
result = std::__hash_table,std::__unordered_map_hasher,std::hash,true>,std::__unordered_map_equal,std::equal_to,true>,std::allocator>>::erase(
v6,
(_DWORD *)v5);
v5 = result;
}
else
{
LABEL_14:
v5 = *(_DWORD *)v5;
}
}
return result;
}