//
// GJBaseGameLayer::controlAdvancedFollowCommand from 0x100114210 to 0x100114306 (246 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::controlTriggersWithControlID @ 0x100114954
//
// 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 12:24:33 +0000
//
__int64 __fastcall GJBaseGameLayer::controlAdvancedFollowCommand(__int64 a1, __int64 a2, int a3, int a4)
{
__int64 result; // rax
__int64 v5; // rdi
result = *(_QWORD *)(a1 + 1648);
v5 = *(_QWORD *)(a1 + 1656);
if ( result != v5 )
{
if ( a3 == -1 )
{
if ( a4 )
{
if ( a4 == 1 )
{
do
{
if ( *(_QWORD *)result == a2 )
*(_WORD *)(result + 28) = 257;
result += 32;
}
while ( result != v5 );
}
else if ( a4 == 2 )
{
do
{
if ( *(_QWORD *)result == a2 )
*(_WORD *)(result + 28) = 0;
result += 32;
}
while ( result != v5 );
}
}
else
{
do
{
if ( *(_QWORD *)result == a2 )
{
*(_WORD *)(result + 28) = 0;
*(_BYTE *)(result + 30) = 1;
}
result += 32;
}
while ( result != v5 );
}
}
else if ( a4 )
{
if ( a4 == 1 )
{
do
{
if ( *(_DWORD *)(result + 16) == a3 )
*(_WORD *)(result + 28) = 257;
result += 32;
}
while ( result != v5 );
}
else if ( a4 == 2 )
{
do
{
if ( *(_DWORD *)(result + 16) == a3 )
*(_WORD *)(result + 28) = 0;
result += 32;
}
while ( result != v5 );
}
}
else
{
do
{
if ( *(_DWORD *)(result + 16) == a3 )
{
*(_WORD *)(result + 28) = 0;
*(_BYTE *)(result + 30) = 1;
}
result += 32;
}
while ( result != v5 );
}
}
return result;
}