{"type": "func", "start": 4692328, "end": 4692744, "name": "GJBaseGameLayer::visitWithColorFlash", "pseudocode": "// \n// GJBaseGameLayer::visitWithColorFlash from 0x479968 to 0x479b08 (416 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::visit @ 0x47a502\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::visitWithColorFlash(GJBaseGameLayer *a1)\n{\n  int v2; // r0\n  GLubyte v3; // r3\n  GJEffectManager *m_effectManager; // r0\n  int v5; // r0\n  char v6; // r3\n  GJEffectManager *v7; // r0\n  int v8; // r0\n  int v9; // r0\n  int v10; // r0\n  int v11; // r0\n  bool v12; // [sp+0h] [bp-20h]\n  bool v13; // [sp+1h] [bp-1Fh]\n  __int16 v14; // [sp+2h] [bp-1Eh]\n  cocos2d::ccColor3B v15; // [sp+4h] [bp-1Ch] BYREF\n  int v16; // [sp+8h] [bp-18h] BYREF\n  int v17; // [sp+Ch] [bp-14h] BYREF\n  __int16 v18; // [sp+10h] [bp-10h] BYREF\n  char v19; // [sp+12h] [bp-Eh]\n  int v20; // [sp+14h] [bp-Ch]\n  int v21; // [sp+18h] [bp-8h]\n  cocos2d::ccHSVValue v22; // 0:kr00_16.16\n  cocos2d::ccHSVValue v23; // 0:r1.12,12:^0.4\n\n  *(cocos2d::ccColor3B *)&v2 = GJEffectManager::activeColorForIndex(a1->m_effectManager, 1000);\n  v3 = BYTE1(v2);\n  v15.r = v2;\n  v15.b = BYTE2(v2);\n  m_effectManager = a1->m_effectManager;\n  v15.g = v3;\n  *(cocos2d::ccColor3B *)&v5 = GJEffectManager::activeColorForIndex(m_effectManager, 1001);\n  v6 = BYTE1(v5);\n  LOBYTE(v16) = v5;\n  BYTE2(v16) = BYTE2(v5);\n  v7 = a1->m_effectManager;\n  BYTE1(v16) = v6;\n  *(cocos2d::ccColor3B *)&v8 = GJEffectManager::activeColorForIndex(v7, 1009);\n  LOWORD(v17) = v8;\n  BYTE2(v17) = BYTE2(v8);\n  v22.h = 0.0;\n  v22.s = -0.2;\n  v22.v = 0.2;\n  v22.absoluteSaturation = v12;\n  v22.absoluteBrightness = v13;\n  *(_WORD *)v22.__pad = v14;\n  *(cocos2d::ccColor3B *)&v9 = GameToolbox::transformColor(&v15, v22);\n  v18 = v9;\n  v19 = BYTE2(v9);\n  if ( (_BYTE)v16 || __PAIR16__(BYTE1(v16), 0) != BYTE2(v16) )\n  {\n    v23.v = 0.2;\n    v23.h = 0.0;\n    v23.s = -0.2;\n    *(cocos2d::ccColor3B *)&v10 = GameToolbox::transformColor((const cocos2d::ccColor3B *)&v16, v23);\n    LOWORD(v20) = v10;\n    BYTE2(v20) = BYTE2(v10);\n  }\n  else\n  {\n    LOWORD(v20) = v16;\n    BYTE2(v20) = 0;\n  }\n  if ( (_BYTE)v17 || __PAIR16__(BYTE1(v17), 0) != BYTE2(v17) )\n  {\n    v23.v = 0.2;\n    v23.h = 0.0;\n    v23.s = -0.2;\n    *(cocos2d::ccColor3B *)&v11 = GameToolbox::transformColor((const cocos2d::ccColor3B *)&v17, v23);\n    LOWORD(v21) = v11;\n    BYTE2(v21) = BYTE2(v11);\n  }\n  else\n  {\n    LOWORD(v21) = v17;\n    BYTE2(v21) = 0;\n  }\n  a1->m_background->setColor(a1->m_background, (const cocos2d::ccColor3B *)&v18);\n  GJGroundLayer::updateGround01Color(a1->m_groundLayer, (cocos2d::ccColor3B)v20);\n  GJGroundLayer::updateGround01Color(a1->m_groundLayer2, (cocos2d::ccColor3B)v20);\n  GJGroundLayer::updateGround02Color(a1->m_groundLayer, (cocos2d::ccColor3B)v21);\n  GJGroundLayer::updateGround02Color(a1->m_groundLayer2, (cocos2d::ccColor3B)v21);\n  cocos2d::CCNode::visit(a1);\n  a1->m_background->setColor(a1->m_background, &v15);\n  GJGroundLayer::updateGround01Color(a1->m_groundLayer, (cocos2d::ccColor3B)v16);\n  GJGroundLayer::updateGround01Color(a1->m_groundLayer2, (cocos2d::ccColor3B)v16);\n  GJGroundLayer::updateGround02Color(a1->m_groundLayer, (cocos2d::ccColor3B)v17);\n  GJGroundLayer::updateGround02Color(a1->m_groundLayer2, (cocos2d::ccColor3B)v17);\n}", "assembly": "; \n; GJBaseGameLayer::visitWithColorFlash from 0x479968 to 0x479b08 (416 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::visit @ 0x47a502\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-R6,LR}                                             ; +0x0, 0x479968\nSUB             SP, SP, #0x20                                          ; +0x2, 0x47996a\nLDR             R5, =(__stack_chk_guard_ptr - 0x47997C)                ; +0x4, 0x47996c\nMOV             R4, R0                                                 ; +0x6, 0x47996e\nMOV.W           R1, #0x3E8; int                                        ; +0x8, 0x479970\nLDR.W           R0, [R0,#0x690]; this                                  ; +0xc, 0x479974\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0x10, 0x479978\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x12, 0x47997a\nADD             R6, SP, #0x20+var_1C                                   ; +0x14, 0x47997c\nLDR             R3, [R5]                                               ; +0x16, 0x47997e\nSTR             R3, [SP,#0x20+var_4]                                   ; +0x18, 0x479980\nBL              _ZN15GJEffectManager19activeColorForIndexEi; GJEffectManager::activeColorForIndex(int) ; +0x1a, 0x479982\nMOVW            R1, #0x3E9; int                                        ; +0x1e, 0x479986\nUBFX.W          R3, R0, #8, #8                                         ; +0x22, 0x47998a\nSTRB.W          R0, [SP,#0x20+var_1C]                                  ; +0x26, 0x47998e\nUBFX.W          R0, R0, #0x10, #8                                      ; +0x2a, 0x479992\nSTRB.W          R0, [SP,#0x20+var_1A]                                  ; +0x2e, 0x479996\nLDR.W           R0, [R4,#0x690]; this                                  ; +0x32, 0x47999a\nSTRB.W          R3, [SP,#0x20+var_1B]                                  ; +0x36, 0x47999e\nBL              _ZN15GJEffectManager19activeColorForIndexEi; GJEffectManager::activeColorForIndex(int) ; +0x3a, 0x4799a2\nMOVW            R1, #0x3F1; int                                        ; +0x3e, 0x4799a6\nUBFX.W          R3, R0, #8, #8                                         ; +0x42, 0x4799aa\nSTRB.W          R0, [SP,#0x20+var_18]                                  ; +0x46, 0x4799ae\nUBFX.W          R0, R0, #0x10, #8                                      ; +0x4a, 0x4799b2\nSTRB.W          R0, [SP,#0x20+var_18+2]                                ; +0x4e, 0x4799b6\nLDR.W           R0, [R4,#0x690]; this                                  ; +0x52, 0x4799ba\nSTRB.W          R3, [SP,#0x20+var_18+1]                                ; +0x56, 0x4799be\nBL              _ZN15GJEffectManager19activeColorForIndexEi; GJEffectManager::activeColorForIndex(int) ; +0x5a, 0x4799c2\nMOVS            R1, #0                                                 ; +0x5e, 0x4799c6\nLDR             R2, =0xBE4CCCCD                                        ; +0x60, 0x4799c8\nUBFX.W          R3, R0, #8, #8                                         ; +0x62, 0x4799ca\nSTRB.W          R0, [SP,#0x20+var_14]                                  ; +0x66, 0x4799ce\nSTRB.W          R3, [SP,#0x20+var_14+1]                                ; +0x6a, 0x4799d2\nUBFX.W          R0, R0, #0x10, #8                                      ; +0x6e, 0x4799d6\nLDR             R3, =0x3E4CCCCD                                        ; +0x72, 0x4799da\nSTRB.W          R0, [SP,#0x20+var_14+2]                                ; +0x74, 0x4799dc\nMOV             R0, R6                                                 ; +0x78, 0x4799e0\nBL              _ZN11GameToolbox14transformColorERKN7cocos2d10_ccColor3BEfff; GameToolbox::transformColor(cocos2d::_ccColor3B const&,float,float,float) ; +0x7a, 0x4799e2\nUBFX.W          R3, R0, #8, #8                                         ; +0x7e, 0x4799e6\nSTRB.W          R3, [SP,#0x20+var_F]                                   ; +0x82, 0x4799ea\nLDRB.W          R3, [SP,#0x20+var_18]                                  ; +0x86, 0x4799ee\nSTRB.W          R0, [SP,#0x20+var_10]                                  ; +0x8a, 0x4799f2\nUBFX.W          R0, R0, #0x10, #8                                      ; +0x8e, 0x4799f6\nSTRB.W          R0, [SP,#0x20+var_E]                                   ; +0x92, 0x4799fa\nCMP             R3, #0                                                 ; +0x96, 0x4799fe\nBNE             loc_479AC0                                             ; +0x98, 0x479a00\nLDRB.W          R3, [SP,#0x20+var_18+1]                                ; +0x9a, 0x479a02\nCMP             R3, #0                                                 ; +0x9e, 0x479a06\nBNE             loc_479AC0                                             ; +0xa0, 0x479a08\nLDRB.W          R3, [SP,#0x20+var_18+2]                                ; +0xa2, 0x479a0a\nCMP             R3, #0                                                 ; +0xa6, 0x479a0e\nBNE             loc_479AC0                                             ; +0xa8, 0x479a10\nLDR             R3, [SP,#0x20+var_18]                                  ; +0xaa, 0x479a12\nSTRH.W          R3, [SP,#0x20+var_C]                                   ; +0xac, 0x479a14\nLSRS            R3, R3, #0x10                                          ; +0xb0, 0x479a18\nSTRB.W          R3, [SP,#0x20+var_C+2]                                 ; +0xb2, 0x479a1a\nLDRB.W          R3, [SP,#0x20+var_14]                                  ; +0xb6, 0x479a1e\nCMP             R3, #0                                                 ; +0xba, 0x479a22\nBNE             loc_479AE2                                             ; +0xbc, 0x479a24\nLDRB.W          R3, [SP,#0x20+var_14+1]                                ; +0xbe, 0x479a26\nCMP             R3, #0                                                 ; +0xc2, 0x479a2a\nBNE             loc_479AE2                                             ; +0xc4, 0x479a2c\nLDRB.W          R3, [SP,#0x20+var_14+2]                                ; +0xc6, 0x479a2e\nCMP             R3, #0                                                 ; +0xca, 0x479a32\nBNE             loc_479AE2                                             ; +0xcc, 0x479a34\nLDR             R3, [SP,#0x20+var_14]                                  ; +0xce, 0x479a36\nSTRH.W          R3, [SP,#0x20+var_8]                                   ; +0xd0, 0x479a38\nLSRS            R3, R3, #0x10                                          ; +0xd4, 0x479a3c\nSTRB.W          R3, [SP,#0x20+var_8+2]                                 ; +0xd6, 0x479a3e\nLDR.W           R0, [R4,#0x9FC]                                        ; +0xda, 0x479a42\nADD             R1, SP, #0x20+var_10                                   ; +0xde, 0x479a46\nLDR             R3, [R0]                                               ; +0xe0, 0x479a48\nLDR.W           R3, [R3,#0x1D8]                                        ; +0xe2, 0x479a4a\nBLX             R3                                                     ; +0xe6, 0x479a4e\nLDR.W           R0, [R4,#0xA04]                                        ; +0xe8, 0x479a50\nLDR             R1, [SP,#0x20+var_C]                                   ; +0xec, 0x479a54\nBL              _ZN13GJGroundLayer19updateGround01ColorEN7cocos2d10_ccColor3BE; GJGroundLayer::updateGround01Color(cocos2d::_ccColor3B) ; +0xee, 0x479a56\nLDR.W           R0, [R4,#0xA08]                                        ; +0xf2, 0x479a5a\nLDR             R1, [SP,#0x20+var_C]                                   ; +0xf6, 0x479a5e\nBL              _ZN13GJGroundLayer19updateGround01ColorEN7cocos2d10_ccColor3BE; GJGroundLayer::updateGround01Color(cocos2d::_ccColor3B) ; +0xf8, 0x479a60\nLDR.W           R0, [R4,#0xA04]                                        ; +0xfc, 0x479a64\nLDR             R1, [SP,#0x20+var_8]                                   ; +0x100, 0x479a68\nBL              _ZN13GJGroundLayer19updateGround02ColorEN7cocos2d10_ccColor3BE; GJGroundLayer::updateGround02Color(cocos2d::_ccColor3B) ; +0x102, 0x479a6a\nLDR             R1, [SP,#0x20+var_8]                                   ; +0x106, 0x479a6e\nLDR.W           R0, [R4,#0xA08]                                        ; +0x108, 0x479a70\nBL              _ZN13GJGroundLayer19updateGround02ColorEN7cocos2d10_ccColor3BE; GJGroundLayer::updateGround02Color(cocos2d::_ccColor3B) ; +0x10c, 0x479a74\nMOV             R0, R4; this                                           ; +0x110, 0x479a78\nBL              _ZN7cocos2d6CCNode5visitEv; cocos2d::CCNode::visit(void) ; +0x112, 0x479a7a\nLDR.W           R0, [R4,#0x9FC]                                        ; +0x116, 0x479a7e\nMOV             R1, R6                                                 ; +0x11a, 0x479a82\nLDR             R3, [R0]                                               ; +0x11c, 0x479a84\nLDR.W           R3, [R3,#0x1D8]                                        ; +0x11e, 0x479a86\nBLX             R3                                                     ; +0x122, 0x479a8a\nLDR.W           R0, [R4,#0xA04]                                        ; +0x124, 0x479a8c\nLDR             R1, [SP,#0x20+var_18]                                  ; +0x128, 0x479a90\nBL              _ZN13GJGroundLayer19updateGround01ColorEN7cocos2d10_ccColor3BE; GJGroundLayer::updateGround01Color(cocos2d::_ccColor3B) ; +0x12a, 0x479a92\nLDR.W           R0, [R4,#0xA08]                                        ; +0x12e, 0x479a96\nLDR             R1, [SP,#0x20+var_18]                                  ; +0x132, 0x479a9a\nBL              _ZN13GJGroundLayer19updateGround01ColorEN7cocos2d10_ccColor3BE; GJGroundLayer::updateGround01Color(cocos2d::_ccColor3B) ; +0x134, 0x479a9c\nLDR.W           R0, [R4,#0xA04]                                        ; +0x138, 0x479aa0\nLDR             R1, [SP,#0x20+var_14]                                  ; +0x13c, 0x479aa4\nBL              _ZN13GJGroundLayer19updateGround02ColorEN7cocos2d10_ccColor3BE; GJGroundLayer::updateGround02Color(cocos2d::_ccColor3B) ; +0x13e, 0x479aa6\nLDR.W           R0, [R4,#0xA08]                                        ; +0x142, 0x479aaa\nLDR             R1, [SP,#0x20+var_14]                                  ; +0x146, 0x479aae\nBL              _ZN13GJGroundLayer19updateGround02ColorEN7cocos2d10_ccColor3BE; GJGroundLayer::updateGround02Color(cocos2d::_ccColor3B) ; +0x148, 0x479ab0\nLDR             R2, [SP,#0x20+var_4]                                   ; +0x14c, 0x479ab4\nLDR             R3, [R5]                                               ; +0x14e, 0x479ab6\nCMP             R2, R3                                                 ; +0x150, 0x479ab8\nBEQ             loc_479B04                                             ; +0x152, 0x479aba\nBLX             __stack_chk_fail                                       ; +0x154, 0x479abc\nLDR             R3, =0x3E4CCCCD                                        ; +0x158, 0x479ac0\nADD             R0, SP, #0x20+var_18                                   ; +0x15a, 0x479ac2\nMOVS            R1, #0                                                 ; +0x15c, 0x479ac4\nLDR             R2, =0xBE4CCCCD                                        ; +0x15e, 0x479ac6\nBL              _ZN11GameToolbox14transformColorERKN7cocos2d10_ccColor3BEfff; GameToolbox::transformColor(cocos2d::_ccColor3B const&,float,float,float) ; +0x160, 0x479ac8\nUBFX.W          R3, R0, #8, #8                                         ; +0x164, 0x479acc\nSTRB.W          R0, [SP,#0x20+var_C]                                   ; +0x168, 0x479ad0\nSTRB.W          R3, [SP,#0x20+var_C+1]                                 ; +0x16c, 0x479ad4\nUBFX.W          R0, R0, #0x10, #8                                      ; +0x170, 0x479ad8\nSTRB.W          R0, [SP,#0x20+var_C+2]                                 ; +0x174, 0x479adc\nB               loc_479A1E                                             ; +0x178, 0x479ae0\nLDR             R3, =0x3E4CCCCD                                        ; +0x17a, 0x479ae2\nADD             R0, SP, #0x20+var_14                                   ; +0x17c, 0x479ae4\nMOVS            R1, #0                                                 ; +0x17e, 0x479ae6\nLDR             R2, =0xBE4CCCCD                                        ; +0x180, 0x479ae8\nBL              _ZN11GameToolbox14transformColorERKN7cocos2d10_ccColor3BEfff; GameToolbox::transformColor(cocos2d::_ccColor3B const&,float,float,float) ; +0x182, 0x479aea\nUBFX.W          R3, R0, #8, #8                                         ; +0x186, 0x479aee\nSTRB.W          R0, [SP,#0x20+var_8]                                   ; +0x18a, 0x479af2\nSTRB.W          R3, [SP,#0x20+var_8+1]                                 ; +0x18e, 0x479af6\nUBFX.W          R0, R0, #0x10, #8                                      ; +0x192, 0x479afa\nSTRB.W          R0, [SP,#0x20+var_8+2]                                 ; +0x196, 0x479afe\nB               loc_479A42                                             ; +0x19a, 0x479b02\nADD             SP, SP, #0x20 ; ' '                                    ; +0x19c, 0x479b04\nPOP             {R4-R6,PC}                                             ; +0x19e, 0x479b06", "xrefs": ["GJBaseGameLayer::visit @ 0x47a502"], "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"}