{"type": "func", "start": 8745824, "end": 8746024, "name": "GJBaseGameLayer::createGroundLayer", "pseudocode": "// \n// GJBaseGameLayer::createGroundLayer from 0x857360 to 0x857428 (200 bytes)\n// \n// 6 xrefs:\n// > PlayLayer::setupHasCompleted @ 0x5dc444\n// > LevelEditorLayer::init @ 0x67c9f0\n// > GJBaseGameLayer::asyncGLoaded @ 0x8580d4\n// > GJBaseGameLayer::syncBGTextures @ 0x866a40\n// > LevelSettingsLayer::selectArtClosed @ 0xa34688\n// > <???> @ 0x58998\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 GJBaseGameLayer::createGroundLayer(GJBaseGameLayer *a1, int a2, int a3)\n{\n  unsigned int v5; // w20\n  GJGroundLayer *v6; // x0\n  GJGroundLayer_vtbl *v7; // x2\n  GJGroundLayer *v8; // x0\n  int v9; // [xsp+38h] [xbp+38h]\n\n  if ( a1->m_groundLayer )\n  {\n    v9 = a2;\n    GJBaseGameLayer::removeGroundLayer(a1);\n    a2 = v9;\n  }\n  if ( a2 > 22 )\n    v5 = 22;\n  else\n    v5 = a2;\n  v6 = GJGroundLayer::create(v5, a3);\n  v7 = v6->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  a1->m_groundLayer = v6;\n  v7->setTag(v6, v5);\n  a1->m_objectParent->addChild_0(a1->m_objectParent, a1->m_groundLayer, 40);\n  v8 = GJGroundLayer::create(v5, a3);\n  a1->m_groundLayer2 = v8;\n  a1->m_objectParent->addChild_0(a1->m_objectParent, v8, 40);\n  a1->m_groundLayer2->setScaleY(a1->m_groundLayer2, -1.0);\n}", "assembly": "; \n; GJBaseGameLayer::createGroundLayer from 0x857360 to 0x857428 (200 bytes)\n; \n; 6 xrefs:\n; > PlayLayer::setupHasCompleted @ 0x5dc444\n; > LevelEditorLayer::init @ 0x67c9f0\n; > GJBaseGameLayer::asyncGLoaded @ 0x8580d4\n; > GJBaseGameLayer::syncBGTextures @ 0x866a40\n; > LevelSettingsLayer::selectArtClosed @ 0xa34688\n; > <???> @ 0x58998\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_40]!                                ; +0x0, 0x857360\nMOV             X29, SP                                                ; +0x4, 0x857364\nSTR             X21, [SP,#0x40+var_20]                                 ; +0x8, 0x857368\nMOV             W21, W2                                                ; +0xc, 0x85736c\nLDR             X2, [X0,#0x1058]                                       ; +0x10, 0x857370\nSTP             X19, X20, [SP,#0x40+var_30]                            ; +0x14, 0x857374\nMOV             X19, X0                                                ; +0x18, 0x857378\nCBZ             X2, loc_85738C                                         ; +0x1c, 0x85737c\nSTR             X1, [X29,#0x40+var_8]                                  ; +0x20, 0x857380\nBL              _ZN15GJBaseGameLayer17removeGroundLayerEv; GJBaseGameLayer::removeGroundLayer(void) ; +0x24, 0x857384\nLDR             X1, [X29,#0x40+var_8]                                  ; +0x28, 0x857388\nCMP             W1, #0x16                                              ; +0x2c, 0x85738c\nMOV             W20, #0x16                                             ; +0x30, 0x857390\nCSEL            W20, W1, W20, LE                                       ; +0x34, 0x857394\nMOV             W1, W21; int                                           ; +0x38, 0x857398\nMOV             W0, W20; this                                          ; +0x3c, 0x85739c\nBL              _ZN13GJGroundLayer6createEii; GJGroundLayer::create(int,int) ; +0x40, 0x8573a0\nLDR             X2, [X0]                                               ; +0x44, 0x8573a4\nSTR             X0, [X19,#0x1058]                                      ; +0x48, 0x8573a8\nMOV             W1, W20                                                ; +0x4c, 0x8573ac\nLDR             X2, [X2,#0x48]                                         ; +0x50, 0x8573b0\nBLR             X2                                                     ; +0x54, 0x8573b4\nLDR             X3, [X19,#0x1018]                                      ; +0x58, 0x8573b8\nMOV             W2, #0x28 ; '('                                        ; +0x5c, 0x8573bc\nLDR             X1, [X19,#0x1058]                                      ; +0x60, 0x8573c0\nMOV             X0, X3                                                 ; +0x64, 0x8573c4\nLDR             X3, [X3]                                               ; +0x68, 0x8573c8\nLDR             X3, [X3,#0x1C0]                                        ; +0x6c, 0x8573cc\nBLR             X3                                                     ; +0x70, 0x8573d0\nMOV             W1, W21; int                                           ; +0x74, 0x8573d4\nMOV             W0, W20; this                                          ; +0x78, 0x8573d8\nBL              _ZN13GJGroundLayer6createEii; GJGroundLayer::create(int,int) ; +0x7c, 0x8573dc\nSTR             X0, [X19,#0x1060]                                      ; +0x80, 0x8573e0\nLDR             X3, [X19,#0x1018]                                      ; +0x84, 0x8573e4\nMOV             X1, X0                                                 ; +0x88, 0x8573e8\nMOV             W2, #0x28 ; '('                                        ; +0x8c, 0x8573ec\nMOV             X0, X3                                                 ; +0x90, 0x8573f0\nLDR             X3, [X3]                                               ; +0x94, 0x8573f4\nLDR             X3, [X3,#0x1C0]                                        ; +0x98, 0x8573f8\nBLR             X3                                                     ; +0x9c, 0x8573fc\nLDR             X1, [X19,#0x1060]                                      ; +0xa0, 0x857400\nFMOV            S0, #-1.0                                              ; +0xa4, 0x857404\nMOV             X0, X1                                                 ; +0xa8, 0x857408\nLDR             X1, [X1]                                               ; +0xac, 0x85740c\nLDR             X1, [X1,#0x90]                                         ; +0xb0, 0x857410\nBLR             X1                                                     ; +0xb4, 0x857414\nLDR             X21, [SP,#0x40+var_20]                                 ; +0xb8, 0x857418\nLDP             X19, X20, [SP,#0x40+var_30]                            ; +0xbc, 0x85741c\nLDP             X29, X30, [SP+0x40+var_40],#0x40                       ; +0xc0, 0x857420\nRET                                                                    ; +0xc4, 0x857424", "xrefs": ["PlayLayer::setupHasCompleted @ 0x5dc444", "LevelEditorLayer::init @ 0x67c9f0", "GJBaseGameLayer::asyncGLoaded @ 0x8580d4", "GJBaseGameLayer::syncBGTextures @ 0x866a40", "LevelSettingsLayer::selectArtClosed @ 0xa34688", "<???> @ 0x58998"], "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"}