//
// applyPositionLimits from 0x4700a0 to 0x4701aa (266 bytes)
//
// 1 xrefs:
// > getRotateCommandAngleDelta @ 0x47515c
//
// 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 *__fastcall applyPositionLimits(
cocos2d::CCPoint *result,
GameObject *a2,
GameObject *a3,
GameObject *a4,
GameObject *a5)
{
float *p_x; // r4
float x; // s16
float v10; // s16
float v11; // s16
float v12; // s16
float v13; // [sp+4h] [bp-Ch] BYREF
float v14; // [sp+8h] [bp-8h]
p_x = &result->x;
if ( a2 )
{
x = result->x;
result = (cocos2d::CCPoint *)((int (__fastcall *)(float *))a2->getRealPosition)(&v13);
if ( x < v13 )
{
result = a2->getRealPosition(&v13, a2);
*p_x = v13;
}
}
if ( a3 )
{
v10 = p_x[1];
result = a3->getRealPosition(&v13, a3);
if ( v10 < v14 )
{
result = a3->getRealPosition(&v13, a3);
p_x[1] = v14;
}
}
if ( a4 )
{
v11 = *p_x;
result = a4->getRealPosition(&v13, a4);
if ( v11 > v13 )
{
result = a4->getRealPosition(&v13, a4);
*p_x = v13;
}
}
if ( a5 )
{
v12 = p_x[1];
result = a5->getRealPosition(&v13, a5);
if ( v12 > v14 )
{
result = a5->getRealPosition(&v13, a5);
p_x[1] = v14;
}
}
return result;
}