{"type": "func", "start": 4296099200, "end": 4296099286, "name": "GJBaseGameLayer::swapBackground", "pseudocode": "// \n// GJBaseGameLayer::swapBackground from 0x100114580 to 0x1001145d6 (86 bytes)\n// \n// 1 xrefs:\n// > ArtTriggerGameObject::triggerObject @ 0x1001ed60b\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::swapBackground(GJBaseGameLayer *a1, int a2)\n{\n  GameManager *v2; // rax\n\n  a1->m_gameState.m_background = a2;\n  if ( !a1->m_skipArtReload )\n  {\n    if ( GameManager::sharedState()->m_loadedBgID == a2 )\n    {\n      GJBaseGameLayer::createBackground(a1, a2);\n      GJBaseGameLayer::updateLevelColors(a1);\n    }\n    else\n    {\n      v2 = GameManager::sharedState();\n      GameManager::loadBackgroundAsync(v2, a2);\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::swapBackground from 0x100114580 to 0x1001145d6 (86 bytes)\n; \n; 1 xrefs:\n; > ArtTriggerGameObject::triggerObject @ 0x1001ed60b\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    rbp                                                            ; +0x0, 0x100114580\nmov     rbp, rsp                                                       ; +0x1, 0x100114581\npush    r14                                                            ; +0x4, 0x100114584\npush    rbx                                                            ; +0x6, 0x100114586\nmov     [rdi+76Ch], esi                                                ; +0x7, 0x100114587\ncmp     byte ptr [rdi+308Dh], 0                                        ; +0xd, 0x10011458d\njz      short loc_10011459B                                            ; +0x14, 0x100114594\npop     rbx                                                            ; +0x16, 0x100114596\npop     r14                                                            ; +0x17, 0x100114597\npop     rbp                                                            ; +0x19, 0x100114599\nretn                                                                   ; +0x1a, 0x10011459a\nmov     ebx, esi                                                       ; +0x1b, 0x10011459b\nmov     r14, rdi                                                       ; +0x1d, 0x10011459d\ncall    GameManager__sharedState                                       ; +0x20, 0x1001145a0\ncmp     [rax+3A0h], ebx                                                ; +0x25, 0x1001145a5\njnz     short loc_1001145C3                                            ; +0x2b, 0x1001145ab\nmov     rdi, r14                                                       ; +0x2d, 0x1001145ad\nmov     esi, ebx                                                       ; +0x30, 0x1001145b0\ncall    GJBaseGameLayer__createBackground                              ; +0x32, 0x1001145b2\nmov     rdi, r14                                                       ; +0x37, 0x1001145b7\npop     rbx                                                            ; +0x3a, 0x1001145ba\npop     r14                                                            ; +0x3b, 0x1001145bb\npop     rbp                                                            ; +0x3d, 0x1001145bd\njmp     GJBaseGameLayer__updateLevelColors                             ; +0x3e, 0x1001145be\ncall    GameManager__sharedState                                       ; +0x43, 0x1001145c3\nmov     rdi, rax                                                       ; +0x48, 0x1001145c8\nmov     esi, ebx                                                       ; +0x4b, 0x1001145cb\npop     rbx                                                            ; +0x4d, 0x1001145cd\npop     r14                                                            ; +0x4e, 0x1001145ce\npop     rbp                                                            ; +0x50, 0x1001145d0\njmp     GameManager__loadBackgroundAsync                               ; +0x51, 0x1001145d1", "xrefs": ["ArtTriggerGameObject::triggerObject @ 0x1001ed60b"], "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"}