{"type": "func", "start": 4297006780, "end": 4297007140, "name": "GJBaseGameLayer::updateColor", "pseudocode": "// \n// GJBaseGameLayer::updateColor from 0x1001f1ebc to 0x1001f2024 (360 bytes)\n// \n// 3 xrefs:\n// > PlayLayer::updateColor @ 0x10011dfdc\n// > LevelEditorLayer::updateColor @ 0x1003618e4\n// > <???> @ 0x1007c0b60\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::updateColor(\n        GJBaseGameLayer *a1,\n        cocos2d::ccColor3B *a2,\n        float a3,\n        int a4,\n        bool a5,\n        float a6,\n        cocos2d::ccHSVValue *a7,\n        int a8,\n        bool a9,\n        EffectGameObject *a10,\n        int a11,\n        int a12)\n{\n  int v21; // w20\n  ColorActionSprite *ColorSprite; // x27\n  ColorAction *ColorAction; // x0\n  ColorAction *v24; // x20\n  GLubyte b; // w8\n  GLubyte v26; // w8\n  bool m_legacyHSV; // w8\n  ColorActionSprite *m_colorSprite; // x8\n  __int16 v29; // w9\n\n  if ( (unsigned int)a4 <= 0x44D )\n    v21 = a4;\n  else\n    v21 = 0;\n  ColorSprite = GJEffectManager::getColorSprite(a1->m_effectManager, v21);\n  ColorAction = GJEffectManager::getColorAction(a1->m_effectManager, v21);\n  v24 = ColorAction;\n  ColorAction->m_uniqueID = a11;\n  a1->m_blending = ColorAction->m_blending;\n  b = ColorSprite->m_color.b;\n  *(_WORD *)&ColorAction->m_fromColor.r = *(_WORD *)&ColorSprite->m_color.r;\n  ColorAction->m_fromColor.b = b;\n  v26 = a2->b;\n  *(_WORD *)&ColorAction->m_toColor.r = *(_WORD *)&a2->r;\n  ColorAction->m_toColor.b = v26;\n  ColorAction->m_duration = a3;\n  ColorAction->m_blending = a5;\n  ColorAction->m_fromOpacity = ColorSprite->m_opacity / 255.0;\n  ColorAction->m_toOpacity = a6;\n  ColorAction->m_copyHSV = *a7;\n  if ( a10 )\n    m_legacyHSV = a10->m_legacyHSV;\n  else\n    m_legacyHSV = 0;\n  ColorAction->m_legacyHSV = m_legacyHSV;\n  ColorAction->m_copyID = a8;\n  ColorAction->m_copyOpacity = a9;\n  ColorAction::resetAction(ColorAction);\n  ColorAction::step(v24, 0.0);\n  GJEffectManager::colorActionChanged(a1->m_effectManager, v24);\n  if ( a3 <= 0.0 )\n  {\n    m_colorSprite = v24->m_colorSprite;\n    if ( v24->m_copyID )\n    {\n      if ( v24->m_copyOpacity )\n        return;\n    }\n    else\n    {\n      v29 = *(_WORD *)&a2->r;\n      m_colorSprite->m_color.b = a2->b;\n      *(_WORD *)&m_colorSprite->m_color.r = v29;\n    }\n    m_colorSprite->m_opacity = a6 * 255.0;\n  }\n}", "assembly": "; \n; GJBaseGameLayer::updateColor from 0x1001f1ebc to 0x1001f2024 (360 bytes)\n; \n; 3 xrefs:\n; > PlayLayer::updateColor @ 0x10011dfdc\n; > LevelEditorLayer::updateColor @ 0x1003618e4\n; > <???> @ 0x1007c0b60\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             D9, D8, [SP,#-0x10+var_60]!                            ; +0x0, 0x1001f1ebc\nSTP             X28, X27, [SP,#0x60+var_50]                            ; +0x4, 0x1001f1ec0\nSTP             X26, X25, [SP,#0x60+var_40]                            ; +0x8, 0x1001f1ec4\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0xc, 0x1001f1ec8\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0x10, 0x1001f1ecc\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x14, 0x1001f1ed0\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x18, 0x1001f1ed4\nADD             X29, SP, #0x60                                         ; +0x1c, 0x1001f1ed8\nMOV             X24, X7                                                ; +0x20, 0x1001f1edc\nMOV             X22, X6                                                ; +0x24, 0x1001f1ee0\nMOV             X23, X5                                                ; +0x28, 0x1001f1ee4\nMOV             X25, X4                                                ; +0x2c, 0x1001f1ee8\nFMOV            S8, S1                                                 ; +0x30, 0x1001f1eec\nMOV             X26, X3                                                ; +0x34, 0x1001f1ef0\nFMOV            S9, S0                                                 ; +0x38, 0x1001f1ef4\nMOV             X19, X1                                                ; +0x3c, 0x1001f1ef8\nMOV             X21, X0                                                ; +0x40, 0x1001f1efc\nLDR             W28, [X29,#arg_0]                                      ; +0x44, 0x1001f1f00\nCMP             W2, #0x44D                                             ; +0x48, 0x1001f1f04\nCSEL            W20, WZR, W2, HI                                       ; +0x4c, 0x1001f1f08\nLDR             X0, [X0,#0x878]                                        ; +0x50, 0x1001f1f0c\nMOV             X1, X20                                                ; +0x54, 0x1001f1f10\nBL              GJEffectManager__getColorSprite                        ; +0x58, 0x1001f1f14\nMOV             X27, X0                                                ; +0x5c, 0x1001f1f18\nLDR             X0, [X21,#0x878]                                       ; +0x60, 0x1001f1f1c\nMOV             X1, X20                                                ; +0x64, 0x1001f1f20\nBL              GJEffectManager__getColorAction                        ; +0x68, 0x1001f1f24\nMOV             X20, X0                                                ; +0x6c, 0x1001f1f28\nSTR             W28, [X0,#0x80]                                        ; +0x70, 0x1001f1f2c\nLDRB            W8, [X0,#0x54]                                         ; +0x74, 0x1001f1f30\nMOV             W9, #0x2F5D                                            ; +0x78, 0x1001f1f34\nSTRB            W8, [X21,X9]                                           ; +0x7c, 0x1001f1f38\nLDRB            W8, [X27,#0x142]                                       ; +0x80, 0x1001f1f3c\nLDRH            W9, [X27,#0x140]                                       ; +0x84, 0x1001f1f40\nSTRH            W9, [X0,#0x48]                                         ; +0x88, 0x1001f1f44\nSTRB            W8, [X0,#0x4A]                                         ; +0x8c, 0x1001f1f48\nLDRB            W8, [X19,#2]                                           ; +0x90, 0x1001f1f4c\nLDRH            W9, [X19]                                              ; +0x94, 0x1001f1f50\nSTURH           W9, [X0,#0x4B]                                         ; +0x98, 0x1001f1f54\nSTRB            W8, [X0,#0x4D]                                         ; +0x9c, 0x1001f1f58\nSTR             S9, [X0,#0x50]                                         ; +0xa0, 0x1001f1f5c\nSTRB            W26, [X0,#0x54]                                        ; +0xa4, 0x1001f1f60\nLDR             S0, [X27,#0x13C]                                       ; +0xa8, 0x1001f1f64\nMOV             W8, #0x437F0000                                        ; +0xac, 0x1001f1f68\nFMOV            S1, W8                                                 ; +0xb0, 0x1001f1f6c\nFDIV            S0, S0, S1                                             ; +0xb4, 0x1001f1f70\nSTP             S0, S8, [X0,#0x60]                                     ; +0xb8, 0x1001f1f74\nLDR             Q0, [X25]                                              ; +0xbc, 0x1001f1f78\nSTUR            Q0, [X0,#0x68]                                         ; +0xc0, 0x1001f1f7c\nCBZ             X24, loc_1001F1F8C                                     ; +0xc4, 0x1001f1f80\nLDRB            W8, [X24,#0x664]                                       ; +0xc8, 0x1001f1f84\nB               loc_1001F1F90                                          ; +0xcc, 0x1001f1f88\nMOV             W8, #0                                                 ; +0xd0, 0x1001f1f8c\nAND             W8, W8, #1                                             ; +0xd4, 0x1001f1f90\nSTRB            W8, [X20,#0x88]                                        ; +0xd8, 0x1001f1f94\nSTR             W23, [X20,#0x78]                                       ; +0xdc, 0x1001f1f98\nSTRB            W22, [X20,#0x7D]                                       ; +0xe0, 0x1001f1f9c\nMOV             X0, X20                                                ; +0xe4, 0x1001f1fa0\nBL              ColorAction__resetAction                               ; +0xe8, 0x1001f1fa4\nFMOV            S0, WZR                                                ; +0xec, 0x1001f1fa8\nMOV             X0, X20                                                ; +0xf0, 0x1001f1fac\nBL              ColorAction__step                                      ; +0xf4, 0x1001f1fb0\nLDR             X0, [X21,#0x878]                                       ; +0xf8, 0x1001f1fb4\nMOV             X1, X20                                                ; +0xfc, 0x1001f1fb8\nBL              GJEffectManager__colorActionChanged                    ; +0x100, 0x1001f1fbc\nFCMP            S9, #0.0                                               ; +0x104, 0x1001f1fc0\nB.HI            loc_1001F2000                                          ; +0x108, 0x1001f1fc4\nLDR             X8, [X20,#0x90]                                        ; +0x10c, 0x1001f1fc8\nLDR             W9, [X20,#0x78]                                        ; +0x110, 0x1001f1fcc\nCBZ             W9, loc_1001F1FE0                                      ; +0x114, 0x1001f1fd0\nLDRB            W9, [X20,#0x7D]                                        ; +0x118, 0x1001f1fd4\nTBZ             W9, #0, loc_1001F1FF0                                  ; +0x11c, 0x1001f1fd8\nB               loc_1001F2000                                          ; +0x120, 0x1001f1fdc\nLDRH            W9, [X19]                                              ; +0x124, 0x1001f1fe0\nLDRB            W10, [X19,#2]                                          ; +0x128, 0x1001f1fe4\nSTRB            W10, [X8,#0x142]                                       ; +0x12c, 0x1001f1fe8\nSTRH            W9, [X8,#0x140]                                        ; +0x130, 0x1001f1fec\nMOV             W9, #0x437F0000                                        ; +0x134, 0x1001f1ff0\nFMOV            S0, W9                                                 ; +0x138, 0x1001f1ff4\nFMUL            S0, S8, S0                                             ; +0x13c, 0x1001f1ff8\nSTR             S0, [X8,#0x13C]                                        ; +0x140, 0x1001f1ffc\nMOV             X0, X20                                                ; +0x144, 0x1001f2000\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0x148, 0x1001f2004\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0x14c, 0x1001f2008\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0x150, 0x1001f200c\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0x154, 0x1001f2010\nLDP             X26, X25, [SP,#0x60+var_40]                            ; +0x158, 0x1001f2014\nLDP             X28, X27, [SP,#0x60+var_50]                            ; +0x15c, 0x1001f2018\nLDP             D9, D8, [SP+0x60+var_60],#0x70                         ; +0x160, 0x1001f201c\nRET                                                                    ; +0x164, 0x1001f2020", "xrefs": ["PlayLayer::updateColor @ 0x10011dfdc", "LevelEditorLayer::updateColor @ 0x1003618e4", "<???> @ 0x1007c0b60"], "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"}