//
// EditorUI::getLimitedPosition from 0x68ee74 to 0x68ef18 (164 bytes)
//
// 3 xrefs:
// > EditorUI::moveObject @ 0x68ef90
// > EditorUI::getGridSnappedPos @ 0x690448
// > ??> @ 0x438f0
//
// 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 EditorUI::getLimitedPosition(EditorUI *a1, cocos2d::CCPoint a2)
{
cocos2d::CCPoint *v2; // x1
cocos2d::CCPoint *v3; // x8
float x; // s1
float y; // s0
LevelEditorLayer *m_editorLayer; // x0
LevelSettingsObject *m_levelSettings; // x0
float v8; // s1
cocos2d::CCPoint result; // 0:s0.4,4:s1.4
x = v2->x;
if ( v2->x > -3000.0 )
{
if ( x >= 240000.0 )
x = 240000.0;
}
else
{
x = -3000.0;
}
y = v2->y;
m_editorLayer = a1->m_editorLayer;
v2->x = x;
if ( y <= -3000.0 )
{
m_levelSettings = m_editorLayer->m_levelSettings;
v2->y = -3000.0;
y = -3000.0;
if ( m_levelSettings->m_dynamicLevelHeight )
goto LABEL_8;
goto LABEL_5;
}
if ( !m_editorLayer->m_levelSettings->m_dynamicLevelHeight )
{
LABEL_5:
v8 = 2490.0;
goto LABEL_6;
}
v8 = 30090.0;
LABEL_6:
if ( v8 <= y )
y = v8;
LABEL_8:
v2->y = y;
cocos2d::CCPoint::CCPoint(v3, v2);
return result;
}