{"type": "func", "start": 4296956244, "end": 4296956508, "name": "GJBaseGameLayer::getGroundHeight", "pseudocode": "// \n// GJBaseGameLayer::getGroundHeight from 0x1001e5954 to 0x1001e5a5c (264 bytes)\n// \n// 2 xrefs:\n// > GJBaseGameLayer::getGroundHeight @ 0x1001e596c\n// > GJBaseGameLayer::updateDualGround @ 0x1001e6740\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::getGroundHeight(GJBaseGameLayer *a1, PlayerObject *a2, int m_dualRelated)\n{\n  float v3; // w8\n  float result; // s0\n  float v5; // s8\n  __int64 v6; // x8\n  PlayerObject *v7; // x19\n\n  while ( (unsigned int)(m_dualRelated - 23) < 2 )\n  {\n    m_dualRelated = a1->m_gameState.m_dualRelated;\n    if ( (unsigned int)(m_dualRelated - 23) < 2 )\n      goto LABEL_9;\n  }\n  if ( (unsigned int)m_dualRelated <= 0x29 )\n  {\n    if ( ((1LL << m_dualRelated) & 0x20004080020LL) != 0 )\n    {\n      v3 = 300.0;\n      goto LABEL_10;\n    }\n    if ( m_dualRelated == 16 )\n    {\n      v3 = 240.0;\n      goto LABEL_10;\n    }\n  }\nLABEL_9:\n  v3 = 270.0;\nLABEL_10:\n  result = v3;\n  if ( a1->m_gameState.m_isDualMode )\n  {\n    if ( v3 == 240.0 )\n      v5 = 270.0;\n    else\n      v5 = v3;\n    v6 = 3272;\n    if ( a2->m_uniqueID == a1->m_player1->m_uniqueID )\n      v6 = 3280;\n    v7 = *(PlayerObject **)((char *)&a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable\n                          + v6);\n    if ( PlayerObject::isFlying(v7) )\n    {\n      result = 300.0;\n    }\n    else\n    {\n      result = 270.0;\n      if ( v7->m_isBall )\n        result = 240.0;\n    }\n    if ( v5 >= result )\n      return v5;\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::getGroundHeight from 0x1001e5954 to 0x1001e5a5c (264 bytes)\n; \n; 2 xrefs:\n; > GJBaseGameLayer::getGroundHeight @ 0x1001e596c\n; > GJBaseGameLayer::updateDualGround @ 0x1001e6740\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             W8, W2, #0x17                                          ; +0x0, 0x1001e5954\nCMP             W8, #2                                                 ; +0x4, 0x1001e5958\nB.CS            loc_1001E5974                                          ; +0x8, 0x1001e595c\nLDR             W2, [X0,#0x4E8]                                        ; +0xc, 0x1001e5960\nSUB             W8, W2, #0x17                                          ; +0x10, 0x1001e5964\nCMP             W8, #2                                                 ; +0x14, 0x1001e5968\nB.CS            GJBaseGameLayer__getGroundHeight                       ; +0x18, 0x1001e596c\nB               loc_1001E59B4                                          ; +0x1c, 0x1001e5970\nCMP             W2, #0x29 ; ')'                                        ; +0x20, 0x1001e5974\nB.HI            loc_1001E59B4                                          ; +0x24, 0x1001e5978\nMOV             W8, W2                                                 ; +0x28, 0x1001e597c\nMOV             W9, #1                                                 ; +0x2c, 0x1001e5980\nLSL             X9, X9, X8                                             ; +0x30, 0x1001e5984\nMOV             X10, #0x20004080020                                    ; +0x34, 0x1001e5988\nTST             X9, X10                                                ; +0x40, 0x1001e5994\nB.EQ            loc_1001E59A4                                          ; +0x44, 0x1001e5998\nMOV             W8, #0x43960000                                        ; +0x48, 0x1001e599c\nB               loc_1001E59B8                                          ; +0x4c, 0x1001e59a0\nCMP             X8, #0x10                                              ; +0x50, 0x1001e59a4\nB.NE            loc_1001E59B4                                          ; +0x54, 0x1001e59a8\nMOV             W8, #0x43700000                                        ; +0x58, 0x1001e59ac\nB               loc_1001E59B8                                          ; +0x5c, 0x1001e59b0\nMOV             W8, #0x43870000                                        ; +0x60, 0x1001e59b4\nFMOV            S0, W8                                                 ; +0x64, 0x1001e59b8\nLDRB            W8, [X0,#0x3F2]                                        ; +0x68, 0x1001e59bc\nCMP             W8, #1                                                 ; +0x6c, 0x1001e59c0\nB.NE            locret_1001E5A58                                       ; +0x70, 0x1001e59c4\nSTP             D9, D8, [SP,#var_30]!                                  ; +0x74, 0x1001e59c8\nSTP             X20, X19, [SP,#0x30+var_20]                            ; +0x78, 0x1001e59cc\nSTP             X29, X30, [SP,#0x30+var_10]                            ; +0x7c, 0x1001e59d0\nADD             X29, SP, #0x30+var_10                                  ; +0x80, 0x1001e59d4\nMOV             W8, #0x43700000                                        ; +0x84, 0x1001e59d8\nFMOV            S1, W8                                                 ; +0x88, 0x1001e59dc\nFCMP            S0, S1                                                 ; +0x8c, 0x1001e59e0\nMOV             W8, #0x43870000                                        ; +0x90, 0x1001e59e4\nFMOV            S1, W8                                                 ; +0x94, 0x1001e59e8\nFCSEL           S8, S1, S0, EQ                                         ; +0x98, 0x1001e59ec\nLDR             W8, [X1,#0x394]                                        ; +0x9c, 0x1001e59f0\nLDR             X9, [X0,#0xCC8]                                        ; +0xa0, 0x1001e59f4\nLDR             W9, [X9,#0x394]                                        ; +0xa4, 0x1001e59f8\nCMP             W8, W9                                                 ; +0xa8, 0x1001e59fc\nMOV             W8, #0xCC8                                             ; +0xac, 0x1001e5a00\nMOV             W9, #0xCD0                                             ; +0xb0, 0x1001e5a04\nCSEL            X8, X9, X8, EQ                                         ; +0xb4, 0x1001e5a08\nLDR             X19, [X0,X8]                                           ; +0xb8, 0x1001e5a0c\nMOV             X0, X19                                                ; +0xbc, 0x1001e5a10\nBL              PlayerObject__isFlying                                 ; +0xc0, 0x1001e5a14\nTBZ             W0, #0, loc_1001E5A28                                  ; +0xc4, 0x1001e5a18\nMOV             W8, #0x43960000                                        ; +0xc8, 0x1001e5a1c\nFMOV            S0, W8                                                 ; +0xcc, 0x1001e5a20\nB               loc_1001E5A44                                          ; +0xd0, 0x1001e5a24\nLDRB            W8, [X19,#0x973]                                       ; +0xd4, 0x1001e5a28\nCMP             W8, #0                                                 ; +0xd8, 0x1001e5a2c\nMOV             W8, #0x43870000                                        ; +0xdc, 0x1001e5a30\nFMOV            S0, W8                                                 ; +0xe0, 0x1001e5a34\nMOV             W8, #0x43700000                                        ; +0xe4, 0x1001e5a38\nFMOV            S1, W8                                                 ; +0xe8, 0x1001e5a3c\nFCSEL           S0, S1, S0, NE                                         ; +0xec, 0x1001e5a40\nFCMP            S8, S0                                                 ; +0xf0, 0x1001e5a44\nFCSEL           S0, S0, S8, MI                                         ; +0xf4, 0x1001e5a48\nLDP             X29, X30, [SP,#0x30+var_10]                            ; +0xf8, 0x1001e5a4c\nLDP             X20, X19, [SP,#0x30+var_20]                            ; +0xfc, 0x1001e5a50\nLDP             D9, D8, [SP+0x30+var_30],#0x30                         ; +0x100, 0x1001e5a54\nRET                                                                    ; +0x104, 0x1001e5a58", "xrefs": ["GJBaseGameLayer::getGroundHeight @ 0x1001e596c", "GJBaseGameLayer::updateDualGround @ 0x1001e6740"], "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"}