//
// PlayerObject::testForMoving from 0x74eec8 to 0x74f010 (328 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::checkCollisions @ 0x9e9e0c
// > ??> @ 0x50fe0
//
// 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:52:54 +0000
//
__int64 __fastcall PlayerObject::testForMoving(PlayerObject *this, float a2, GameObject *a3)
{
const cocos2d::CCPoint *LastPosition; // x0
__int64 result; // x0
bool v7; // nf
bool v8; // cc
const cocos2d::CCRect *v9; // x0
int v10; // w0
cocos2d::CCRect *v11; // x0
float v13; // [xsp+58h] [xbp+58h] BYREF
float v14; // [xsp+5Ch] [xbp+5Ch]
__int64 v15; // [xsp+60h] [xbp+60h] BYREF
_BYTE v16[4]; // [xsp+68h] [xbp+68h] BYREF
float v17; // [xsp+6Ch] [xbp+6Ch]
float v18; // [xsp+74h] [xbp+74h]
LastPosition = (const cocos2d::CCPoint *)GameObject::getLastPosition(a3);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v13, LastPosition);
(*(void (__fastcall **)(__int64 *__return_ptr, GameObject *))(*(_QWORD *)a3 + 1360LL))(&v15, a3);
if ( *(float *)&v15 == v13 )
{
result = 0;
if ( *((float *)&v15 + 1) == v14 )
return result;
result = *((unsigned __int8 *)this + 2423);
v7 = v14 < *((float *)&v15 + 1);
v8 = v14 <= *((float *)&v15 + 1);
if ( !*((_BYTE *)this + 2423) )
goto LABEL_3;
}
else
{
result = *((unsigned __int8 *)this + 2423);
v7 = v14 < *((float *)&v15 + 1);
v8 = v14 <= *((float *)&v15 + 1);
if ( !*((_BYTE *)this + 2423) )
{
LABEL_3:
if ( v8 )
return result;
goto LABEL_4;
}
}
if ( !v7 )
return 0;
LABEL_4:
v9 = (const cocos2d::CCRect *)(*(__int64 (__fastcall **)(GameObject *))(*(_QWORD *)a3 + 1328LL))(a3);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v16, v9);
v10 = *((unsigned __int8 *)this + 2423);
v18 = v18 + (float)(a2 * 5.0);
if ( v10 )
v17 = v17 - (float)(a2 * 5.0);
v11 = (cocos2d::CCRect *)(*(__int64 (__fastcall **)(PlayerObject *))(*(_QWORD *)this + 1328LL))(this);
result = (unsigned __int8)cocos2d::CCRect::intersectsRect(v11, (const cocos2d::CCRect *)v16);
if ( (_BYTE)result )
*((_QWORD *)this + 191) = a3;
return result;
}