//
// GJEffectManager::calculateBaseActiveColors from 0x499b34 to 0x499bea (182 bytes)
//
// 3 xrefs:
// > PlayLayer::loadDefaultColors @ 0x31b002
// > GJEffectManager::processColors @ 0x49c93c
// > GJEffectManager::loadFromState @ 0x4a6c44
//
// 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
//
void GJEffectManager::calculateBaseActiveColors(GJEffectManager *a1)
{
cocos2d::CCDictionary *m_unkDict150; // r3
cocos2d::CCDictElement *m_pElements; // r3
cocos2d::CCDictElement *next; // r6
cocos2d::CCObject *m_pObject; // r7
int m_nLuaID; // r3
cocos2d::CCObjectType m_eObjType; // r4
char v7; // r3
cocos2d::CCDictElement *v8; // r2
int v9; // r4
float v10; // r1
float v11; // r2
int v12; // r3
int v13; // r0
__int16 v14; // [sp+8h] [bp-18h] BYREF
char v15; // [sp+Ah] [bp-16h]
float v16; // [sp+Ch] [bp-14h]
float v17; // [sp+10h] [bp-10h]
float v18; // [sp+14h] [bp-Ch]
int v19; // [sp+18h] [bp-8h]
m_unkDict150 = a1->m_unkDict150;
if ( m_unkDict150 )
{
m_pElements = m_unkDict150->m_pElements;
if ( m_pElements )
next = (cocos2d::CCDictElement *)m_pElements->hh.next;
else
next = nullptr;
while ( m_pElements )
{
m_pObject = m_pElements->m_pObject;
m_nLuaID = m_pObject[5].m_nLuaID;
m_eObjType = m_pObject[5].m_eObjType;
v14 = m_nLuaID;
v15 = BYTE2(m_nLuaID);
if ( m_eObjType && *(int *)(m_eObjType + 116) > 0 && !*(_BYTE *)(m_eObjType + 122) )
{
v9 = m_eObjType + 100;
v10 = *(float *)(v9 + 4);
v11 = *(float *)(v9 + 8);
v12 = *(_DWORD *)(v9 + 12);
v16 = *(float *)v9;
v17 = v10;
v18 = v11;
v19 = v12;
v13 = GameToolbox::transformColor((unsigned __int8 *)&v14, v16, v10, v11, v12);
v14 = v13;
v15 = BYTE2(v13);
}
v7 = v15;
*(_WORD *)((char *)&m_pObject[5].m_nLuaID + 3) = v14;
BYTE1(m_pObject[5].m_nTag) = v7;
if ( next )
v8 = (cocos2d::CCDictElement *)next->hh.next;
else
v8 = nullptr;
m_pElements = next;
next = v8;
}
}
}