//
// SetupPulsePopup::determineStartValues from 0x4bcec8 to 0x4bd1d6 (782 bytes)
//
// 0 xrefs:
//
// 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 SetupPulsePopup::determineStartValues(SetupPulsePopup *a1)
{
cocos2d::CCArray *v2; // r0
cocos2d::CCArray *m_gameObjects; // r8
float v4; // s16
int v5; // r7
unsigned int v6; // r11
int v7; // r6
int v8; // r10
float v9; // s21
int v10; // r9
float v11; // r1
float v12; // r2
int v13; // r3
float v14; // s17
int v15; // r0
float *v16; // r2
float *v17; // r2
float *v18; // r2
int v19; // r12
int v20; // r9
int v21; // r1
int v22; // r2
int v23; // r3
float v24; // r1
float v25; // r2
int v26; // r3
int v27; // r3
int m_targetGroupID; // r2
int v29; // r3
int m_copyColorID; // r2
int v31; // r3
int v32; // r3
float v33; // s15
float v34; // s14
int v35; // [sp+4h] [bp-30h]
int v36; // [sp+8h] [bp-2Ch]
SetupTriggerPopup::determineStartValues(a1);
if ( a1->m_gameObject )
{
m_gameObjects = (cocos2d::CCArray *)cocos2d::CCArray::create(v2);
cocos2d::CCArray::addObject(m_gameObjects, a1->m_gameObject);
}
else
{
m_gameObjects = a1->m_gameObjects;
}
if ( !m_gameObjects || !cocos2d::CCArray::count(m_gameObjects) )
return;
v4 = -1.0;
v5 = -1;
a1->m_groupMainOnly = 1;
v6 = 0;
v7 = 1;
v8 = 0;
*(_WORD *)&a1->m_currentColor.r = -1;
a1->m_currentColor.b = -1;
v9 = -1.0;
a1->m_groupSecondaryOnly = 1;
a1->m_pulseExclusive = 1;
a1->m_staticHSV = 1;
v10 = -1;
v11 = *(float *)&dword_AC6B50;
v12 = *(float *)&dword_AC6B54;
v13 = *(_DWORD *)&byte_AC6B58;
v14 = -1.0;
v36 = 1;
v35 = 0;
LODWORD(a1->m_hsv.h) = dword_AC6B4C;
a1->m_hsv.s = v11;
a1->m_hsv.v = v12;
*(_DWORD *)&a1->m_hsv.absoluteSaturation = v13;
a1->m_targetGroupID = -1;
a1->m_copyColorID = -1;
while ( v6 < cocos2d::CCArray::count(m_gameObjects) )
{
v15 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v6);
if ( !*(_BYTE *)(v15 + 1445) )
a1->m_groupMainOnly = 0;
if ( !*(_BYTE *)(v15 + 1446) )
a1->m_groupSecondaryOnly = 0;
if ( !*(_BYTE *)(v15 + 1447) )
a1->m_pulseExclusive = 0;
if ( !*(_BYTE *)(v15 + 1448) )
a1->m_staticHSV = 0;
v16 = (float *)(v15 + 1404);
if ( v14 == -1.0 )
{
v14 = *v16;
}
else if ( v14 != *v16 )
{
v14 = -2.0;
}
v17 = (float *)(v15 + 1408);
if ( v9 == -1.0 )
{
v9 = *v17;
}
else if ( v9 != *v17 )
{
v9 = -2.0;
}
v18 = (float *)(v15 + 1412);
if ( v4 == -1.0 )
{
v4 = *v18;
}
else if ( v4 != *v18 )
{
v4 = -2.0;
}
if ( v10 == -1 )
{
v19 = *(_DWORD *)(v15 + 1416);
}
else if ( v10 == *(_DWORD *)(v15 + 1416) )
{
v19 = *(_DWORD *)(v15 + 1416);
}
else
{
v19 = -2;
}
if ( v5 == -1 )
{
v20 = *(_DWORD *)(v15 + 1420);
}
else if ( v5 == *(_DWORD *)(v15 + 1420) )
{
v20 = *(_DWORD *)(v15 + 1420);
}
else
{
v20 = -2;
}
if ( !v35 )
{
v21 = *(unsigned __int8 *)(v15 + 1260);
v22 = *(unsigned __int8 *)(v15 + 1261);
v23 = *(unsigned __int8 *)(v15 + 1262);
if ( v36 )
{
a1->m_currentColor.b = v23;
a1->m_currentColor.r = v21;
a1->m_currentColor.g = v22;
v36 = 0;
}
else if ( a1->m_currentColor.r != v21 || a1->m_currentColor.g != v22 || a1->m_currentColor.b != v23 )
{
*(_WORD *)&a1->m_currentColor.r = -1;
a1->m_currentColor.b = -1;
v35 = 1;
}
}
if ( !v8 )
{
v24 = *(float *)(v15 + 1428);
v25 = *(float *)(v15 + 1432);
v26 = *(_DWORD *)(v15 + 1436);
if ( v7 )
{
v7 = 0;
a1->m_hsv.h = *(float *)(v15 + 1424);
a1->m_hsv.s = v24;
a1->m_hsv.v = v25;
*(_DWORD *)&a1->m_hsv.absoluteSaturation = v26;
goto LABEL_55;
}
if ( a1->m_hsv.h == *(float *)(v15 + 1424)
&& a1->m_hsv.s == *(float *)(v15 + 1428)
&& a1->m_hsv.v == *(float *)(v15 + 1432) )
{
v27 = *(unsigned __int16 *)&a1->m_hsv.absoluteSaturation
- (unsigned __int16)v26
+ (*(unsigned __int16 *)&a1->m_hsv.absoluteSaturation == (unsigned __int16)v26)
+ (unsigned __int16)v26
- *(unsigned __int16 *)&a1->m_hsv.absoluteSaturation;
if ( v27 )
goto LABEL_55;
}
else
{
LOBYTE(v27) = 0;
}
a1->m_hsv.h = -0.001;
v8 = 1;
a1->m_hsv.absoluteSaturation = v27;
a1->m_hsv.absoluteBrightness = v27;
a1->m_hsv.s = 0.0;
a1->m_hsv.v = 0.0;
}
LABEL_55:
m_targetGroupID = a1->m_targetGroupID;
v29 = *(_DWORD *)(v15 + 1276);
if ( m_targetGroupID != -1 )
{
if ( m_targetGroupID == v29 )
goto LABEL_59;
v29 = 0;
}
a1->m_targetGroupID = v29;
LABEL_59:
m_copyColorID = a1->m_copyColorID;
v31 = *(_DWORD *)(v15 + 1440);
if ( m_copyColorID != -1 )
{
if ( m_copyColorID == v31 )
goto LABEL_63;
v31 = 0;
}
a1->m_copyColorID = v31;
LABEL_63:
v5 = v20;
++v6;
v10 = v19;
}
v32 = v10 | (v10 >> 31);
v33 = -0.1;
a1->m_pulseMode = v32;
if ( v14 < 0.0 )
v14 = -0.1;
a1->m_fadeInTime = v14;
if ( v9 >= 0.0 )
v34 = v9;
else
v34 = -0.1;
if ( v4 >= 0.0 )
v33 = v4;
a1->m_holdTime = v34;
if ( v5 >= 0 )
a1->m_pulseTargetType = v5;
else
v32 = -1;
if ( v5 < 0 )
a1->m_pulseTargetType = v32;
a1->m_fadeOutTime = v33;
}