//
// GJEffectManager::getColorSprite from 0x499c52 to 0x499c9e (76 bytes)
//
// 14 xrefs:
// > GameObject::setupColorSprite @ 0x358cf8
// > GameObject::setupColorSprite @ 0x358d02
// > LevelEditorLayer::transferDefaultColors @ 0x367bf0
// > LevelEditorLayer::transferDefaultColors @ 0x367c16
// > LevelEditorLayer::transferDefaultColors @ 0x367c3c
// > LevelEditorLayer::transferDefaultColors @ 0x367c62
// > GJBaseGameLayer::updateColor @ 0x46c0a8
// > GJEffectManager::activeColorForIndex @ 0x499cd0
// > GJEffectManager::activeOpacityForIndex @ 0x499d1e
// > GJEffectManager::setColorAction @ 0x499d6e
// > GJEffectManager::calculateInheritedColor @ 0x49a4a8
// > GJEffectManager::calculateLightBGColor @ 0x49aae6
// > GJEffectManager::calculateLightBGColor @ 0x49aafe
// > GJEffectManager::processCopyColorPulseActions @ 0x49c824
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
ColorActionSprite *GJEffectManager::getColorSprite(GJEffectManager *a1, int a2)
{
intptr_t v2; // r4
ColorActionSprite *v4; // r5
ColorActionSprite *v5; // r0
void (__fastcall *addChild)(cocos2d::CCNode *__hidden, cocos2d::CCNode *); // r3
if ( a2 > 1100 )
v2 = 1101;
else
v2 = a2 & ~(a2 >> 31);
v4 = a1->m_colorActionSpriteVector.m_start[v2];
if ( !v4 )
{
v5 = ColorActionSprite::create();
addChild = a1->addChild;
v4 = v5;
v5->m_colorID = v2;
addChild(a1, v5);
a1->m_colorActionSpriteVector.m_start[v2] = v4;
cocos2d::CCDictionary::setObject(a1->m_unkDict150, v4, v2);
}
return v4;
}