//
// GJBaseGameLayer::getMoveTargetDelta from 0x472c50 to 0x472d14 (196 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::triggerMoveCommand @ 0x481b1e
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
cocos2d::CCPoint *GJBaseGameLayer::getMoveTargetDelta(
cocos2d::CCPoint *__return_ptr retstr,
GJBaseGameLayer *a2,
EffectGameObject *a3,
bool a4)
{
_BOOL4 v5; // r9
int m_targetModCenterID; // r1
GameObject *MainObject; // r0
_DWORD *v10; // r7
PlayerObject *m_player2; // r1
int m_centerGroupID; // r1
GameObject *Object; // r0
_BYTE v15[8]; // [sp+4h] [bp-18h] BYREF
_BYTE v16[8]; // [sp+Ch] [bp-10h] BYREF
v5 = a4;
m_targetModCenterID = a3->m_targetModCenterID;
if ( m_targetModCenterID <= 0 )
m_targetModCenterID = a3->m_targetGroupID;
if ( a4 )
MainObject = GJBaseGameLayer::tryGetMainObject(a2, m_targetModCenterID);
else
MainObject = GJBaseGameLayer::tryGetObject(a2, m_targetModCenterID);
v10 = &MainObject->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
if ( a3->m_targetPlayer1 )
goto LABEL_9;
if ( !a3->m_targetPlayer2 )
{
m_centerGroupID = a3->m_centerGroupID;
if ( v5 )
Object = GJBaseGameLayer::tryGetMainObject(a2, m_centerGroupID);
else
Object = GJBaseGameLayer::tryGetObject(a2, m_centerGroupID);
m_player2 = (PlayerObject *)Object;
goto LABEL_15;
}
if ( a2->m_gameState.m_isDualMode )
m_player2 = a2->m_player2;
else
LABEL_9:
m_player2 = a2->m_player1;
LABEL_15:
if ( v10 && m_player2 && v10[193] != m_player2->m_uniqueID )
{
((void (__fastcall *)(_BYTE *))m_player2->getRealPosition)(v15);
(*(void (__fastcall **)(_BYTE *, _DWORD *))(*v10 + 672))(v16, v10);
cocos2d::CCPoint::operator-(retstr, v15, v16);
}
else
{
cocos2d::CCPoint::CCPoint(retstr, &stru_AC68C0);
}
return retstr;
}