{"type": "func", "start": 4296099328, "end": 4296100012, "name": "GJBaseGameLayer::updateLevelColors", "pseudocode": "// \n// GJBaseGameLayer::updateLevelColors from 0x100114600 to 0x1001148ac (684 bytes)\n// \n// 13 xrefs:\n// > PlayLayer::setupHasCompleted @ 0x1000ae5e6\n// > PlayLayer::setupHasCompleted @ 0x1000ae91c\n// > PlayLayer::postUpdate @ 0x1000baefc\n// > PlayLayer::resetLevel @ 0x1000bebed\n// > PlayLayer::resetLevel @ 0x1000bec46\n// > LevelEditorLayer::updateGameObjects @ 0x1000de754\n// > LevelEditorLayer::onPlaytest @ 0x1000f2926\n// > LevelEditorLayer::postUpdate @ 0x1000f348c\n// > GJBaseGameLayer::swapBackground @ 0x1001145be\n// > GJBaseGameLayer::asyncBGLoaded @ 0x1001145f7\n// > GJBaseGameLayer::asyncGLoaded @ 0x100114909\n// > GJBaseGameLayer::swapMiddleground @ 0x100114ad7\n// > GJBaseGameLayer::asyncMGLoaded @ 0x100114c47\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::updateLevelColors(GJBaseGameLayer *a1)\n{\n  int v1; // eax\n  int v2; // r14d\n  int v3; // eax\n  int v4; // r14d\n  GJGroundLayer *m_groundLayer; // r14\n  bool shouldBlend; // al\n  GJGroundLayer *m_groundLayer2; // r14\n  bool v8; // al\n  GJMGLayer *m_middleground; // r14\n  int v10; // eax\n  GJMGLayer *v11; // r14\n  int v12; // eax\n  GJMGLayer *v13; // r14\n  float v14; // xmm0_4\n  GJMGLayer *v15; // r14\n  float v16; // xmm0_4\n  GJMGLayer *v17; // r14\n  bool v18; // al\n  GJMGLayer *v19; // r14\n  bool v20; // al\n  float v21; // [rsp+4h] [rbp-1Ch]\n  cocos2d::ccColor3B v22; // [rsp+8h] [rbp-18h] BYREF\n  cocos2d::ccColor3B v23[6]; // [rsp+Ch] [rbp-14h] BYREF\n\n  v22 = GJEffectManager::activeColorForIndex(a1->m_effectManager, 1000);\n  ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))a1->m_background->setColor)(a1->m_background, &v22);\n  *(cocos2d::ccColor3B *)&v1 = GJEffectManager::activeColorForIndex(a1->m_effectManager, 1001);\n  v2 = v1;\n  GJGroundLayer::updateGround01Color(a1->m_groundLayer, (cocos2d::ccColor3B)v1);\n  GJGroundLayer::updateGround01Color(a1->m_groundLayer2, (cocos2d::ccColor3B)v2);\n  if ( a1->m_groundLayer->m_ground2Sprite )\n  {\n    *(cocos2d::ccColor3B *)&v3 = GJEffectManager::activeColorForIndex(a1->m_effectManager, 1009);\n    v4 = v3;\n    GJGroundLayer::updateGround02Color(a1->m_groundLayer, (cocos2d::ccColor3B)v3);\n    GJGroundLayer::updateGround02Color(a1->m_groundLayer2, (cocos2d::ccColor3B)v4);\n  }\n  v23[0] = GJEffectManager::activeColorForIndex(a1->m_effectManager, 1002);\n  v21 = GJEffectManager::activeOpacityForIndex(a1->m_effectManager, 1002) * 255.0;\n  ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))a1->m_groundLayer->m_lineSprite->setColor)(\n    a1->m_groundLayer->m_lineSprite,\n    v23);\n  ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::ccColor3B *))a1->m_groundLayer2->m_lineSprite->setColor)(\n    a1->m_groundLayer2->m_lineSprite,\n    v23);\n  ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_groundLayer->m_lineSprite->setOpacity)(\n    a1->m_groundLayer->m_lineSprite,\n    (unsigned __int8)(int)v21);\n  ((void (__fastcall *)(cocos2d::CCSprite *, _QWORD))a1->m_groundLayer2->m_lineSprite->setOpacity)(\n    a1->m_groundLayer2->m_lineSprite,\n    (unsigned __int8)(int)v21);\n  m_groundLayer = a1->m_groundLayer;\n  shouldBlend = GJEffectManager::shouldBlend(a1->m_effectManager, 1002);\n  GJGroundLayer::updateLineBlend(m_groundLayer, shouldBlend);\n  m_groundLayer2 = a1->m_groundLayer2;\n  v8 = GJEffectManager::shouldBlend(a1->m_effectManager, 1002);\n  GJGroundLayer::updateLineBlend(m_groundLayer2, v8);\n  m_middleground = a1->m_middleground;\n  if ( m_middleground )\n  {\n    *(cocos2d::ccColor3B *)&v10 = GJEffectManager::activeColorForIndex(a1->m_effectManager, 1013);\n    GJMGLayer::updateGroundColor(m_middleground, (cocos2d::ccColor3B)v10, 1);\n    v11 = a1->m_middleground;\n    *(cocos2d::ccColor3B *)&v12 = GJEffectManager::activeColorForIndex(a1->m_effectManager, 1014);\n    GJMGLayer::updateGroundColor(v11, (cocos2d::ccColor3B)v12, 0);\n    v13 = a1->m_middleground;\n    v14 = GJEffectManager::activeOpacityForIndex(a1->m_effectManager, 1013);\n    GJMGLayer::updateGroundOpacity(v13, (int)(float)(v14 * 255.0), 1);\n    v15 = a1->m_middleground;\n    v16 = GJEffectManager::activeOpacityForIndex(a1->m_effectManager, 1014);\n    GJMGLayer::updateGroundOpacity(v15, (int)(float)(v16 * 255.0), 0);\n    v17 = a1->m_middleground;\n    v18 = GJEffectManager::shouldBlend(a1->m_effectManager, 1013);\n    GJMGLayer::updateMG01Blend(v17, v18);\n    v19 = a1->m_middleground;\n    v20 = GJEffectManager::shouldBlend(a1->m_effectManager, 1014);\n    GJMGLayer::updateMG02Blend(v19, v20);\n  }\n}", "assembly": "; \n; GJBaseGameLayer::updateLevelColors from 0x100114600 to 0x1001148ac (684 bytes)\n; \n; 13 xrefs:\n; > PlayLayer::setupHasCompleted @ 0x1000ae5e6\n; > PlayLayer::setupHasCompleted @ 0x1000ae91c\n; > PlayLayer::postUpdate @ 0x1000baefc\n; > PlayLayer::resetLevel @ 0x1000bebed\n; > PlayLayer::resetLevel @ 0x1000bec46\n; > LevelEditorLayer::updateGameObjects @ 0x1000de754\n; > LevelEditorLayer::onPlaytest @ 0x1000f2926\n; > LevelEditorLayer::postUpdate @ 0x1000f348c\n; > GJBaseGameLayer::swapBackground @ 0x1001145be\n; > GJBaseGameLayer::asyncBGLoaded @ 0x1001145f7\n; > GJBaseGameLayer::asyncGLoaded @ 0x100114909\n; > GJBaseGameLayer::swapMiddleground @ 0x100114ad7\n; > GJBaseGameLayer::asyncMGLoaded @ 0x100114c47\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, 0x100114600\nmov     rbp, rsp                                                       ; +0x1, 0x100114601\npush    r14                                                            ; +0x4, 0x100114604\npush    rbx                                                            ; +0x6, 0x100114606\nsub     rsp, 10h                                                       ; +0x7, 0x100114607\nmov     rbx, rdi                                                       ; +0xb, 0x10011460b\nmov     rdi, [rdi+850h]                                                ; +0xe, 0x10011460e\nmov     esi, 3E8h                                                      ; +0x15, 0x100114615\ncall    GJEffectManager__activeColorForIndex                           ; +0x1a, 0x10011461a\nmov     [rbp+var_18], ax                                               ; +0x1f, 0x10011461f\nshr     eax, 10h                                                       ; +0x23, 0x100114623\nmov     [rbp+var_16], al                                               ; +0x26, 0x100114626\nmov     rdi, [rbx+0ED0h]                                               ; +0x29, 0x100114629\nmov     rax, [rdi]                                                     ; +0x30, 0x100114630\nlea     rsi, [rbp+var_18]                                              ; +0x33, 0x100114633\ncall    qword ptr [rax+3B0h]                                           ; +0x37, 0x100114637\nmov     rdi, [rbx+850h]                                                ; +0x3d, 0x10011463d\nmov     esi, 3E9h                                                      ; +0x44, 0x100114644\ncall    GJEffectManager__activeColorForIndex                           ; +0x49, 0x100114649\nmov     r14d, eax                                                      ; +0x4e, 0x10011464e\nmov     rdi, [rbx+0EE0h]                                               ; +0x51, 0x100114651\nmov     esi, eax                                                       ; +0x58, 0x100114658\ncall    GJGroundLayer__updateGround01Color                             ; +0x5a, 0x10011465a\nmov     rdi, [rbx+0EE8h]                                               ; +0x5f, 0x10011465f\nmov     esi, r14d                                                      ; +0x66, 0x100114666\ncall    GJGroundLayer__updateGround01Color                             ; +0x69, 0x100114669\nmov     rax, [rbx+0EE0h]                                               ; +0x6e, 0x10011466e\ncmp     qword ptr [rax+1A0h], 0                                        ; +0x75, 0x100114675\njz      short loc_1001146B0                                            ; +0x7d, 0x10011467d\nmov     rdi, [rbx+850h]                                                ; +0x7f, 0x10011467f\nmov     esi, 3F1h                                                      ; +0x86, 0x100114686\ncall    GJEffectManager__activeColorForIndex                           ; +0x8b, 0x10011468b\nmov     r14d, eax                                                      ; +0x90, 0x100114690\nmov     rdi, [rbx+0EE0h]                                               ; +0x93, 0x100114693\nmov     esi, eax                                                       ; +0x9a, 0x10011469a\ncall    GJGroundLayer__updateGround02Color                             ; +0x9c, 0x10011469c\nmov     rdi, [rbx+0EE8h]                                               ; +0xa1, 0x1001146a1\nmov     esi, r14d                                                      ; +0xa8, 0x1001146a8\ncall    GJGroundLayer__updateGround02Color                             ; +0xab, 0x1001146ab\nmov     rdi, [rbx+850h]                                                ; +0xb0, 0x1001146b0\nmov     esi, 3EAh                                                      ; +0xb7, 0x1001146b7\ncall    GJEffectManager__activeColorForIndex                           ; +0xbc, 0x1001146bc\nmov     [rbp+var_14], ax                                               ; +0xc1, 0x1001146c1\nshr     eax, 10h                                                       ; +0xc5, 0x1001146c5\nmov     [rbp+var_12], al                                               ; +0xc8, 0x1001146c8\nmov     rdi, [rbx+850h]                                                ; +0xcb, 0x1001146cb\nmov     esi, 3EAh                                                      ; +0xd2, 0x1001146d2\ncall    GJEffectManager__activeOpacityForIndex                         ; +0xd7, 0x1001146d7\nmulss   xmm0, cs:dword_100815C10                                       ; +0xdc, 0x1001146dc\nmovss   [rbp+var_1C], xmm0                                             ; +0xe4, 0x1001146e4\nmov     rax, [rbx+0EE0h]                                               ; +0xe9, 0x1001146e9\nmov     rdi, [rax+1B0h]                                                ; +0xf0, 0x1001146f0\nmov     rax, [rdi]                                                     ; +0xf7, 0x1001146f7\nlea     r14, [rbp+var_14]                                              ; +0xfa, 0x1001146fa\nmov     rsi, r14                                                       ; +0xfe, 0x1001146fe\ncall    qword ptr [rax+3B0h]                                           ; +0x101, 0x100114701\nmov     rax, [rbx+0EE8h]                                               ; +0x107, 0x100114707\nmov     rdi, [rax+1B0h]                                                ; +0x10e, 0x10011470e\nmov     rax, [rdi]                                                     ; +0x115, 0x100114715\nmov     rsi, r14                                                       ; +0x118, 0x100114718\ncall    qword ptr [rax+3B0h]                                           ; +0x11b, 0x10011471b\nmov     rax, [rbx+0EE0h]                                               ; +0x121, 0x100114721\nmov     rdi, [rax+1B0h]                                                ; +0x128, 0x100114728\ncvttss2si eax, [rbp+var_1C]                                            ; +0x12f, 0x10011472f\nmov     rcx, [rdi]                                                     ; +0x134, 0x100114734\nmovzx   r14d, al                                                       ; +0x137, 0x100114737\nmov     esi, r14d                                                      ; +0x13b, 0x10011473b\ncall    qword ptr [rcx+380h]                                           ; +0x13e, 0x10011473e\nmov     rax, [rbx+0EE8h]                                               ; +0x144, 0x100114744\nmov     rdi, [rax+1B0h]                                                ; +0x14b, 0x10011474b\nmov     rax, [rdi]                                                     ; +0x152, 0x100114752\nmov     esi, r14d                                                      ; +0x155, 0x100114755\ncall    qword ptr [rax+380h]                                           ; +0x158, 0x100114758\nmov     r14, [rbx+0EE0h]                                               ; +0x15e, 0x10011475e\nmov     rdi, [rbx+850h]                                                ; +0x165, 0x100114765\nmov     esi, 3EAh                                                      ; +0x16c, 0x10011476c\ncall    GJEffectManager__shouldBlend                                   ; +0x171, 0x100114771\nmovzx   esi, al                                                        ; +0x176, 0x100114776\nmov     rdi, r14                                                       ; +0x179, 0x100114779\ncall    GJGroundLayer__updateLineBlend                                 ; +0x17c, 0x10011477c\nmov     r14, [rbx+0EE8h]                                               ; +0x181, 0x100114781\nmov     rdi, [rbx+850h]                                                ; +0x188, 0x100114788\nmov     esi, 3EAh                                                      ; +0x18f, 0x10011478f\ncall    GJEffectManager__shouldBlend                                   ; +0x194, 0x100114794\nmovzx   esi, al                                                        ; +0x199, 0x100114799\nmov     rdi, r14                                                       ; +0x19c, 0x10011479c\ncall    GJGroundLayer__updateLineBlend                                 ; +0x19f, 0x10011479f\nmov     r14, [rbx+0EF0h]                                               ; +0x1a4, 0x1001147a4\ntest    r14, r14                                                       ; +0x1ab, 0x1001147ab\njz      loc_1001148A3                                                  ; +0x1ae, 0x1001147ae\nmov     rdi, [rbx+850h]                                                ; +0x1b4, 0x1001147b4\nmov     esi, 3F5h                                                      ; +0x1bb, 0x1001147bb\ncall    GJEffectManager__activeColorForIndex                           ; +0x1c0, 0x1001147c0\nmov     rdi, r14                                                       ; +0x1c5, 0x1001147c5\nmov     esi, eax                                                       ; +0x1c8, 0x1001147c8\nmov     edx, 1                                                         ; +0x1ca, 0x1001147ca\ncall    GJMGLayer__updateGroundColor                                   ; +0x1cf, 0x1001147cf\nmov     r14, [rbx+0EF0h]                                               ; +0x1d4, 0x1001147d4\nmov     rdi, [rbx+850h]                                                ; +0x1db, 0x1001147db\nmov     esi, 3F6h                                                      ; +0x1e2, 0x1001147e2\ncall    GJEffectManager__activeColorForIndex                           ; +0x1e7, 0x1001147e7\nmov     rdi, r14                                                       ; +0x1ec, 0x1001147ec\nmov     esi, eax                                                       ; +0x1ef, 0x1001147ef\nxor     edx, edx                                                       ; +0x1f1, 0x1001147f1\ncall    GJMGLayer__updateGroundColor                                   ; +0x1f3, 0x1001147f3\nmov     r14, [rbx+0EF0h]                                               ; +0x1f8, 0x1001147f8\nmov     rdi, [rbx+850h]                                                ; +0x1ff, 0x1001147ff\nmov     esi, 3F5h                                                      ; +0x206, 0x100114806\ncall    GJEffectManager__activeOpacityForIndex                         ; +0x20b, 0x10011480b\nmulss   xmm0, cs:dword_100815C10                                       ; +0x210, 0x100114810\ncvttss2si eax, xmm0                                                    ; +0x218, 0x100114818\nmovzx   esi, al                                                        ; +0x21c, 0x10011481c\nmov     rdi, r14                                                       ; +0x21f, 0x10011481f\nmov     edx, 1                                                         ; +0x222, 0x100114822\ncall    GJMGLayer__updateGroundOpacity                                 ; +0x227, 0x100114827\nmov     r14, [rbx+0EF0h]                                               ; +0x22c, 0x10011482c\nmov     rdi, [rbx+850h]                                                ; +0x233, 0x100114833\nmov     esi, 3F6h                                                      ; +0x23a, 0x10011483a\ncall    GJEffectManager__activeOpacityForIndex                         ; +0x23f, 0x10011483f\nmulss   xmm0, cs:dword_100815C10                                       ; +0x244, 0x100114844\ncvttss2si eax, xmm0                                                    ; +0x24c, 0x10011484c\nmovzx   esi, al                                                        ; +0x250, 0x100114850\nmov     rdi, r14                                                       ; +0x253, 0x100114853\nxor     edx, edx                                                       ; +0x256, 0x100114856\ncall    GJMGLayer__updateGroundOpacity                                 ; +0x258, 0x100114858\nmov     r14, [rbx+0EF0h]                                               ; +0x25d, 0x10011485d\nmov     rdi, [rbx+850h]                                                ; +0x264, 0x100114864\nmov     esi, 3F5h                                                      ; +0x26b, 0x10011486b\ncall    GJEffectManager__shouldBlend                                   ; +0x270, 0x100114870\nmovzx   esi, al                                                        ; +0x275, 0x100114875\nmov     rdi, r14                                                       ; +0x278, 0x100114878\ncall    GJMGLayer__updateMG01Blend                                     ; +0x27b, 0x10011487b\nmov     r14, [rbx+0EF0h]                                               ; +0x280, 0x100114880\nmov     rdi, [rbx+850h]                                                ; +0x287, 0x100114887\nmov     esi, 3F6h                                                      ; +0x28e, 0x10011488e\ncall    GJEffectManager__shouldBlend                                   ; +0x293, 0x100114893\nmovzx   esi, al                                                        ; +0x298, 0x100114898\nmov     rdi, r14                                                       ; +0x29b, 0x10011489b\ncall    GJMGLayer__updateMG02Blend                                     ; +0x29e, 0x10011489e\nadd     rsp, 10h                                                       ; +0x2a3, 0x1001148a3\npop     rbx                                                            ; +0x2a7, 0x1001148a7\npop     r14                                                            ; +0x2a8, 0x1001148a8\npop     rbp                                                            ; +0x2aa, 0x1001148aa\nretn                                                                   ; +0x2ab, 0x1001148ab", "xrefs": ["PlayLayer::setupHasCompleted @ 0x1000ae5e6", "PlayLayer::setupHasCompleted @ 0x1000ae91c", "PlayLayer::postUpdate @ 0x1000baefc", "PlayLayer::resetLevel @ 0x1000bebed", "PlayLayer::resetLevel @ 0x1000bec46", "LevelEditorLayer::updateGameObjects @ 0x1000de754", "LevelEditorLayer::onPlaytest @ 0x1000f2926", "LevelEditorLayer::postUpdate @ 0x1000f348c", "GJBaseGameLayer::swapBackground @ 0x1001145be", "GJBaseGameLayer::asyncBGLoaded @ 0x1001145f7", "GJBaseGameLayer::asyncGLoaded @ 0x100114909", "GJBaseGameLayer::swapMiddleground @ 0x100114ad7", "GJBaseGameLayer::asyncMGLoaded @ 0x100114c47"], "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"}