{"type": "func", "start": 6876788, "end": 6876952, "name": "EditorUI::getLimitedPosition", "pseudocode": "// \n// EditorUI::getLimitedPosition from 0x68ee74 to 0x68ef18 (164 bytes)\n// \n// 3 xrefs:\n// > EditorUI::moveObject @ 0x68ef90\n// > EditorUI::getGridSnappedPos @ 0x690448\n// > <???> @ 0x438f0\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\ncocos2d::CCPoint EditorUI::getLimitedPosition(EditorUI *a1, cocos2d::CCPoint a2)\n{\n  cocos2d::CCPoint *v2; // x1\n  cocos2d::CCPoint *v3; // x8\n  float x; // s1\n  float y; // s0\n  LevelEditorLayer *m_editorLayer; // x0\n  LevelSettingsObject *m_levelSettings; // x0\n  float v8; // s1\n  cocos2d::CCPoint result; // 0:s0.4,4:s1.4\n\n  x = v2->x;\n  if ( v2->x > -3000.0 )\n  {\n    if ( x >= 240000.0 )\n      x = 240000.0;\n  }\n  else\n  {\n    x = -3000.0;\n  }\n  y = v2->y;\n  m_editorLayer = a1->m_editorLayer;\n  v2->x = x;\n  if ( y <= -3000.0 )\n  {\n    m_levelSettings = m_editorLayer->m_levelSettings;\n    v2->y = -3000.0;\n    y = -3000.0;\n    if ( m_levelSettings->m_dynamicLevelHeight )\n      goto LABEL_8;\n    goto LABEL_5;\n  }\n  if ( !m_editorLayer->m_levelSettings->m_dynamicLevelHeight )\n  {\nLABEL_5:\n    v8 = 2490.0;\n    goto LABEL_6;\n  }\n  v8 = 30090.0;\nLABEL_6:\n  if ( v8 <= y )\n    y = v8;\nLABEL_8:\n  v2->y = y;\n  cocos2d::CCPoint::CCPoint(v3, v2);\n  return result;\n}", "assembly": "; \n; EditorUI::getLimitedPosition from 0x68ee74 to 0x68ef18 (164 bytes)\n; \n; 3 xrefs:\n; > EditorUI::moveObject @ 0x68ef90\n; > EditorUI::getGridSnappedPos @ 0x690448\n; > <???> @ 0x438f0\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nSTP             X29, X30, [SP,#var_20]!                                ; +0x0, 0x68ee74\nMOV             X2, X1                                                 ; +0x4, 0x68ee78\nMOV             X29, SP                                                ; +0x8, 0x68ee7c\nLDR             S2, =0xC53B8000                                        ; +0xc, 0x68ee80\nLDR             S1, [X1]                                               ; +0x10, 0x68ee84\nFCMPE           S1, S2                                                 ; +0x14, 0x68ee88\nB.GT            loc_68EF04                                             ; +0x18, 0x68ee8c\nFMOV            S1, S2                                                 ; +0x1c, 0x68ee90\nLDR             S0, [X2,#4]                                            ; +0x20, 0x68ee94\nLDR             X0, [X0,#0x4F8]                                        ; +0x24, 0x68ee98\nSTR             S1, [X2]                                               ; +0x28, 0x68ee9c\nFCMPE           S0, S2                                                 ; +0x2c, 0x68eea0\nB.GT            loc_68EEF0                                             ; +0x30, 0x68eea4\nLDR             X0, [X0,#0xE08]                                        ; +0x34, 0x68eea8\nSTR             S2, [X2,#4]                                            ; +0x38, 0x68eeac\nFMOV            S0, S2                                                 ; +0x3c, 0x68eeb0\nLDRB            W0, [X0,#0x1B5]                                        ; +0x40, 0x68eeb4\nCBNZ            W0, loc_68EECC                                         ; +0x44, 0x68eeb8\nLDR             S1, =0x451BA000                                        ; +0x48, 0x68eebc\nFCMPE           S1, S0                                                 ; +0x4c, 0x68eec0\nB.GT            loc_68EECC                                             ; +0x50, 0x68eec4\nFMOV            S0, S1                                                 ; +0x54, 0x68eec8\nMOV             X0, X8; this                                           ; +0x58, 0x68eecc\nMOV             X1, X2; cocos2d::CCPoint *                             ; +0x5c, 0x68eed0\nSTR             X8, [X29,#0x20+var_8]                                  ; +0x60, 0x68eed4\nSTR             S0, [X2,#4]                                            ; +0x64, 0x68eed8\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x68, 0x68eedc\nLDR             X8, [X29,#0x20+var_8]                                  ; +0x6c, 0x68eee0\nLDP             X29, X30, [SP+0x20+var_20],#0x20                       ; +0x70, 0x68eee4\nMOV             X0, X8                                                 ; +0x74, 0x68eee8\nRET                                                                    ; +0x78, 0x68eeec\nLDR             X0, [X0,#0xE08]                                        ; +0x7c, 0x68eef0\nLDRB            W0, [X0,#0x1B5]                                        ; +0x80, 0x68eef4\nCBZ             W0, loc_68EEBC                                         ; +0x84, 0x68eef8\nLDR             S1, =0x46EB1400                                        ; +0x88, 0x68eefc\nB               loc_68EEC0                                             ; +0x8c, 0x68ef00\nLDR             S0, =0x486A6000                                        ; +0x90, 0x68ef04\nFCMPE           S1, S0                                                 ; +0x94, 0x68ef08\nB.MI            loc_68EE94                                             ; +0x98, 0x68ef0c\nFMOV            S1, S0                                                 ; +0x9c, 0x68ef10\nB               loc_68EE94                                             ; +0xa0, 0x68ef14", "xrefs": ["EditorUI::moveObject @ 0x68ef90", "EditorUI::getGridSnappedPos @ 0x690448", "<???> @ 0x438f0"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}