//
// GJEffectManager::getColorSprite from 0x140365fb0 to 0x1403660fe (334 bytes)
//
// 73 xrefs:
// > GameObject::saveActiveColors @ 0x14029d931
// > GameObject::saveActiveColors @ 0x14029d94a
// > GJBaseGameLayer::updateLevelColors @ 0x140312651
// > GJBaseGameLayer::updateLevelColors @ 0x1403126a7
// > GJBaseGameLayer::updateLevelColors @ 0x1403127bb
// > GJBaseGameLayer::updateLevelColors @ 0x1403128c6
// > GJBaseGameLayer::updateLevelColors @ 0x140312905
// > GJBaseGameLayer::updateLevelColors @ 0x140312aa4
// > GJBaseGameLayer::updateLevelColors @ 0x140312b37
// > GJBaseGameLayer::updateLevelColors @ 0x140312bc8
// > GJBaseGameLayer::updateLevelColors @ 0x140312c08
// > GJBaseGameLayer::updateGradientLayers @ 0x140327df2
// > GJBaseGameLayer::updateGradientLayers @ 0x140327eb9
// > GJBaseGameLayer::updateGradientLayers @ 0x140328033
// > GJBaseGameLayer::updateGradientLayers @ 0x140328068
// > GJBaseGameLayer::updateShaderLayer @ 0x14032a097
// > GJBaseGameLayer::updateShaderLayer @ 0x14032a10e
// > GJBaseGameLayer::updateShaderLayer @ 0x14032a375
// > GJBaseGameLayer::updateColor @ 0x14032b65a
// > GJBaseGameLayer::processAreaTintGroupAction @ 0x140333846
// > GJBaseGameLayer::preUpdateVisibility @ 0x14033f6da
// > GJBaseGameLayer::preUpdateVisibility @ 0x14033f6eb
// > GJBaseGameLayer::visitWithColorFlash @ 0x1403525c3
// > GJBaseGameLayer::visitWithColorFlash @ 0x140352605
// > GJBaseGameLayer::visitWithColorFlash @ 0x140352646
// > GJEffectManager::calculateInheritedColor @ 0x140365b8c
// > GJEffectManager::getColorAction @ 0x140365f71
// > GJEffectManager::setColorAction @ 0x140366155
// > GJEffectManager::processCopyColorPulseActions @ 0x14036bcd3
// > GJEffectManager::processCopyColorPulseActions @ 0x14036bcf7
// > GJEffectManager::colorForPulseEffect @ 0x14036c134
// > GJEffectManager::calculateLightBGColor @ 0x14036e290
// > GJEffectManager::calculateLightBGColor @ 0x14036e423
// > GJEffectManager::calculateLightBGColor @ 0x14036e43e
// > LevelEditorLayer::init @ 0x1403ee96c
// > LevelEditorLayer::init @ 0x1403eea02
// > LevelEditorLayer::updateVisibility @ 0x1403f6529
// > LevelEditorLayer::updateVisibility @ 0x1403f6a74
// > LevelEditorLayer::updateVisibility @ 0x1403f6ace
// > LevelEditorLayer::updateVisibility @ 0x1403f6b46
// > LevelEditorLayer::updateVisibility @ 0x1403f6cbe
// > LevelEditorLayer::updateVisibility @ 0x1403f6e3d
// > LevelEditorLayer::updateVisibility @ 0x1403f7123
// > LevelEditorLayer::updateObjectColors @ 0x1403f7555
// > LevelEditorLayer::updateObjectColors @ 0x1403f75ac
// > LevelEditorLayer::updateObjectColors @ 0x1403f7618
// > LevelEditorLayer::updateObjectColors @ 0x1403f777d
// > LevelEditorLayer::updateObjectColors @ 0x1403f78f0
// > LevelEditorLayer::updateObjectColors @ 0x1403f7bb8
// > LevelEditorLayer::getNextColorChannel @ 0x1403f9bf2
// > LevelEditorLayer::transferDefaultColors @ 0x1403fa798
// > LevelEditorLayer::transferDefaultColors @ 0x1403fa817
// > LevelEditorLayer::transferDefaultColors @ 0x1403fa84f
// > LevelEditorLayer::transferDefaultColors @ 0x1403fa87f
// > LevelEditorLayer::transferDefaultColors @ 0x1403fa8af
// > LevelEditorLayer::transferDefaultColors @ 0x1403fa8df
// > LevelEditorLayer::transferDefaultColors @ 0x1403fa8fe
// > LevelEditorLayer::updateGameObjects @ 0x1403fb129
// > LevelEditorLayer::postUpdate @ 0x1404008fe
// > LevelSettingsObject::init @ 0x14040eab7
// > LevelSettingsObject::init @ 0x14040eb16
// > LevelSettingsObject::init @ 0x14040eb75
// > LevelSettingsObject::init @ 0x14040ebd8
// > LevelSettingsObject::init @ 0x14040ec37
// > LevelSettingsObject::init @ 0x14040ec96
// > PlayerObject::ringJump @ 0x1404f7d3c
// > PlayLayer::setupHasCompleted @ 0x140504b63
// > PlayLayer::setupHasCompleted @ 0x140504bf6
// > PlayLayer::updateVisibility @ 0x14050df4a
// > PlayLayer::updateVisibility @ 0x14050e004
// > PlayLayer::updateVisibility @ 0x14050e04c
// > PlayLayer::applyCustomEnterEffect @ 0x14050f700
// > ??> @ 0x1409216c8
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:30:54 +0000
//
// Hidden C++ exception states: #wind=1
char *__fastcall GJEffectManager::getColorSprite(__int64 a1, int a2)
{
int v2; // esi
char *result; // rax
char *v5; // rbx
bool v6; // al
v2 = a2;
if ( a2 < 0 )
v2 = 0;
if ( v2 > 1101 )
v2 = 1101;
result = *(char **)(*(_QWORD *)(a1 + 760) + 8LL * v2);
if ( !result )
{
v5 = (char *)operator new(0x160u);
cocos2d::CCNode::CCNode((cocos2d::CCNode *)v5);
*(_QWORD *)v5 = &ColorActionSprite::`vftable';
*((_DWORD *)v5 + 80) = 1132396544;
*((_DWORD *)v5 + 83) = 0;
*((_QWORD *)v5 + 43) = 0;
v6 = cocos2d::CCNode::init((cocos2d::CCNode *)v5);
if ( v6 )
{
*(_WORD *)(v5 + 327) = -1;
v5[329] = -1;
*((_WORD *)v5 + 162) = -1;
v6 = 1;
v5[326] = -1;
*((_DWORD *)v5 + 80) = 1132396544;
}
if ( v6 )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v5);
}
else
{
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v5 + 8LL))(v5, 1);
v5 = nullptr;
}
*((_DWORD *)v5 + 83) = v2;
(*(void (__fastcall **)(__int64, char *))(*(_QWORD *)a1 + 464LL))(a1, v5);
*(_QWORD *)(*(_QWORD *)(a1 + 760) + 8LL * v2) = v5;
cocos2d::CCDictionary::setObject(*(cocos2d::CCDictionary **)(a1 + 336), (struct cocos2d::CCObject *)v5, v2);
return v5;
}
return result;
}