//
// GJEffectManager::setupFromString from 0x49dd30 to 0x49de70 (320 bytes)
//
// 1 xrefs:
// > LevelSettingsObject::objectFromDict @ 0x36d128
//
// 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
//
unsigned int __fastcall GJEffectManager::setupFromString(GJEffectManager *a1, char **a2)
{
cocos2d::CCArray *v3; // r0
cocos2d::CCArray *v4; // r9
int v5; // r7
int v6; // r6
const std::string *v7; // r1
cocos2d::CCObject *v8; // r0
unsigned int v9; // r6
cocos2d::CCString *v10; // r0
char *CString; // r0
ColorAction *v12; // r0
ColorAction *v13; // r7
int m_colorID; // r2
unsigned int result; // r0
int v16; // [sp+0h] [bp-24h]
int v17; // [sp+10h] [bp-14h] BYREF
char *v18; // [sp+14h] [bp-10h] BYREF
std::string v19; // [sp+18h] [bp-Ch] BYREF
v3 = (cocos2d::CCArray *)sub_776584((int)&v17, *a2);
v4 = (cocos2d::CCArray *)cocos2d::CCArray::create(v3);
v5 = sub_774A78((int)&v17, "|");
v6 = 0;
v16 = *(_DWORD *)(v17 - 12);
while ( 1 )
{
sub_776158(&v18, &v17, v6, v5 - v6);
if ( *((_DWORD *)v18 - 3) || v6 != v16 )
{
sub_776584((int)&v19, v18);
v8 = (cocos2d::CCObject *)cocos2d::CCString::create((cocos2d::CCString *)&v19, v7);
cocos2d::CCArray::addObject(v4, v8);
sub_774008(&v19);
}
if ( v5 == -1 )
break;
v6 = v5 + 1;
v5 = sub_774A78((int)&v17, "|");
sub_774008(&v18);
}
v9 = 0;
sub_774008(&v18);
sub_774008(&v17);
while ( 1 )
{
result = cocos2d::CCArray::count(v4);
if ( v9 >= result )
break;
v10 = cocos2d::CCArray::stringAtIndex(v4, v9);
CString = (char *)cocos2d::CCString::getCString(v10);
v12 = (ColorAction *)sub_776584((int)&v18, CString);
v13 = ColorAction::create(v12);
sub_775C20(&v19);
ColorAction::setupFromString(v13, &v19);
sub_774008(&v19);
m_colorID = v13->m_colorID;
if ( m_colorID <= 1101 )
GJEffectManager::setColorAction(a1, v13, m_colorID);
++v9;
sub_774008(&v18);
}
return result;
}