{"type": "func", "start": 4681476, "end": 4681590, "name": "GJBaseGameLayer::syncBGTextures", "pseudocode": "// \n// GJBaseGameLayer::syncBGTextures from 0x476f04 to 0x476f76 (114 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::resetLevel @ 0x31fe34\n// > LevelEditorLayer::onStopPlaytest @ 0x369264\n// > LevelEditorLayer::onPlaytest @ 0x36ec54\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::syncBGTextures(GJBaseGameLayer *a1)\n{\n  int v2; // r0\n  int m_background; // r1\n  int v4; // r0\n  int m_ground; // r1\n  GJMGLayer *m_middleground; // r0\n\n  v2 = a1->m_background->getTag(a1->m_background);\n  m_background = a1->m_gameState.m_background;\n  if ( v2 != m_background )\n    GJBaseGameLayer::createBackground(a1, m_background);\n  v4 = a1->m_groundLayer->getTag(a1->m_groundLayer);\n  m_ground = a1->m_gameState.m_ground;\n  if ( v4 != m_ground )\n    GJBaseGameLayer::createGroundLayer(a1, m_ground, a1->m_levelSettings->m_groundLineIndex);\n  m_middleground = a1->m_middleground;\n  if ( m_middleground && m_middleground->getTag(m_middleground) != a1->m_gameState.m_middleground\n    || !a1->m_middleground && a1->m_gameState.m_middleground > 0 )\n  {\n    GJBaseGameLayer::createMiddleground(a1, a1->m_gameState.m_middleground);\n  }\n}", "assembly": "; \n; GJBaseGameLayer::syncBGTextures from 0x476f04 to 0x476f76 (114 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::resetLevel @ 0x31fe34\n; > LevelEditorLayer::onStopPlaytest @ 0x369264\n; > LevelEditorLayer::onPlaytest @ 0x36ec54\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\nPUSH            {R4,LR}                                                ; +0x0, 0x476f04\nMOV             R4, R0                                                 ; +0x2, 0x476f06\nLDR.W           R0, [R0,#0x9FC]                                        ; +0x4, 0x476f08\nLDR             R3, [R0]                                               ; +0x8, 0x476f0c\nLDR             R3, [R3,#0x20]                                         ; +0xa, 0x476f0e\nBLX             R3                                                     ; +0xc, 0x476f10\nLDR.W           R1, [R4,#0x5E4]; int                                   ; +0xe, 0x476f12\nCMP             R0, R1                                                 ; +0x12, 0x476f16\nBEQ             loc_476F20                                             ; +0x14, 0x476f18\nMOV             R0, R4; this                                           ; +0x16, 0x476f1a\nBL              _ZN15GJBaseGameLayer16createBackgroundEi; GJBaseGameLayer::createBackground(int) ; +0x18, 0x476f1c\nLDR.W           R0, [R4,#0xA04]                                        ; +0x1c, 0x476f20\nLDR             R3, [R0]                                               ; +0x20, 0x476f24\nLDR             R3, [R3,#0x20]                                         ; +0x22, 0x476f26\nBLX             R3                                                     ; +0x24, 0x476f28\nLDR.W           R1, [R4,#0x5E8]; int                                   ; +0x26, 0x476f2a\nCMP             R0, R1                                                 ; +0x2a, 0x476f2e\nBEQ             loc_476F40                                             ; +0x2c, 0x476f30\nLDR.W           R3, [R4,#0x8C0]                                        ; +0x2e, 0x476f32\nMOV             R0, R4; this                                           ; +0x32, 0x476f36\nLDR.W           R2, [R3,#0x150]; int                                   ; +0x34, 0x476f38\nBL              _ZN15GJBaseGameLayer17createGroundLayerEii; GJBaseGameLayer::createGroundLayer(int,int) ; +0x38, 0x476f3c\nLDR.W           R0, [R4,#0xA0C]                                        ; +0x3c, 0x476f40\nCBNZ            R0, loc_476F4E                                         ; +0x40, 0x476f44\nLDR.W           R3, [R4,#0xA0C]                                        ; +0x42, 0x476f46\nCBNZ            R3, locret_476F74                                      ; +0x46, 0x476f4a\nB               loc_476F5E                                             ; +0x48, 0x476f4c\nLDR             R3, [R0]                                               ; +0x4a, 0x476f4e\nLDR             R3, [R3,#0x20]                                         ; +0x4c, 0x476f50\nBLX             R3                                                     ; +0x4e, 0x476f52\nLDR.W           R3, [R4,#0x5EC]                                        ; +0x50, 0x476f54\nCMP             R0, R3                                                 ; +0x54, 0x476f58\nBNE             loc_476F66                                             ; +0x56, 0x476f5a\nB               loc_476F46                                             ; +0x58, 0x476f5c\nLDR.W           R3, [R4,#0x5EC]                                        ; +0x5a, 0x476f5e\nCMP             R3, #0                                                 ; +0x5e, 0x476f62\nBLE             locret_476F74                                          ; +0x60, 0x476f64\nMOV             R0, R4; this                                           ; +0x62, 0x476f66\nLDR.W           R1, [R4,#0x5EC]; int                                   ; +0x64, 0x476f68\nPOP.W           {R4,LR}                                                ; +0x68, 0x476f6c\nB.W             _ZN15GJBaseGameLayer18createMiddlegroundEi; GJBaseGameLayer::createMiddleground(int) ; +0x6c, 0x476f70\nPOP             {R4,PC}                                                ; +0x70, 0x476f74", "xrefs": ["PlayLayer::resetLevel @ 0x31fe34", "LevelEditorLayer::onStopPlaytest @ 0x369264", "LevelEditorLayer::onPlaytest @ 0x36ec54"], "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"}