//
// EditorUI::getLimitedPosition from 0xc00800 to 0xc008a8 (168 bytes)
//
// 3 xrefs:
// > EditorUI::getGridSnappedPos @ 0x7c74a0
// > EditorUI::moveObject @ 0xc00920
// > ??> @ 0x60628
//
// 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 13:03:48 +0000
//
cocos2d::CCPoint *__usercall EditorUI::getLimitedPosition@(
__int64 a1@,
float *a2@,
cocos2d::CCPoint *a3@)
{
float v3; // s1
float v4; // s0
float v5; // s1
v3 = *a2;
if ( *a2 > -3000.0 )
{
if ( v3 >= 240000.0 )
v3 = 240000.0;
}
else
{
v3 = -3000.0;
}
v4 = a2[1];
*a2 = v3;
if ( v4 <= -3000.0 )
{
a2[1] = -3000.0;
v4 = -3000.0;
if ( *(_BYTE *)(*(_QWORD *)(*(_QWORD *)(a1 + 1440) + 3272LL) + 453LL) )
goto LABEL_8;
goto LABEL_5;
}
if ( !*(_BYTE *)(*(_QWORD *)(*(_QWORD *)(a1 + 1440) + 3272LL) + 453LL) )
{
LABEL_5:
v5 = 2490.0;
goto LABEL_6;
}
v5 = 30090.0;
LABEL_6:
if ( v5 <= v4 )
v4 = v5;
LABEL_8:
a2[1] = v4;
cocos2d::CCPoint::CCPoint(a3, (const cocos2d::CCPoint *)a2);
return a3;
}