//
// GJEffectManager::colorForGroupID from 0x49be34 to 0x49bf14 (224 bytes)
//
// 5 xrefs:
// > GameObject::groupColor @ 0x358a64
// > LevelEditorLayer::updateObjectColors @ 0x3678e4
// > LevelEditorLayer::updateObjectColors @ 0x367ade
// > LevelEditorLayer::updateVisibility @ 0x369982
// > LevelEditorLayer::updateVisibility @ 0x369c08
//
// 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
//
cocos2d::ccColor3B GJEffectManager::colorForGroupID(GJEffectManager *a1, int a2, const cocos2d::ccColor3B *a3, bool a4)
{
_BOOL4 v4; // r6
std::uintptr_t *m_bitptr; // r0
unsigned int v7; // r1
unsigned int v8; // r3
int v9; // r0
PulseEffectAction *v11; // r9
PulseEffectAction *i; // r4
int v13; // r0
int v15; // [sp+4h] [bp-18h] BYREF
unsigned int v16; // [sp+Ch] [bp-10h] BYREF
__int16 v17; // [sp+10h] [bp-Ch]
char v18; // [sp+12h] [bp-Ah]
v4 = a4;
m_bitptr = a1->m_unkVector2f0.m_start.m_bitptr;
v15 = a2;
if ( a2 > 9998 )
v7 = 9999;
else
v7 = a2 & ~(a2 >> 31);
v15 = v7;
LOBYTE(v8) = a3->b;
if ( ((1 << (v7 & 0x1F)) & m_bitptr[v7 >> 5]) != 0 )
{
LOWORD(v16) = *(_WORD *)&a3->r;
BYTE2(v16) = v8;
v9 = std::_Hashtable>,std::allocator>>,std::__detail::_Select1st,std::equal_to,std::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits>::find(
&a1->m_pulseEffectMap._M_h._M_buckets,
&v15);
if ( !v9 )
{
LABEL_8:
v17 = v16;
v8 = HIWORD(v16);
goto LABEL_9;
}
v11 = *(PulseEffectAction **)(v9 + 12);
for ( i = *(PulseEffectAction **)(v9 + 8); ; ++i )
{
if ( i == v11 )
goto LABEL_8;
if ( i->m_mainOnly )
{
if ( v4 )
goto LABEL_19;
}
else if ( !i->m_detailOnly )
{
goto LABEL_19;
}
if ( i->m_detailOnly && !v4 )
{
LABEL_19:
*(cocos2d::ccColor3B *)&v13 = GJEffectManager::colorForPulseEffect(a1, (const cocos2d::ccColor3B *)&v16, i);
LOWORD(v16) = v13;
BYTE2(v16) = BYTE2(v13);
continue;
}
}
}
v17 = *(_WORD *)&a3->r;
LABEL_9:
v18 = v8;
return (cocos2d::ccColor3B)((unsigned __int8)v17 | (unsigned __int16)(HIBYTE(v17) << 8) | ((unsigned __int8)v8 << 16));
}