//
// GJBaseGameLayer::getMoveTargetDelta from 0x9a3200 to 0x9a3344 (324 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::triggerMoveCommand @ 0x9be258
// > ??> @ 0x8fe18
//
// 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 12:58:08 +0000
//
cocos2d::CCPoint *__usercall GJBaseGameLayer::getMoveTargetDelta@(
cocos2d::CCDictionary **this@,
EffectGameObject *a2@,
unsigned __int8 a3@,
cocos2d::CCPoint *a4@)
{
int v6; // w1
int v8; // w24
_DWORD *MainObject; // x22
_DWORD *Object; // x0
long double v12; // q0
int v13; // w1
__int64 v14; // [xsp+58h] [xbp+58h] BYREF
__int64 v15; // [xsp+60h] [xbp+60h] BYREF
v6 = *((_DWORD *)a2 + 382);
v8 = a3;
if ( v6 <= 0 )
v6 = *((_DWORD *)a2 + 366);
if ( a3 )
MainObject = (_DWORD *)GJBaseGameLayer::tryGetMainObject(this, v6);
else
MainObject = (_DWORD *)GJBaseGameLayer::tryGetObject(this, v6);
if ( *((_BYTE *)a2 + 1684) )
{
LABEL_8:
Object = *(this + 407);
goto LABEL_9;
}
if ( *((_BYTE *)a2 + 1685) )
{
if ( *((_BYTE *)this + 1010) )
{
Object = *(this + 408);
goto LABEL_9;
}
goto LABEL_8;
}
v13 = *((_DWORD *)a2 + 367);
if ( v8 )
Object = (_DWORD *)GJBaseGameLayer::tryGetMainObject(this, v13);
else
Object = (_DWORD *)GJBaseGameLayer::tryGetObject(this, v13);
LABEL_9:
if ( Object && MainObject && MainObject[229] != Object[229] )
{
(*(void (__fastcall **)(__int64 *__return_ptr))(*(_QWORD *)Object + 1360LL))(&v14);
(*(void (__fastcall **)(__int64 *__return_ptr, _DWORD *))(*(_QWORD *)MainObject + 1360LL))(&v15, MainObject);
cocos2d::CCPoint::operator-(a4, &v14, &v15, v12);
}
else
{
cocos2d::CCPoint::CCPoint(a4, (const cocos2d::CCPoint *)&unk_155D2C8);
}
return a4;
}