{"type": "func", "start": 4822972, "end": 4823208, "name": "ColorAction::step", "pseudocode": "// \n// ColorAction::step from 0x4997bc to 0x4998a8 (236 bytes)\n// \n// 4 xrefs:\n// > LevelEditorLayer::runColorEffect @ 0x367e5c\n// > LevelEditorLayer::stopTriggersInGroup @ 0x36db14\n// > GJBaseGameLayer::updateColor @ 0x46c140\n// > GJEffectManager::updateColorEffects @ 0x49a23c\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 ColorAction::step(ColorAction *a1, float a2)\n{\n  float v3; // s15\n  float m_duration; // s17\n  float v5; // s16\n  float v6; // s17\n  GLubyte v7; // r3\n  float m_fromOpacity; // r3\n  GLubyte b; // r3\n  int v10; // r0\n  float v11; // s15\n\n  if ( !a1->m_stepFinished && !a1->m_paused )\n  {\n    v3 = a2 + a1->m_deltaTime;\n    m_duration = a1->m_duration;\n    v5 = v3 + a1->m_stepInterval;\n    a1->m_deltaTime = v3;\n    if ( v5 < m_duration )\n    {\n      if ( v5 > 0.0 )\n      {\n        v6 = v5 / m_duration;\n        if ( v6 >= 1.0 )\n          goto LABEL_6;\n        if ( v6 > 0.0 )\n        {\n          *(cocos2d::ccColor3B *)&v10 = GameToolbox::multipliedColorValue(\n                                          (cocos2d::ccColor3B)*(_DWORD *)&a1->m_fromColor.r,\n                                          (cocos2d::ccColor3B)(a1->m_toColor.r\n                                                             | (a1->m_toColor.g << 8)\n                                                             | (a1->m_toColor.b << 16)),\n                                          v6);\n          v11 = a1->m_fromOpacity + (float)((float)(a1->m_toOpacity - a1->m_fromOpacity) * v6);\n          *(_WORD *)&a1->m_color.r = v10;\n          a1->m_color.b = BYTE2(v10);\n          a1->m_currentOpacity = v11;\n          goto LABEL_11;\n        }\n      }\n      b = a1->m_fromColor.b;\n      *(_WORD *)&a1->m_color.r = *(_WORD *)&a1->m_fromColor.r;\n      a1->m_color.b = b;\n      m_fromOpacity = a1->m_fromOpacity;\n      goto LABEL_9;\n    }\nLABEL_6:\n    v7 = a1->m_toColor.b;\n    *(_WORD *)&a1->m_color.r = *(_WORD *)&a1->m_toColor.r;\n    a1->m_color.b = v7;\n    m_fromOpacity = a1->m_toOpacity;\nLABEL_9:\n    a1->m_currentOpacity = m_fromOpacity;\nLABEL_11:\n    a1->m_stepFinished = v5 >= a1->m_duration;\n  }\n}", "assembly": "; \n; ColorAction::step from 0x4997bc to 0x4998a8 (236 bytes)\n; \n; 4 xrefs:\n; > LevelEditorLayer::runColorEffect @ 0x367e5c\n; > LevelEditorLayer::stopTriggersInGroup @ 0x36db14\n; > GJBaseGameLayer::updateColor @ 0x46c140\n; > GJEffectManager::updateColorEffects @ 0x49a23c\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\nLDRB.W          R3, [R0,#0x34]                                         ; +0x0, 0x4997bc\nVMOV            S15, R1                                                ; +0x4, 0x4997c0\nPUSH            {R4,LR}                                                ; +0x8, 0x4997c4\nMOV             R4, R0                                                 ; +0xa, 0x4997c6\nVPUSH           {D8}                                                   ; +0xc, 0x4997c8\nCMP             R3, #0                                                 ; +0x10, 0x4997cc\nBNE             loc_4998A2                                             ; +0x12, 0x4997ce\nLDRB.W          R3, [R0,#0x35]                                         ; +0x14, 0x4997d0\nCMP             R3, #0                                                 ; +0x18, 0x4997d4\nBNE             loc_4998A2                                             ; +0x1a, 0x4997d6\nVLDR            S14, [R0,#0x40]                                        ; +0x1c, 0x4997d8\nVLDR            S16, [R0,#0x94]                                        ; +0x20, 0x4997dc\nVADD.F32        S15, S15, S14                                          ; +0x24, 0x4997e0\nVLDR            S17, [R0,#0x4C]                                        ; +0x28, 0x4997e4\nVADD.F32        S16, S15, S16                                          ; +0x2c, 0x4997e8\nVSTR            S15, [R0,#0x40]                                        ; +0x30, 0x4997ec\nVCMPE.F32       S16, S17                                               ; +0x34, 0x4997f0\nVMRS            APSR_nzcv, FPSCR                                       ; +0x38, 0x4997f4\nBGE             loc_499816                                             ; +0x3c, 0x4997f8\nVCMPE.F32       S16, #0.0                                              ; +0x3e, 0x4997fa\nVMRS            APSR_nzcv, FPSCR                                       ; +0x42, 0x4997fe\nBLE             loc_499832                                             ; +0x46, 0x499802\nVDIV.F32        S17, S16, S17                                          ; +0x48, 0x499804\nVMOV.F32        S15, #1.0                                              ; +0x4c, 0x499808\nVCMPE.F32       S17, S15                                               ; +0x50, 0x49980c\nVMRS            APSR_nzcv, FPSCR                                       ; +0x54, 0x499810\nBLT             loc_499828                                             ; +0x58, 0x499814\nMOV             R3, R4                                                 ; +0x5a, 0x499816\nLDRH.W          R2, [R3,#0x47]!                                        ; +0x5c, 0x499818\nLDRB            R3, [R3,#2]                                            ; +0x60, 0x49981c\nSTRH            R2, [R4,#0x36]                                         ; +0x62, 0x49981e\nSTRB.W          R3, [R4,#0x38]                                         ; +0x64, 0x499820\nLDR             R3, [R4,#0x60]                                         ; +0x68, 0x499824\nB               loc_499842                                             ; +0x6a, 0x499826\nVCMPE.F32       S17, #0.0                                              ; +0x6c, 0x499828\nVMRS            APSR_nzcv, FPSCR                                       ; +0x70, 0x49982c\nBHI             loc_499846                                             ; +0x74, 0x499830\nMOV             R3, R4                                                 ; +0x76, 0x499832\nLDRH.W          R2, [R3,#0x44]!                                        ; +0x78, 0x499834\nLDRB            R3, [R3,#2]                                            ; +0x7c, 0x499838\nSTRH            R2, [R4,#0x36]                                         ; +0x7e, 0x49983a\nSTRB.W          R3, [R4,#0x38]                                         ; +0x80, 0x49983c\nLDR             R3, [R4,#0x5C]                                         ; +0x84, 0x499840\nSTR             R3, [R4,#0x3C]                                         ; +0x86, 0x499842\nB               loc_49988C                                             ; +0x88, 0x499844\nLDRB.W          R1, [R0,#0x48]                                         ; +0x8a, 0x499846\nLDRB.W          R3, [R0,#0x47]                                         ; +0x8e, 0x49984a\nVMOV            R2, S17                                                ; +0x92, 0x49984e\nORR.W           R3, R3, R1,LSL#8                                       ; +0x96, 0x499852\nLDRB.W          R1, [R0,#0x49]                                         ; +0x9a, 0x499856\nLDR             R0, [R0,#0x44]                                         ; +0x9e, 0x49985a\nORR.W           R1, R3, R1,LSL#16                                      ; +0xa0, 0x49985c\nBL              _ZN11GameToolbox20multipliedColorValueEN7cocos2d10_ccColor3BES1_f; GameToolbox::multipliedColorValue(cocos2d::_ccColor3B,cocos2d::_ccColor3B,float) ; +0xa4, 0x499860\nVLDR            S15, [R4,#0x5C]                                        ; +0xa8, 0x499864\nVLDR            S14, [R4,#0x60]                                        ; +0xac, 0x499868\nVSUB.F32        S14, S14, S15                                          ; +0xb0, 0x49986c\nVMLA.F32        S15, S14, S17                                          ; +0xb4, 0x499870\nUBFX.W          R3, R0, #8, #8                                         ; +0xb8, 0x499874\nSTRB.W          R0, [R4,#0x36]                                         ; +0xbc, 0x499878\nSTRB.W          R3, [R4,#0x37]                                         ; +0xc0, 0x49987c\nUBFX.W          R0, R0, #0x10, #8                                      ; +0xc4, 0x499880\nSTRB.W          R0, [R4,#0x38]                                         ; +0xc8, 0x499884\nVSTR            S15, [R4,#0x3C]                                        ; +0xcc, 0x499888\nVLDR            S15, [R4,#0x4C]                                        ; +0xd0, 0x49988c\nVCMPE.F32       S16, S15                                               ; +0xd4, 0x499890\nVMRS            APSR_nzcv, FPSCR                                       ; +0xd8, 0x499894\nITE GE                                                                 ; +0xdc, 0x499898\nMOVGE           R3, #1                                                 ; +0xde, 0x49989a\nMOVLT           R3, #0                                                 ; +0xe0, 0x49989c\nSTRB.W          R3, [R4,#0x34]                                         ; +0xe2, 0x49989e\nVPOP            {D8}                                                   ; +0xe6, 0x4998a2\nPOP             {R4,PC}                                                ; +0xea, 0x4998a6", "xrefs": ["LevelEditorLayer::runColorEffect @ 0x367e5c", "LevelEditorLayer::stopTriggersInGroup @ 0x36db14", "GJBaseGameLayer::updateColor @ 0x46c140", "GJEffectManager::updateColorEffects @ 0x49a23c"], "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"}