{"type": "func", "start": 4297052872, "end": 4297053096, "name": "GJBaseGameLayer::getCameraEdgeValue", "pseudocode": "// \n// GJBaseGameLayer::getCameraEdgeValue from 0x1001fd2c8 to 0x1001fd3a8 (224 bytes)\n// \n// 5 xrefs:\n// > GJBaseGameLayer::updateCamera @ 0x1001ff8a8\n// > GJBaseGameLayer::updateCamera @ 0x1001ff8c4\n// > GJBaseGameLayer::updateCamera @ 0x1001ff8e8\n// > GJBaseGameLayer::updateCamera @ 0x1001ff90c\n// > GJBaseGameLayer::updateCamera @ 0x1001ff924\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\nfloat __fastcall GJBaseGameLayer::getCameraEdgeValue(GJBaseGameLayer *a1, int a2)\n{\n  int m_cameraEdgeValue2; // w21\n  GameObject *MainObject; // x0\n  __int64 v7; // [xsp+0h] [xbp-30h] BYREF\n  __int64 v8; // [xsp+8h] [xbp-28h] BYREF\n\n  m_cameraEdgeValue2 = 0;\n  if ( a2 > 2 )\n  {\n    if ( a2 == 3 )\n    {\n      m_cameraEdgeValue2 = a1->m_gameState.m_cameraEdgeValue2;\n    }\n    else if ( a2 == 4 )\n    {\n      m_cameraEdgeValue2 = a1->m_gameState.m_cameraEdgeValue3;\n    }\n  }\n  else if ( a2 == 1 )\n  {\n    m_cameraEdgeValue2 = a1->m_gameState.m_cameraEdgeValue0;\n  }\n  else if ( a2 == 2 )\n  {\n    m_cameraEdgeValue2 = a1->m_gameState.m_cameraEdgeValue1;\n  }\n  sub_1000229B8(&v8, &qword_10086C9A0);\n  MainObject = GJBaseGameLayer::tryGetMainObject(a1, m_cameraEdgeValue2);\n  if ( MainObject )\n  {\n    ((void (__fastcall *)(__int64 *__return_ptr))MainObject->getRealPosition)(&v7);\n    sub_1000229D0(&v8, (double *)&v7);\n  }\n  if ( (unsigned int)(a2 - 3) < 2 )\n    return *((float *)&v8 + 1);\n  if ( (unsigned int)(a2 - 1) > 1 )\n    return 0.0;\n  return *(float *)&v8;\n}", "assembly": "; \n; GJBaseGameLayer::getCameraEdgeValue from 0x1001fd2c8 to 0x1001fd3a8 (224 bytes)\n; \n; 5 xrefs:\n; > GJBaseGameLayer::updateCamera @ 0x1001ff8a8\n; > GJBaseGameLayer::updateCamera @ 0x1001ff8c4\n; > GJBaseGameLayer::updateCamera @ 0x1001ff8e8\n; > GJBaseGameLayer::updateCamera @ 0x1001ff90c\n; > GJBaseGameLayer::updateCamera @ 0x1001ff924\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\nSUB             SP, SP, #0x40                                          ; +0x0, 0x1001fd2c8\nSTP             X22, X21, [SP,#0x30+var_20]                            ; +0x4, 0x1001fd2cc\nSTP             X20, X19, [SP,#0x30+var_10]                            ; +0x8, 0x1001fd2d0\nSTP             X29, X30, [SP,#0x30+var_s0]                            ; +0xc, 0x1001fd2d4\nADD             X29, SP, #0x30                                         ; +0x10, 0x1001fd2d8\nMOV             X19, X1                                                ; +0x14, 0x1001fd2dc\nMOV             X20, X0                                                ; +0x18, 0x1001fd2e0\nMOV             W21, #0                                                ; +0x1c, 0x1001fd2e4\nCMP             W1, #2                                                 ; +0x20, 0x1001fd2e8\nB.GT            loc_1001FD308                                          ; +0x24, 0x1001fd2ec\nCMP             W19, #1                                                ; +0x28, 0x1001fd2f0\nB.EQ            loc_1001FD320                                          ; +0x2c, 0x1001fd2f4\nCMP             W19, #2                                                ; +0x30, 0x1001fd2f8\nB.NE            loc_1001FD32C                                          ; +0x34, 0x1001fd2fc\nLDR             W21, [X20,#0x424]                                      ; +0x38, 0x1001fd300\nB               loc_1001FD32C                                          ; +0x3c, 0x1001fd304\nCMP             W19, #3                                                ; +0x40, 0x1001fd308\nB.EQ            loc_1001FD328                                          ; +0x44, 0x1001fd30c\nCMP             W19, #4                                                ; +0x48, 0x1001fd310\nB.NE            loc_1001FD32C                                          ; +0x4c, 0x1001fd314\nLDR             W21, [X20,#0x42C]                                      ; +0x50, 0x1001fd318\nB               loc_1001FD32C                                          ; +0x54, 0x1001fd31c\nLDR             W21, [X20,#0x420]                                      ; +0x58, 0x1001fd320\nB               loc_1001FD32C                                          ; +0x5c, 0x1001fd324\nLDR             W21, [X20,#0x428]                                      ; +0x60, 0x1001fd328\nADRL            X1, qword_10086C9A0                                    ; +0x64, 0x1001fd32c\nADD             X0, SP, #0x30+var_28                                   ; +0x6c, 0x1001fd334\nBL              sub_1000229B8                                          ; +0x70, 0x1001fd338\nMOV             X0, X20                                                ; +0x74, 0x1001fd33c\nMOV             X1, X21                                                ; +0x78, 0x1001fd340\nBL              GJBaseGameLayer__tryGetMainObject                      ; +0x7c, 0x1001fd344\nCBZ             X0, loc_1001FD368                                      ; +0x80, 0x1001fd348\nLDR             X8, [X0]                                               ; +0x84, 0x1001fd34c\nLDR             X9, [X8,#0x540]                                        ; +0x88, 0x1001fd350\nMOV             X8, SP                                                 ; +0x8c, 0x1001fd354\nBLR             X9                                                     ; +0x90, 0x1001fd358\nADD             X0, SP, #0x30+var_28                                   ; +0x94, 0x1001fd35c\nMOV             X1, SP                                                 ; +0x98, 0x1001fd360\nBL              sub_1000229D0                                          ; +0x9c, 0x1001fd364\nSUB             W8, W19, #3                                            ; +0xa0, 0x1001fd368\nCMP             W8, #2                                                 ; +0xa4, 0x1001fd36c\nB.CC            loc_1001FD388                                          ; +0xa8, 0x1001fd370\nSUB             W8, W19, #1                                            ; +0xac, 0x1001fd374\nCMP             W8, #1                                                 ; +0xb0, 0x1001fd378\nB.HI            loc_1001FD390                                          ; +0xb4, 0x1001fd37c\nLDR             S0, [SP,#0x30+var_28]                                  ; +0xb8, 0x1001fd380\nB               loc_1001FD394                                          ; +0xbc, 0x1001fd384\nLDR             S0, [SP,#0x30+var_24]                                  ; +0xc0, 0x1001fd388\nB               loc_1001FD394                                          ; +0xc4, 0x1001fd38c\nFMOV            S0, WZR                                                ; +0xc8, 0x1001fd390\nLDP             X29, X30, [SP,#0x30+var_s0]                            ; +0xcc, 0x1001fd394\nLDP             X20, X19, [SP,#0x30+var_10]                            ; +0xd0, 0x1001fd398\nLDP             X22, X21, [SP,#0x30+var_20]                            ; +0xd4, 0x1001fd39c\nADD             SP, SP, #0x40 ; '@'                                    ; +0xd8, 0x1001fd3a0\nRET                                                                    ; +0xdc, 0x1001fd3a4", "xrefs": ["GJBaseGameLayer::updateCamera @ 0x1001ff8a8", "GJBaseGameLayer::updateCamera @ 0x1001ff8c4", "GJBaseGameLayer::updateCamera @ 0x1001ff8e8", "GJBaseGameLayer::updateCamera @ 0x1001ff90c", "GJBaseGameLayer::updateCamera @ 0x1001ff924"], "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"}