//
// GJEffectManager::activeColorForIndex from 0x5c3120 to 0x5c3196 (118 bytes)
//
// 33 xrefs:
// > PlayLayer::applyCustomEnterEffect @ 0x4011cc
// > PlayLayer::updateVisibility @ 0x406b6c
// > PlayLayer::updateVisibility @ 0x406bca
// > PlayLayer::updateVisibility @ 0x406bea
// > PlayerObject::ringJump @ 0x449f6e
// > LevelEditorLayer::updateObjectColors @ 0x4615e0
// > LevelEditorLayer::updateObjectColors @ 0x461772
// > LevelEditorLayer::transferDefaultColors @ 0x461a1c
// > LevelEditorLayer::updateVisibility @ 0x462cbe
// > LevelEditorLayer::updateVisibility @ 0x4630ea
// > LevelEditorLayer::updateVisibility @ 0x46327a
// > LevelEditorLayer::postUpdate @ 0x46ad18
// > LevelEditorLayer::updateGameObjects @ 0x46cc4c
// > GJBaseGameLayer::updateLevelColors @ 0x58c528
// > GJBaseGameLayer::updateLevelColors @ 0x58c556
// > GJBaseGameLayer::updateLevelColors @ 0x58c594
// > GJBaseGameLayer::updateLevelColors @ 0x58c5c8
// > GJBaseGameLayer::updateLevelColors @ 0x58c68e
// > GJBaseGameLayer::updateLevelColors @ 0x58c6bc
// > GJBaseGameLayer::updateGradientLayers @ 0x590ff6
// > GJBaseGameLayer::updateGradientLayers @ 0x591016
// > GJBaseGameLayer::updateShaderLayer @ 0x591f06
// > GJBaseGameLayer::updateShaderLayer @ 0x591f3e
// > GJBaseGameLayer::updateShaderLayer @ 0x592042
// > GJBaseGameLayer::processAreaTintGroupAction @ 0x593db0
// > GJBaseGameLayer::visitWithColorFlash @ 0x598476
// > GJBaseGameLayer::visitWithColorFlash @ 0x598496
// > GJBaseGameLayer::visitWithColorFlash @ 0x5984b6
// > GJBaseGameLayer::preUpdateVisibility @ 0x5aeacc
// > GJBaseGameLayer::preUpdateVisibility @ 0x5aeaec
// > GJEffectManager::colorForPulseEffect @ 0x5c392c
// > GJEffectManager::calculateLightBGColor @ 0x5c40e2
// > GJEffectManager::processCopyColorPulseActions @ 0x5c6568
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:53:51 +0000
//
int __fastcall GJEffectManager::activeColorForIndex(GJEffectManager *this, int a2)
{
unsigned __int8 v2; // r3
cocos2d::CCObject *ColorSprite; // r0
char v4; // r1
char v5; // r2
__int16 v7; // [sp+4h] [bp-8h]
if ( a2 == 1010 )
{
v2 = 0;
v7 = 0;
}
else if ( a2 != 1011 && a2 )
{
ColorSprite = GJEffectManager::getColorSprite(this, a2);
if ( ColorSprite )
{
v4 = *((_BYTE *)ColorSprite + 271);
v5 = *((_BYTE *)ColorSprite + 272);
v2 = *((_BYTE *)ColorSprite + 273);
}
else
{
v2 = -1;
v5 = -1;
v4 = -1;
}
LOBYTE(v7) = v4;
HIBYTE(v7) = v5;
}
else
{
v2 = -1;
v7 = -1;
}
return (unsigned __int8)v7 | (unsigned __int16)(HIBYTE(v7) << 8) | (v2 << 16);
}