{"type": "func", "start": 4824224, "end": 4824342, "name": "GJEffectManager::activeColorForIndex", "pseudocode": "// \n// GJEffectManager::activeColorForIndex from 0x499ca0 to 0x499d16 (118 bytes)\n// \n// 33 xrefs:\n// > PlayLayer::applyCustomEnterEffect @ 0x311d10\n// > PlayLayer::updateVisibility @ 0x315728\n// > PlayLayer::updateVisibility @ 0x315786\n// > PlayLayer::updateVisibility @ 0x3157a6\n// > PlayerObject::ringJump @ 0x34e78e\n// > LevelEditorLayer::updateObjectColors @ 0x367850\n// > LevelEditorLayer::updateObjectColors @ 0x3679e2\n// > LevelEditorLayer::transferDefaultColors @ 0x367c8c\n// > LevelEditorLayer::updateVisibility @ 0x369566\n// > LevelEditorLayer::updateVisibility @ 0x3698f0\n// > LevelEditorLayer::updateVisibility @ 0x369a82\n// > LevelEditorLayer::postUpdate @ 0x375130\n// > LevelEditorLayer::updateGameObjects @ 0x375d2e\n// > GJBaseGameLayer::updateLevelColors @ 0x46d98c\n// > GJBaseGameLayer::updateLevelColors @ 0x46d9ba\n// > GJBaseGameLayer::updateLevelColors @ 0x46d9f8\n// > GJBaseGameLayer::updateLevelColors @ 0x46da2c\n// > GJBaseGameLayer::updateLevelColors @ 0x46daf2\n// > GJBaseGameLayer::updateLevelColors @ 0x46db20\n// > GJBaseGameLayer::updateGradientLayers @ 0x47155a\n// > GJBaseGameLayer::updateGradientLayers @ 0x47157a\n// > GJBaseGameLayer::updateShaderLayer @ 0x47246a\n// > GJBaseGameLayer::updateShaderLayer @ 0x4724a2\n// > GJBaseGameLayer::updateShaderLayer @ 0x4725a6\n// > GJBaseGameLayer::processAreaTintGroupAction @ 0x4742c8\n// > GJBaseGameLayer::visitWithColorFlash @ 0x479982\n// > GJBaseGameLayer::visitWithColorFlash @ 0x4799a2\n// > GJBaseGameLayer::visitWithColorFlash @ 0x4799c2\n// > GJBaseGameLayer::preUpdateVisibility @ 0x48937c\n// > GJBaseGameLayer::preUpdateVisibility @ 0x48939c\n// > GJEffectManager::colorForPulseEffect @ 0x49a30c\n// > GJEffectManager::calculateLightBGColor @ 0x49aa5e\n// > GJEffectManager::processCopyColorPulseActions @ 0x49c830\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\ncocos2d::ccColor3B GJEffectManager::activeColorForIndex(GJEffectManager *a1, int a2)\n{\n  unsigned __int8 b; // r3\n  ColorActionSprite *ColorSprite; // r0\n  char r; // r1\n  char g; // r2\n  __int16 v8; // [sp+4h] [bp-8h]\n\n  if ( a2 == 1010 )\n  {\n    b = 0;\n    v8 = 0;\n  }\n  else if ( a2 != 1011 && a2 )\n  {\n    ColorSprite = GJEffectManager::getColorSprite(a1, a2);\n    if ( ColorSprite )\n    {\n      r = ColorSprite->m_copyColor.r;\n      g = ColorSprite->m_copyColor.g;\n      b = ColorSprite->m_copyColor.b;\n    }\n    else\n    {\n      b = -1;\n      g = -1;\n      r = -1;\n    }\n    LOBYTE(v8) = r;\n    HIBYTE(v8) = g;\n  }\n  else\n  {\n    b = -1;\n    v8 = -1;\n  }\n  return (cocos2d::ccColor3B)((unsigned __int8)v8 | (unsigned __int16)(HIBYTE(v8) << 8) | (b << 16));\n}", "assembly": "; \n; GJEffectManager::activeColorForIndex from 0x499ca0 to 0x499d16 (118 bytes)\n; \n; 33 xrefs:\n; > PlayLayer::applyCustomEnterEffect @ 0x311d10\n; > PlayLayer::updateVisibility @ 0x315728\n; > PlayLayer::updateVisibility @ 0x315786\n; > PlayLayer::updateVisibility @ 0x3157a6\n; > PlayerObject::ringJump @ 0x34e78e\n; > LevelEditorLayer::updateObjectColors @ 0x367850\n; > LevelEditorLayer::updateObjectColors @ 0x3679e2\n; > LevelEditorLayer::transferDefaultColors @ 0x367c8c\n; > LevelEditorLayer::updateVisibility @ 0x369566\n; > LevelEditorLayer::updateVisibility @ 0x3698f0\n; > LevelEditorLayer::updateVisibility @ 0x369a82\n; > LevelEditorLayer::postUpdate @ 0x375130\n; > LevelEditorLayer::updateGameObjects @ 0x375d2e\n; > GJBaseGameLayer::updateLevelColors @ 0x46d98c\n; > GJBaseGameLayer::updateLevelColors @ 0x46d9ba\n; > GJBaseGameLayer::updateLevelColors @ 0x46d9f8\n; > GJBaseGameLayer::updateLevelColors @ 0x46da2c\n; > GJBaseGameLayer::updateLevelColors @ 0x46daf2\n; > GJBaseGameLayer::updateLevelColors @ 0x46db20\n; > GJBaseGameLayer::updateGradientLayers @ 0x47155a\n; > GJBaseGameLayer::updateGradientLayers @ 0x47157a\n; > GJBaseGameLayer::updateShaderLayer @ 0x47246a\n; > GJBaseGameLayer::updateShaderLayer @ 0x4724a2\n; > GJBaseGameLayer::updateShaderLayer @ 0x4725a6\n; > GJBaseGameLayer::processAreaTintGroupAction @ 0x4742c8\n; > GJBaseGameLayer::visitWithColorFlash @ 0x479982\n; > GJBaseGameLayer::visitWithColorFlash @ 0x4799a2\n; > GJBaseGameLayer::visitWithColorFlash @ 0x4799c2\n; > GJBaseGameLayer::preUpdateVisibility @ 0x48937c\n; > GJBaseGameLayer::preUpdateVisibility @ 0x48939c\n; > GJEffectManager::colorForPulseEffect @ 0x49a30c\n; > GJEffectManager::calculateLightBGColor @ 0x49aa5e\n; > GJEffectManager::processCopyColorPulseActions @ 0x49c830\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            {R0-R2,LR}                                             ; +0x0, 0x499ca0\nMOVW            R2, #0x3F2                                             ; +0x2, 0x499ca2\nCMP             R1, R2                                                 ; +0x6, 0x499ca6\nBEQ             loc_499CC4                                             ; +0x8, 0x499ca8\nMOVW            R2, #0x3F3                                             ; +0xa, 0x499caa\nCMP             R1, R2                                                 ; +0xe, 0x499cae\nBEQ             loc_499CB4                                             ; +0x10, 0x499cb0\nCBNZ            R1, loc_499CD0                                         ; +0x12, 0x499cb2\nLDR             R3, =(unk_9AC080 - 0x499CBA)                           ; +0x14, 0x499cb4\nADD             R3, PC; unk_9AC080                                     ; +0x16, 0x499cb6\nLDRH.W          R2, [R3,#(word_9AC083 - 0x9AC080)]!                    ; +0x18, 0x499cb8\nLDRB            R3, [R3,#(byte_9AC085 - 0x9AC083)]                     ; +0x1c, 0x499cbc\nSTRH.W          R2, [SP,#0xC+var_8]                                    ; +0x1e, 0x499cbe\nB               loc_499CF2                                             ; +0x22, 0x499cc2\nMOVS            R3, #0                                                 ; +0x24, 0x499cc4\nSTRB.W          R3, [SP,#0xC+var_8]                                    ; +0x26, 0x499cc6\nSTRB.W          R3, [SP,#0xC+var_8+1]                                  ; +0x2a, 0x499cca\nB               loc_499CF2                                             ; +0x2e, 0x499cce\nBL              _ZN15GJEffectManager14getColorSpriteEi; GJEffectManager::getColorSprite(int) ; +0x30, 0x499cd0\nCBZ             R0, loc_499CE4                                         ; +0x34, 0x499cd4\nLDRB.W          R1, [R0,#0x10F]                                        ; +0x36, 0x499cd6\nLDRB.W          R2, [R0,#0x110]                                        ; +0x3a, 0x499cda\nLDRB.W          R3, [R0,#0x111]                                        ; +0x3e, 0x499cde\nB               loc_499CEA                                             ; +0x42, 0x499ce2\nMOVS            R3, #0xFF                                              ; +0x44, 0x499ce4\nMOV             R2, R3                                                 ; +0x46, 0x499ce6\nMOV             R1, R3                                                 ; +0x48, 0x499ce8\nSTRB.W          R1, [SP,#0xC+var_8]                                    ; +0x4a, 0x499cea\nSTRB.W          R2, [SP,#0xC+var_8+1]                                  ; +0x4e, 0x499cee\nSTRB.W          R3, [SP,#0xC+var_6]                                    ; +0x52, 0x499cf2\nMOVS            R0, #0                                                 ; +0x56, 0x499cf6\nLDRB.W          R3, [SP,#0xC+var_8]                                    ; +0x58, 0x499cf8\nBFI.W           R0, R3, #0, #8                                         ; +0x5c, 0x499cfc\nLDRB.W          R3, [SP,#0xC+var_8+1]                                  ; +0x60, 0x499d00\nBFI.W           R0, R3, #8, #8                                         ; +0x64, 0x499d04\nLDRB.W          R3, [SP,#0xC+var_6]                                    ; +0x68, 0x499d08\nBFI.W           R0, R3, #0x10, #8                                      ; +0x6c, 0x499d0c\nADD             SP, SP, #0xC                                           ; +0x70, 0x499d10\nPOP.W           {PC}                                                   ; +0x72, 0x499d12", "xrefs": ["PlayLayer::applyCustomEnterEffect @ 0x311d10", "PlayLayer::updateVisibility @ 0x315728", "PlayLayer::updateVisibility @ 0x315786", "PlayLayer::updateVisibility @ 0x3157a6", "PlayerObject::ringJump @ 0x34e78e", "LevelEditorLayer::updateObjectColors @ 0x367850", "LevelEditorLayer::updateObjectColors @ 0x3679e2", "LevelEditorLayer::transferDefaultColors @ 0x367c8c", "LevelEditorLayer::updateVisibility @ 0x369566", "LevelEditorLayer::updateVisibility @ 0x3698f0", "LevelEditorLayer::updateVisibility @ 0x369a82", "LevelEditorLayer::postUpdate @ 0x375130", "LevelEditorLayer::updateGameObjects @ 0x375d2e", "GJBaseGameLayer::updateLevelColors @ 0x46d98c", "GJBaseGameLayer::updateLevelColors @ 0x46d9ba", "GJBaseGameLayer::updateLevelColors @ 0x46d9f8", "GJBaseGameLayer::updateLevelColors @ 0x46da2c", "GJBaseGameLayer::updateLevelColors @ 0x46daf2", "GJBaseGameLayer::updateLevelColors @ 0x46db20", "GJBaseGameLayer::updateGradientLayers @ 0x47155a", "GJBaseGameLayer::updateGradientLayers @ 0x47157a", "GJBaseGameLayer::updateShaderLayer @ 0x47246a", "GJBaseGameLayer::updateShaderLayer @ 0x4724a2", "GJBaseGameLayer::updateShaderLayer @ 0x4725a6", "GJBaseGameLayer::processAreaTintGroupAction @ 0x4742c8", "GJBaseGameLayer::visitWithColorFlash @ 0x479982", "GJBaseGameLayer::visitWithColorFlash @ 0x4799a2", "GJBaseGameLayer::visitWithColorFlash @ 0x4799c2", "GJBaseGameLayer::preUpdateVisibility @ 0x48937c", "GJBaseGameLayer::preUpdateVisibility @ 0x48939c", "GJEffectManager::colorForPulseEffect @ 0x49a30c", "GJEffectManager::calculateLightBGColor @ 0x49aa5e", "GJEffectManager::processCopyColorPulseActions @ 0x49c830"], "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"}