//
// GJGameState::controlTweenAction from 0x14030b370 to 0x14030b3ff (143 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::controlTriggersWithControlID @ 0x140326192
// > ??> @ 0x14091e734
//
// This function is hookable on this platform (idp: pc, 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:30:11 +0000
//
__int64 __fastcall GJGameState::controlTweenAction(__int64 a1, int a2, int a3, int a4)
{
__int64 *v4; // r10
__int64 result; // rax
char v10; // [rsp+30h] [rbp+8h] BYREF
v4 = *(__int64 **)(a1 + 648);
result = *v4;
if ( (__int64 *)*v4 != v4 )
{
do
{
if ( a3 == -1 )
{
if ( *(_DWORD *)(result + 52) == a2 )
{
LABEL_6:
if ( a4 )
{
if ( a4 == 1 )
{
*(_BYTE *)(result + 49) = 1;
}
else if ( a4 == 2 )
{
*(_BYTE *)(result + 49) = 0;
}
}
else
{
result = sub_1403535F0(a1 + 640, &v10, result);
}
}
}
else if ( *(_DWORD *)(result + 56) == a3 )
{
goto LABEL_6;
}
result = *(_QWORD *)result;
}
while ( result != *(_QWORD *)(a1 + 648) );
}
return result;
}