{"type": "func", "start": 3675196, "end": 3675358, "name": "EditorUI::centerCameraOnObject", "pseudocode": "// \n// EditorUI::centerCameraOnObject from 0x38143c to 0x3814de (162 bytes)\n// \n// 1 xrefs:\n// > EditorUI::findAndSelectObject @ 0x3a2ebc\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\nvoid EditorUI::centerCameraOnObject(EditorUI *a1, GameObject *a2)\n{\n  cocos2d::CCDirector *v4; // r0\n  float v5; // s17\n  const cocos2d::CCPoint *v6; // r0\n  float v7; // s16\n  const cocos2d::CCPoint *v8; // r0\n  cocos2d::CCSize v9; // [sp+4h] [bp-14h] BYREF\n  cocos2d::CCPoint v10; // [sp+Ch] [bp-Ch] BYREF\n\n  v4 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(&v9, v4);\n  v5 = COERCE_FLOAT(((int (__fastcall *)(cocos2d::CCLayer *))a1->m_editorLayer->m_objectLayer->getScale)(a1->m_editorLayer->m_objectLayer));\n  v6 = a2->getPosition(a2);\n  v7 = (float)(v9.width * 0.5) - (float)(v6->x * v5);\n  v8 = a2->getPosition(a2);\n  cocos2d::CCPoint::CCPoint(&v10, v7, (float)(v9.height * 0.5) - (float)(v8->y * v5));\n  a1->m_editorLayer->m_objectLayer->setPosition(a1->m_editorLayer->m_objectLayer, &v10);\n  EditorUI::constrainGameLayerPosition(a1);\n}", "assembly": "; \n; EditorUI::centerCameraOnObject from 0x38143c to 0x3814de (162 bytes)\n; \n; 1 xrefs:\n; > EditorUI::findAndSelectObject @ 0x3a2ebc\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\nPUSH            {R4-R6,LR}                                             ; +0x0, 0x38143c\nMOV             R5, R1                                                 ; +0x2, 0x38143e\nLDR             R4, =(__stack_chk_guard_ptr - 0x38144C)                ; +0x4, 0x381440\nMOV             R6, R0                                                 ; +0x6, 0x381442\nVPUSH           {D8-D9}                                                ; +0x8, 0x381444\nADD             R4, PC; __stack_chk_guard_ptr                          ; +0xc, 0x381448\nLDR             R4, [R4]; __stack_chk_guard                            ; +0xe, 0x38144a\nLDR             R3, [R4]                                               ; +0x10, 0x38144c\nVMOV.F32        S18, #0.5                                              ; +0x12, 0x38144e\nSUB             SP, SP, #0x18                                          ; +0x16, 0x381452\nSTR             R3, [SP,#0x18+var_4]                                   ; +0x18, 0x381454\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x1a, 0x381456\nMOV             R1, R0                                                 ; +0x1e, 0x38145a\nADD             R0, SP, #0x18+var_14; this                             ; +0x20, 0x38145c\nBL              _ZN7cocos2d10CCDirector10getWinSizeEv; cocos2d::CCDirector::getWinSize(void) ; +0x22, 0x38145e\nLDR.W           R3, [R6,#0x340]                                        ; +0x26, 0x381462\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x2a, 0x381466\nLDR             R3, [R0]                                               ; +0x2e, 0x38146a\nLDR             R3, [R3,#0x54]                                         ; +0x30, 0x38146c\nBLX             R3                                                     ; +0x32, 0x38146e\nLDR             R3, [R5]                                               ; +0x34, 0x381470\nLDR             R3, [R3,#0x60]                                         ; +0x36, 0x381472\nVMOV            S17, R0                                                ; +0x38, 0x381474\nMOV             R0, R5                                                 ; +0x3c, 0x381478\nBLX             R3                                                     ; +0x3e, 0x38147a\nVLDR            S16, [SP,#0x18+var_14]                                 ; +0x40, 0x38147c\nLDR             R3, [R5]                                               ; +0x44, 0x381480\nVMUL.F32        S16, S16, S18                                          ; +0x46, 0x381482\nLDR             R3, [R3,#0x60]                                         ; +0x4a, 0x381486\nVLDR            S15, [R0]                                              ; +0x4c, 0x381488\nMOV             R0, R5                                                 ; +0x50, 0x38148c\nADD             R5, SP, #0x18+var_C                                    ; +0x52, 0x38148e\nVMLS.F32        S16, S15, S17                                          ; +0x54, 0x381490\nBLX             R3                                                     ; +0x58, 0x381494\nVLDR            S15, [SP,#0x18+var_10]                                 ; +0x5a, 0x381496\nVMUL.F32        S15, S15, S18                                          ; +0x5e, 0x38149a\nVMOV            R1, S16; float                                         ; +0x62, 0x38149e\nVLDR            S14, [R0,#4]                                           ; +0x66, 0x3814a2\nMOV             R0, R5; this                                           ; +0x6a, 0x3814a6\nVMLS.F32        S15, S14, S17                                          ; +0x6c, 0x3814a8\nVMOV            R2, S15; float                                         ; +0x70, 0x3814ac\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x74, 0x3814b0\nLDR.W           R3, [R6,#0x340]                                        ; +0x78, 0x3814b4\nMOV             R1, R5                                                 ; +0x7c, 0x3814b8\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x7e, 0x3814ba\nLDR             R3, [R0]                                               ; +0x82, 0x3814be\nLDR             R3, [R3,#0x5C]                                         ; +0x84, 0x3814c0\nBLX             R3                                                     ; +0x86, 0x3814c2\nMOV             R0, R6; this                                           ; +0x88, 0x3814c4\nBL              _ZN8EditorUI26constrainGameLayerPositionEv; EditorUI::constrainGameLayerPosition(void) ; +0x8a, 0x3814c6\nLDR             R2, [SP,#0x18+var_4]                                   ; +0x8e, 0x3814ca\nLDR             R3, [R4]                                               ; +0x90, 0x3814cc\nCMP             R2, R3                                                 ; +0x92, 0x3814ce\nBEQ             loc_3814D6                                             ; +0x94, 0x3814d0\nBLX             __stack_chk_fail                                       ; +0x96, 0x3814d2\nADD             SP, SP, #0x18                                          ; +0x9a, 0x3814d6\nVPOP            {D8-D9}                                                ; +0x9c, 0x3814d8\nPOP             {R4-R6,PC}                                             ; +0xa0, 0x3814dc", "xrefs": ["EditorUI::findAndSelectObject @ 0x3a2ebc"], "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"}