//
// GJBaseGameLayer::getMoveTargetDelta from 0x5926f4 to 0x5927b8 (196 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::triggerMoveCommand @ 0x5a2222
//
// 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:06 +0000
//
GJBaseGameLayer *__fastcall GJBaseGameLayer::getMoveTargetDelta(
GJBaseGameLayer *this,
cocos2d::CCDictionary **a2,
int a3,
int a4)
{
int v6; // r1
int MainObject; // r0
_DWORD *v10; // r7
cocos2d::CCDictionary *v11; // r1
int v12; // r1
int Object; // r0
_BYTE v15[8]; // [sp+4h] [bp-18h] BYREF
_BYTE v16[8]; // [sp+Ch] [bp-10h] BYREF
v6 = *(_DWORD *)(a3 + 1348);
if ( v6 <= 0 )
v6 = *(_DWORD *)(a3 + 1284);
if ( a4 )
MainObject = GJBaseGameLayer::tryGetMainObject(a2, v6);
else
MainObject = GJBaseGameLayer::tryGetObject(a2, v6);
v10 = (_DWORD *)MainObject;
if ( *(_BYTE *)(a3 + 1504) )
goto LABEL_9;
if ( !*(_BYTE *)(a3 + 1505) )
{
v12 = *(_DWORD *)(a3 + 1288);
if ( a4 )
Object = GJBaseGameLayer::tryGetMainObject(a2, v12);
else
Object = GJBaseGameLayer::tryGetObject(a2, v12);
v11 = (cocos2d::CCDictionary *)Object;
goto LABEL_15;
}
if ( *((_BYTE *)a2 + 866) )
v11 = a2[520];
else
LABEL_9:
v11 = a2[519];
LABEL_15:
if ( v10 && v11 && v10[195] != *((_DWORD *)v11 + 195) )
{
(*(void (__fastcall **)(_BYTE *))(*(_DWORD *)v11 + 680))(v15);
(*(void (__fastcall **)(_BYTE *, _DWORD *))(*v10 + 680))(v16, v10);
cocos2d::CCPoint::operator-(this, v15, v16);
}
else
{
cocos2d::CCPoint::CCPoint(this, (const cocos2d::CCPoint *)&unk_D2C400);
}
return this;
}