{"type": "func", "start": 4296925484, "end": 4296925696, "name": "GJBaseGameLayer::createGroundLayer", "pseudocode": "// \n// GJBaseGameLayer::createGroundLayer from 0x1001de12c to 0x1001de200 (212 bytes)\n// \n// 5 xrefs:\n// > PlayLayer::setupHasCompleted @ 0x100116a80\n// > LevelSettingsLayer::selectArtClosed @ 0x10017c270\n// > GJBaseGameLayer::asyncGLoaded @ 0x1001de118\n// > GJBaseGameLayer::syncBGTextures @ 0x1002021b0\n// > LevelEditorLayer::init @ 0x100357594\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 __fastcall GJBaseGameLayer::createGroundLayer(GJBaseGameLayer *a1, int a2, int a3)\n{\n  __int64 v4; // x21\n  GJGroundLayer *m_groundLayer; // x0\n  GJGroundLayer *v7; // x0\n  GJGroundLayer *v8; // x0\n\n  LODWORD(v4) = a2;\n  m_groundLayer = a1->m_groundLayer;\n  if ( m_groundLayer )\n  {\n    ((void (__fastcall *)(GJGroundLayer *))m_groundLayer->removeFromParent)(m_groundLayer);\n    a1->m_groundLayer = nullptr;\n    ((void (__fastcall *)(GJGroundLayer *))a1->m_groundLayer2->removeFromParent)(a1->m_groundLayer2);\n    a1->m_groundLayer2 = nullptr;\n  }\n  if ( (int)v4 >= 22 )\n    v4 = 22;\n  else\n    v4 = (unsigned int)v4;\n  v7 = GJGroundLayer::create(v4, a3);\n  a1->m_groundLayer = v7;\n  ((void (__fastcall *)(GJGroundLayer *, __int64))v7->setTag)(v7, v4);\n  ((void (__fastcall *)(cocos2d::CCNode *, GJGroundLayer *, __int64))a1->m_objectParent->addChild_0)(\n    a1->m_objectParent,\n    a1->m_groundLayer,\n    40);\n  v8 = GJGroundLayer::create(v4, a3);\n  a1->m_groundLayer2 = v8;\n  ((void (__fastcall *)(cocos2d::CCNode *, GJGroundLayer *, __int64))a1->m_objectParent->addChild_0)(\n    a1->m_objectParent,\n    v8,\n    40);\n  ((void (__fastcall *)(GJGroundLayer *, float))a1->m_groundLayer2->setScaleY)(a1->m_groundLayer2, -1.0);\n}", "assembly": "; \n; GJBaseGameLayer::createGroundLayer from 0x1001de12c to 0x1001de200 (212 bytes)\n; \n; 5 xrefs:\n; > PlayLayer::setupHasCompleted @ 0x100116a80\n; > LevelSettingsLayer::selectArtClosed @ 0x10017c270\n; > GJBaseGameLayer::asyncGLoaded @ 0x1001de118\n; > GJBaseGameLayer::syncBGTextures @ 0x1002021b0\n; > LevelEditorLayer::init @ 0x100357594\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             X22, X21, [SP,#-0x10+var_20]!                          ; +0x0, 0x1001de12c\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1001de130\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x1001de134\nADD             X29, SP, #0x20                                         ; +0xc, 0x1001de138\nMOV             X20, X2                                                ; +0x10, 0x1001de13c\nMOV             X21, X1                                                ; +0x14, 0x1001de140\nMOV             X19, X0                                                ; +0x18, 0x1001de144\nLDR             X0, [X0,#0xF08]                                        ; +0x1c, 0x1001de148\nCBZ             X0, loc_1001DE174                                      ; +0x20, 0x1001de14c\nLDR             X8, [X0]                                               ; +0x24, 0x1001de150\nLDR             X8, [X8,#0x1F8]                                        ; +0x28, 0x1001de154\nBLR             X8                                                     ; +0x2c, 0x1001de158\nSTR             XZR, [X19,#0xF08]                                      ; +0x30, 0x1001de15c\nLDR             X0, [X19,#0xF10]                                       ; +0x34, 0x1001de160\nLDR             X8, [X0]                                               ; +0x38, 0x1001de164\nLDR             X8, [X8,#0x1F8]                                        ; +0x3c, 0x1001de168\nBLR             X8                                                     ; +0x40, 0x1001de16c\nSTR             XZR, [X19,#0xF10]                                      ; +0x44, 0x1001de170\nCMP             W21, #0x16                                             ; +0x48, 0x1001de174\nMOV             W8, #0x16                                              ; +0x4c, 0x1001de178\nCSEL            W21, W21, W8, LT                                       ; +0x50, 0x1001de17c\nMOV             X0, X21                                                ; +0x54, 0x1001de180\nMOV             X1, X20                                                ; +0x58, 0x1001de184\nBL              GJGroundLayer__create                                  ; +0x5c, 0x1001de188\nSTR             X0, [X19,#0xF08]                                       ; +0x60, 0x1001de18c\nLDR             X8, [X0]                                               ; +0x64, 0x1001de190\nLDR             X8, [X8,#0x48]                                         ; +0x68, 0x1001de194\nMOV             X1, X21                                                ; +0x6c, 0x1001de198\nBLR             X8                                                     ; +0x70, 0x1001de19c\nLDR             X0, [X19,#0xEC8]                                       ; +0x74, 0x1001de1a0\nLDR             X1, [X19,#0xF08]                                       ; +0x78, 0x1001de1a4\nLDR             X8, [X0]                                               ; +0x7c, 0x1001de1a8\nLDR             X8, [X8,#0x1C0]                                        ; +0x80, 0x1001de1ac\nMOV             W2, #0x28 ; '('                                        ; +0x84, 0x1001de1b0\nBLR             X8                                                     ; +0x88, 0x1001de1b4\nMOV             X0, X21                                                ; +0x8c, 0x1001de1b8\nMOV             X1, X20                                                ; +0x90, 0x1001de1bc\nBL              GJGroundLayer__create                                  ; +0x94, 0x1001de1c0\nMOV             X1, X0                                                 ; +0x98, 0x1001de1c4\nSTR             X0, [X19,#0xF10]                                       ; +0x9c, 0x1001de1c8\nLDR             X0, [X19,#0xEC8]                                       ; +0xa0, 0x1001de1cc\nLDR             X8, [X0]                                               ; +0xa4, 0x1001de1d0\nLDR             X8, [X8,#0x1C0]                                        ; +0xa8, 0x1001de1d4\nMOV             W2, #0x28 ; '('                                        ; +0xac, 0x1001de1d8\nBLR             X8                                                     ; +0xb0, 0x1001de1dc\nLDR             X0, [X19,#0xF10]                                       ; +0xb4, 0x1001de1e0\nLDR             X8, [X0]                                               ; +0xb8, 0x1001de1e4\nLDR             X1, [X8,#0x90]                                         ; +0xbc, 0x1001de1e8\nFMOV            S0, #-1.0                                              ; +0xc0, 0x1001de1ec\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xc4, 0x1001de1f0\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xc8, 0x1001de1f4\nLDP             X22, X21, [SP+0x20+var_20],#0x30                       ; +0xcc, 0x1001de1f8\nBR              X1                                                     ; +0xd0, 0x1001de1fc", "xrefs": ["PlayLayer::setupHasCompleted @ 0x100116a80", "LevelSettingsLayer::selectArtClosed @ 0x10017c270", "GJBaseGameLayer::asyncGLoaded @ 0x1001de118", "GJBaseGameLayer::syncBGTextures @ 0x1002021b0", "LevelEditorLayer::init @ 0x100357594"], "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"}