{"type": "func", "start": 8738100, "end": 8738576, "name": "GJBaseGameLayer::updateColor", "pseudocode": "// \n// GJBaseGameLayer::updateColor from 0x855534 to 0x855710 (476 bytes)\n// \n// 4 xrefs:\n// > PlayLayer::updateColor @ 0x5da5e0\n// > LevelEditorLayer::updateColor @ 0x65c79c\n// > <???> @ 0x4ed50\n// > <???> @ 0x11906d0\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::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  ColorActionSprite *ColorSprite; // x21\n  ColorAction *ColorAction; // x19\n  GLubyte r; // w1\n  GLubyte g; // w0\n  GLubyte v22; // w1\n  GLubyte v23; // w0\n  float m_opacity; // s0\n  float h; // w2\n  bool absoluteBrightness; // w3\n  float s; // w1\n  float v; // w0\n  char v29; // w0\n  ColorActionSprite *m_colorSprite; // x0\n  int v32; // [xsp+68h] [xbp+68h]\n  __int64 vars0; // [xsp+78h] [xbp+78h]\n\n  if ( (unsigned int)a4 >= 0x44E )\n    a4 = 0;\n  v32 = a4;\n  ColorSprite = GJEffectManager::getColorSprite(a1->m_effectManager, a4);\n  ColorAction = GJEffectManager::getColorAction(a1->m_effectManager, v32);\n  ColorAction->m_uniqueID = a11;\n  a1->m_blending = ColorAction->m_blending;\n  r = ColorSprite->m_color.r;\n  g = ColorSprite->m_color.g;\n  ColorAction->m_fromColor.b = ColorSprite->m_color.b;\n  ColorAction->m_fromColor.r = r;\n  ColorAction->m_fromColor.g = g;\n  v22 = a2->r;\n  v23 = a2->g;\n  ColorAction->m_toColor.b = a2->b;\n  ColorAction->m_toColor.r = v22;\n  ColorAction->m_toColor.g = v23;\n  ColorAction->m_duration = a3;\n  ColorAction->m_blending = a5;\n  m_opacity = ColorSprite->m_opacity;\n  ColorAction->m_toOpacity = a6;\n  ColorAction->m_fromOpacity = m_opacity / 255.0;\n  h = a7->h;\n  absoluteBrightness = a7->absoluteBrightness;\n  s = a7->s;\n  v = a7->v;\n  ColorAction->m_copyHSV.absoluteSaturation = a7->absoluteSaturation;\n  ColorAction->m_copyHSV.absoluteBrightness = absoluteBrightness;\n  ColorAction->m_copyHSV.h = h;\n  ColorAction->m_copyHSV.s = s;\n  ColorAction->m_copyHSV.v = v;\n  if ( vars0 )\n    v29 = *(_BYTE *)(vars0 + 1620);\n  else\n    v29 = 0;\n  ColorAction->m_copyID = a8;\n  ColorAction->m_legacyHSV = v29;\n  ColorAction->m_copyOpacity = a9;\n  ColorAction::resetAction(ColorAction);\n  ColorAction::step(ColorAction, 0.0);\n  GJEffectManager::colorActionChanged(a1->m_effectManager, ColorAction);\n  if ( a3 <= 0.0 )\n  {\n    m_colorSprite = ColorAction->m_colorSprite;\n    if ( ColorAction->m_copyID )\n    {\n      if ( !ColorAction->m_copyOpacity )\n        m_colorSprite->m_opacity = a6 * 255.0;\n    }\n    else\n    {\n      *(_WORD *)&m_colorSprite->m_color.r = *(_WORD *)&a2->r;\n      m_colorSprite->m_color.b = a2->b;\n      m_colorSprite->m_opacity = a6 * 255.0;\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::updateColor from 0x855534 to 0x855710 (476 bytes)\n; \n; 4 xrefs:\n; > PlayLayer::updateColor @ 0x5da5e0\n; > LevelEditorLayer::updateColor @ 0x65c79c\n; > <???> @ 0x4ed50\n; > <???> @ 0x11906d0\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             X29, X30, [SP,#-8+var_78]!                             ; +0x0, 0x855534\nCMP             W2, #0x44E                                             ; +0x4, 0x855538\nMOV             X29, SP                                                ; +0x8, 0x85553c\nSTP             D8, D9, [SP,#0x78+var_38]                              ; +0xc, 0x855540\nFMOV            S8, S0                                                 ; +0x10, 0x855544\nFMOV            S9, S1                                                 ; +0x14, 0x855548\nCSEL            W2, W2, WZR, CC                                        ; +0x18, 0x85554c\nSTP             X19, X20, [SP,#0x78+var_68]                            ; +0x1c, 0x855550\nMOV             X20, X0                                                ; +0x20, 0x855554\nLDR             X0, [X0,#0x9A8]; this                                  ; +0x24, 0x855558\nSTP             X21, X22, [SP,#0x78+var_58]                            ; +0x28, 0x85555c\nMOV             X22, X1                                                ; +0x2c, 0x855560\nMOV             W1, W2; int                                            ; +0x30, 0x855564\nSTP             X23, X24, [SP,#0x78+var_48]                            ; +0x34, 0x855568\nSTR             D10, [SP,#0x78+var_28]                                 ; +0x38, 0x85556c\nUXTB            W24, W3                                                ; +0x3c, 0x855570\nSTR             X4, [X29,#0x78+var_18]                                 ; +0x40, 0x855574\nUXTB            W23, W6                                                ; +0x44, 0x855578\nSTR             X5, [X29,#0x78+var_8]                                  ; +0x48, 0x85557c\nSTR             X7, [X29,#0x78+var_s0]                                 ; +0x4c, 0x855580\nSTR             X2, [X29,#0x78+var_10]                                 ; +0x50, 0x855584\nBL              _ZN15GJEffectManager14getColorSpriteEi; GJEffectManager::getColorSprite(int) ; +0x54, 0x855588\nLDR             X2, [X29,#0x78+var_10]                                 ; +0x58, 0x85558c\nMOV             X21, X0                                                ; +0x5c, 0x855590\nLDR             X0, [X20,#0x9A8]; this                                 ; +0x60, 0x855594\nMOV             W1, W2; int                                            ; +0x64, 0x855598\nBL              _ZN15GJEffectManager14getColorActionEi; GJEffectManager::getColorAction(int) ; +0x68, 0x85559c\nMOV             X19, X0                                                ; +0x6c, 0x8555a0\nADD             X0, X20, #3,LSL#12                                     ; +0x70, 0x8555a4\nLDR             W1, [X29,#0x78+arg_0]                                  ; +0x74, 0x8555a8\nLDR             S10, =0x437F0000                                       ; +0x78, 0x8555ac\nLDR             X4, [X29,#0x78+var_18]                                 ; +0x7c, 0x8555b0\nSTR             W1, [X19,#0x80]                                        ; +0x80, 0x8555b4\nLDRB            W1, [X19,#0x54]                                        ; +0x84, 0x8555b8\nSTRB            W1, [X0,#0x10D]                                        ; +0x88, 0x8555bc\nLDRB            W1, [X21,#0x140]                                       ; +0x8c, 0x8555c0\nLDRB            W0, [X21,#0x141]                                       ; +0x90, 0x8555c4\nLDRB            W2, [X21,#0x142]                                       ; +0x94, 0x8555c8\nSTRB            W2, [X19,#0x4A]                                        ; +0x98, 0x8555cc\nSTRB            W1, [X19,#0x48]                                        ; +0x9c, 0x8555d0\nSTRB            W0, [X19,#0x49]                                        ; +0xa0, 0x8555d4\nLDRB            W1, [X22]                                              ; +0xa4, 0x8555d8\nLDRB            W0, [X22,#1]                                           ; +0xa8, 0x8555dc\nLDRB            W2, [X22,#2]                                           ; +0xac, 0x8555e0\nSTRB            W2, [X19,#0x4D]                                        ; +0xb0, 0x8555e4\nSTRB            W1, [X19,#0x4B]                                        ; +0xb4, 0x8555e8\nSTRB            W0, [X19,#0x4C]                                        ; +0xb8, 0x8555ec\nSTR             S8, [X19,#0x50]                                        ; +0xbc, 0x8555f0\nSTRB            W24, [X19,#0x54]                                       ; +0xc0, 0x8555f4\nLDR             S0, [X21,#0x13C]                                       ; +0xc4, 0x8555f8\nSTR             S9, [X19,#0x64]                                        ; +0xc8, 0x8555fc\nFDIV            S0, S0, S10                                            ; +0xcc, 0x855600\nSTR             S0, [X19,#0x60]                                        ; +0xd0, 0x855604\nLDRB            W6, [X4,#0xC]                                          ; +0xd4, 0x855608\nLDR             W2, [X4]                                               ; +0xd8, 0x85560c\nLDRB            W3, [X4,#0xD]                                          ; +0xdc, 0x855610\nLDR             W1, [X4,#4]                                            ; +0xe0, 0x855614\nLDR             W0, [X4,#8]                                            ; +0xe4, 0x855618\nSTRB            W6, [X19,#0x74]                                        ; +0xe8, 0x85561c\nSTRB            W3, [X19,#0x75]                                        ; +0xec, 0x855620\nSTR             W2, [X19,#0x68]                                        ; +0xf0, 0x855624\nSTR             W1, [X19,#0x6C]                                        ; +0xf4, 0x855628\nSTR             W0, [X19,#0x70]                                        ; +0xf8, 0x85562c\nLDR             X7, [X29,#0x78+var_s0]                                 ; +0xfc, 0x855630\nLDR             X5, [X29,#0x78+var_8]                                  ; +0x100, 0x855634\nCBZ             X7, loc_8556D0                                         ; +0x104, 0x855638\nLDRB            W0, [X7,#0x654]                                        ; +0x108, 0x85563c\nSTR             W5, [X19,#0x78]                                        ; +0x10c, 0x855640\nSTRB            W0, [X19,#0x88]                                        ; +0x110, 0x855644\nMOV             X0, X19; this                                          ; +0x114, 0x855648\nSTRB            W23, [X19,#0x7D]                                       ; +0x118, 0x85564c\nBL              _ZN11ColorAction11resetActionEv; ColorAction::resetAction(void) ; +0x11c, 0x855650\nFMOV            S0, WZR; float                                         ; +0x120, 0x855654\nMOV             X0, X19; this                                          ; +0x124, 0x855658\nBL              _ZN11ColorAction4stepEf; ColorAction::step(float)      ; +0x128, 0x85565c\nLDR             X0, [X20,#0x9A8]; this                                 ; +0x12c, 0x855660\nMOV             X1, X19; ColorAction *                                 ; +0x130, 0x855664\nBL              _ZN15GJEffectManager18colorActionChangedEP11ColorAction; GJEffectManager::colorActionChanged(ColorAction *) ; +0x134, 0x855668\nFCMPE           S8, #0.0                                               ; +0x138, 0x85566c\nB.LS            loc_855694                                             ; +0x13c, 0x855670\nMOV             X0, X19                                                ; +0x140, 0x855674\nLDP             D8, D9, [SP,#0x78+var_38]                              ; +0x144, 0x855678\nLDP             X19, X20, [SP,#0x78+var_68]                            ; +0x148, 0x85567c\nLDP             X21, X22, [SP,#0x78+var_58]                            ; +0x14c, 0x855680\nLDP             X23, X24, [SP,#0x78+var_48]                            ; +0x150, 0x855684\nLDR             D10, [SP,#0x78+var_28]                                 ; +0x154, 0x855688\nLDP             X29, X30, [SP+0x78+var_78],#0x80                       ; +0x158, 0x85568c\nRET                                                                    ; +0x15c, 0x855690\nLDR             W1, [X19,#0x78]                                        ; +0x160, 0x855694\nLDR             X0, [X19,#0x90]                                        ; +0x164, 0x855698\nCBZ             W1, loc_8556D8                                         ; +0x168, 0x85569c\nLDRB            W1, [X19,#0x7D]                                        ; +0x16c, 0x8556a0\nCBNZ            W1, loc_855674                                         ; +0x170, 0x8556a4\nFMUL            S9, S9, S10                                            ; +0x174, 0x8556a8\nLDP             X21, X22, [SP,#0x78+var_58]                            ; +0x178, 0x8556ac\nLDP             X23, X24, [SP,#0x78+var_48]                            ; +0x17c, 0x8556b0\nLDR             D10, [SP,#0x78+var_28]                                 ; +0x180, 0x8556b4\nSTR             S9, [X0,#0x13C]                                        ; +0x184, 0x8556b8\nMOV             X0, X19                                                ; +0x188, 0x8556bc\nLDP             D8, D9, [SP,#0x78+var_38]                              ; +0x18c, 0x8556c0\nLDP             X19, X20, [SP,#0x78+var_68]                            ; +0x190, 0x8556c4\nLDP             X29, X30, [SP+0x78+var_78],#0x80                       ; +0x194, 0x8556c8\nRET                                                                    ; +0x198, 0x8556cc\nMOV             W0, #0                                                 ; +0x19c, 0x8556d0\nB               loc_855640                                             ; +0x1a0, 0x8556d4\nLDRH            W1, [X22]                                              ; +0x1a4, 0x8556d8\nSTRH            W1, [X0,#0x140]                                        ; +0x1a8, 0x8556dc\nFMUL            S9, S9, S10                                            ; +0x1ac, 0x8556e0\nLDRB            W1, [X22,#2]                                           ; +0x1b0, 0x8556e4\nSTRB            W1, [X0,#0x142]                                        ; +0x1b4, 0x8556e8\nSTR             S9, [X0,#0x13C]                                        ; +0x1b8, 0x8556ec\nMOV             X0, X19                                                ; +0x1bc, 0x8556f0\nLDP             X21, X22, [SP,#0x78+var_58]                            ; +0x1c0, 0x8556f4\nLDP             D8, D9, [SP,#0x78+var_38]                              ; +0x1c4, 0x8556f8\nLDP             X19, X20, [SP,#0x78+var_68]                            ; +0x1c8, 0x8556fc\nLDP             X23, X24, [SP,#0x78+var_48]                            ; +0x1cc, 0x855700\nLDR             D10, [SP,#0x78+var_28]                                 ; +0x1d0, 0x855704\nLDP             X29, X30, [SP+0x78+var_78],#0x80                       ; +0x1d4, 0x855708\nRET                                                                    ; +0x1d8, 0x85570c", "xrefs": ["PlayLayer::updateColor @ 0x5da5e0", "LevelEditorLayer::updateColor @ 0x65c79c", "<???> @ 0x4ed50", "<???> @ 0x11906d0"], "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"}