{"type": "func", "start": 4295033888, "end": 4295034221, "name": "EditorUI::centerCameraOnObject", "pseudocode": "// \n// EditorUI::centerCameraOnObject from 0x100010420 to 0x10001056d (333 bytes)\n// \n// 3 xrefs:\n// > sub_1000103E0 @ 0x10001040f\n// > EditorUI::findObject @ 0x1005b9b28\n// > EditorUI::handleEditorAction @ 0x10060cd01\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:18:52 +0000\n// \n\n__int64 __fastcall EditorUI::centerCameraOnObject(__int64 a1, float *a2)\n{\n  __int64 v3; // rax\n  float v4; // xmm0_4\n  int SectionCount; // eax\n  int v6; // ecx\n  float v7; // xmm0_4\n  double v8; // xmm1_8\n  _BYTE v10[8]; // [rsp+4h] [rbp-2Ch] BYREF\n  float v11[2]; // [rsp+Ch] [rbp-24h] BYREF\n  float v12; // [rsp+14h] [rbp-1Ch]\n  float XMin; // [rsp+18h] [rbp-18h]\n  float v14; // [rsp+1Ch] [rbp-14h]\n\n  v3 = cocos2d::CCDirector::sharedDirector(a1, a2);\n  cocos2d::CCDirector::getWinSize(v11, v3);\n  v4 = (*(float (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1440) + 3920LL) + 168LL))(*(_QWORD *)(*(_QWORD *)(a1 + 1440) + 3920LL));\n  sub_100278250(v10, (float)(v11[0] * 0.5) - (float)(*a2 * v4), (float)(0.5 * v11[1]) - (float)(v4 * a2[1]));\n  (*(void (__fastcall **)(_QWORD, _BYTE *))(**(_QWORD **)(*(_QWORD *)(a1 + 1440) + 3920LL) + 184LL))(\n    *(_QWORD *)(*(_QWORD *)(a1 + 1440) + 3920LL),\n    v10);\n  EditorUI::constrainGameLayerPosition(a1, -100.0, -100.0);\n  v12 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1440) + 3920LL) + 192LL))(*(_QWORD *)(*(_QWORD *)(a1 + 1440) + 3920LL));\n  XMin = EditorUI::getXMin(a1, 0);\n  SectionCount = LevelEditorLayer::getSectionCount(*(_QWORD *)(a1 + 1440));\n  v6 = 100;\n  if ( SectionCount >= 101 )\n    v6 = SectionCount;\n  v14 = (float)v6 * -100.0;\n  v7 = (*(float (__fastcall **)(_QWORD))(**(_QWORD **)(*(_QWORD *)(a1 + 1440) + 3920LL) + 168LL))(*(_QWORD *)(*(_QWORD *)(a1 + 1440) + 3920LL));\n  *(_QWORD *)&v8 = LODWORD(v12);\n  *(float *)&v8 = fminf(fmaxf((float)(v12 - XMin) / (float)(v7 * v14), 0.0), 1.0);\n  return Slider::setValue(*(_QWORD *)(a1 + 840), v8);\n}", "assembly": "; \n; EditorUI::centerCameraOnObject from 0x100010420 to 0x10001056d (333 bytes)\n; \n; 3 xrefs:\n; > sub_1000103E0 @ 0x10001040f\n; > EditorUI::findObject @ 0x1005b9b28\n; > EditorUI::handleEditorAction @ 0x10060cd01\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:18:52 +0000\n; \npush    rbp                                                            ; +0x0, 0x100010420\nmov     rbp, rsp                                                       ; +0x1, 0x100010421\npush    r14                                                            ; +0x4, 0x100010424\npush    rbx                                                            ; +0x6, 0x100010426\nsub     rsp, 20h                                                       ; +0x7, 0x100010427\nmov     r14, rsi                                                       ; +0xb, 0x10001042b\nmov     rbx, rdi                                                       ; +0xe, 0x10001042e\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x11, 0x100010431\nlea     rdi, [rbp+var_24]                                              ; +0x16, 0x100010436\nmov     rsi, rax                                                       ; +0x1a, 0x10001043a\ncall    cocos2d__CCDirector__getWinSize                                ; +0x1d, 0x10001043d\nmov     rax, [rbx+5A0h]                                                ; +0x22, 0x100010442\nmov     rdi, [rax+0F50h]                                               ; +0x29, 0x100010449\nmov     rax, [rdi]                                                     ; +0x30, 0x100010450\ncall    qword ptr [rax+0A8h]                                           ; +0x33, 0x100010453\nmovss   xmm1, cs:dword_100A03578                                       ; +0x39, 0x100010459\nmovss   xmm2, [rbp+var_24]                                             ; +0x41, 0x100010461\nmulss   xmm2, xmm1                                                     ; +0x46, 0x100010466\nmovss   xmm3, dword ptr [r14]                                          ; +0x4a, 0x10001046a\nmulss   xmm3, xmm0                                                     ; +0x4f, 0x10001046f\nmulss   xmm1, [rbp+var_20]                                             ; +0x53, 0x100010473\nsubss   xmm2, xmm3                                                     ; +0x58, 0x100010478\nmulss   xmm0, dword ptr [r14+4]                                        ; +0x5c, 0x10001047c\nsubss   xmm1, xmm0                                                     ; +0x62, 0x100010482\nlea     r14, [rbp+var_2C]                                              ; +0x66, 0x100010486\nmov     rdi, r14                                                       ; +0x6a, 0x10001048a\nmovaps  xmm0, xmm2                                                     ; +0x6d, 0x10001048d\ncall    sub_100278250                                                  ; +0x70, 0x100010490\nmov     rax, [rbx+5A0h]                                                ; +0x75, 0x100010495\nmov     rdi, [rax+0F50h]                                               ; +0x7c, 0x10001049c\nmov     rax, [rdi]                                                     ; +0x83, 0x1000104a3\nmov     rsi, r14                                                       ; +0x86, 0x1000104a6\ncall    qword ptr [rax+0B8h]                                           ; +0x89, 0x1000104a9\nmovss   xmm0, cs:dword_100A03580                                       ; +0x8f, 0x1000104af\nmov     rdi, rbx                                                       ; +0x97, 0x1000104b7\nmovaps  xmm1, xmm0                                                     ; +0x9a, 0x1000104ba\ncall    EditorUI__constrainGameLayerPosition                           ; +0x9d, 0x1000104bd\nmov     rax, [rbx+5A0h]                                                ; +0xa2, 0x1000104c2\nmov     rdi, [rax+0F50h]                                               ; +0xa9, 0x1000104c9\nmov     rax, [rdi]                                                     ; +0xb0, 0x1000104d0\ncall    qword ptr [rax+0C0h]                                           ; +0xb3, 0x1000104d3\nmovss   xmm0, dword ptr [rax]                                          ; +0xb9, 0x1000104d9\nmovss   [rbp+var_1C], xmm0                                             ; +0xbd, 0x1000104dd\nmov     rdi, rbx                                                       ; +0xc2, 0x1000104e2\nxor     esi, esi                                                       ; +0xc5, 0x1000104e5\ncall    EditorUI__getXMin                                              ; +0xc7, 0x1000104e7\nmovss   [rbp+var_18], xmm0                                             ; +0xcc, 0x1000104ec\nmov     rdi, [rbx+5A0h]                                                ; +0xd1, 0x1000104f1\ncall    LevelEditorLayer__getSectionCount                              ; +0xd8, 0x1000104f8\ncmp     eax, 65h ; 'e'                                                 ; +0xdd, 0x1000104fd\nmov     ecx, 64h ; 'd'                                                 ; +0xe0, 0x100010500\ncmovge  ecx, eax                                                       ; +0xe5, 0x100010505\nxorps   xmm0, xmm0                                                     ; +0xe8, 0x100010508\ncvtsi2ss xmm0, ecx                                                     ; +0xeb, 0x10001050b\nmulss   xmm0, cs:dword_100A03580                                       ; +0xef, 0x10001050f\nmovss   [rbp+var_14], xmm0                                             ; +0xf7, 0x100010517\nmov     rax, [rbx+5A0h]                                                ; +0xfc, 0x10001051c\nmov     rdi, [rax+0F50h]                                               ; +0x103, 0x100010523\nmov     rax, [rdi]                                                     ; +0x10a, 0x10001052a\ncall    qword ptr [rax+0A8h]                                           ; +0x10d, 0x10001052d\nmulss   xmm0, [rbp+var_14]                                             ; +0x113, 0x100010533\nmovss   xmm1, [rbp+var_1C]                                             ; +0x118, 0x100010538\nsubss   xmm1, [rbp+var_18]                                             ; +0x11d, 0x10001053d\ndivss   xmm1, xmm0                                                     ; +0x122, 0x100010542\nxorps   xmm0, xmm0                                                     ; +0x126, 0x100010546\nmaxss   xmm1, xmm0                                                     ; +0x129, 0x100010549\nminss   xmm1, cs:alpha                                                 ; +0x12d, 0x10001054d\nmovaps  xmm0, xmm1                                                     ; +0x135, 0x100010555\nmov     rdi, [rbx+348h]                                                ; +0x138, 0x100010558\ncall    Slider__setValue                                               ; +0x13f, 0x10001055f\nadd     rsp, 20h                                                       ; +0x144, 0x100010564\npop     rbx                                                            ; +0x148, 0x100010568\npop     r14                                                            ; +0x149, 0x100010569\npop     rbp                                                            ; +0x14b, 0x10001056b\nretn                                                                   ; +0x14c, 0x10001056c", "xrefs": ["sub_1000103E0 @ 0x10001040f", "EditorUI::findObject @ 0x1005b9b28", "EditorUI::handleEditorAction @ 0x10060cd01"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}