//
// GJPFollowCommandLayer::determineStartValues from 0x4dced0 to 0x4dd102 (562 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 GJPFollowCommandLayer::determineStartValues(GJPFollowCommandLayer *a1)
{
EffectGameObject *m_gameObject; // r3
float *p_m_followYDelay; // r2
float *p_m_followYMaxSpeed; // r3
int v5; // r2
float v6; // r3
float v7; // s18
unsigned int v8; // r5
int v9; // r11
int v10; // r10
int v11; // r9
int v12; // r7
int v13; // r6
float v14; // s17
float v15; // s19
float v16; // s20
int v17; // r0
float *v18; // r1
float *v19; // r1
float *v20; // r1
float *v21; // r1
int v22; // [sp+4h] [bp-10h]
int v23; // [sp+8h] [bp-Ch]
int v24; // [sp+Ch] [bp-8h]
m_gameObject = a1->m_gameObject;
a1->m_targetGroupID = -99999;
a1->m_offset = -99999;
a1->m_moveTime = -99999.0;
a1->m_speed = -99999.0;
a1->m_delay = -99999.0;
a1->m_maxSpeed = -99999.0;
if ( m_gameObject )
{
a1->m_moveTime = m_gameObject->m_duration;
a1->m_speed = m_gameObject->m_followYSpeed;
p_m_followYDelay = &m_gameObject->m_followYDelay;
p_m_followYMaxSpeed = &m_gameObject->m_followYMaxSpeed;
a1->m_delay = *p_m_followYDelay;
a1->m_targetGroupID = *(int *)(p_m_followYMaxSpeed - 31);
a1->m_touchTriggered = *((_BYTE *)p_m_followYMaxSpeed - 116);
a1->m_spawnTriggered = *((_BYTE *)p_m_followYMaxSpeed - 115);
a1->m_multiTriggered = *((_BYTE *)p_m_followYMaxSpeed + 76);
v5 = *((_DWORD *)p_m_followYMaxSpeed - 1);
v6 = *p_m_followYMaxSpeed;
a1->m_offset = v5;
a1->m_maxSpeed = v6;
}
else
{
v7 = -99999.0;
v8 = 0;
v9 = 0;
v10 = 0;
v11 = 0;
v12 = -99999;
v13 = -99999;
v14 = -99999.0;
a1->m_touchTriggered = 1;
a1->m_spawnTriggered = 1;
a1->m_multiTriggered = 1;
v24 = 0;
v15 = -99999.0;
v23 = 0;
v22 = 0;
v16 = -99999.0;
while ( v8 < cocos2d::CCArray::count(a1->m_gameObjects) )
{
v17 = cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, v8);
if ( !*(_BYTE *)(v17 + 1284) )
a1->m_touchTriggered = 0;
if ( !*(_BYTE *)(v17 + 1285) )
a1->m_spawnTriggered = 0;
if ( !*(_BYTE *)(v17 + 1476) )
a1->m_multiTriggered = 0;
if ( !v22 )
{
v18 = (float *)(v17 + 1264);
if ( v16 == -99999.0 )
{
v16 = *v18;
}
else if ( v16 != *v18 )
{
v16 = -99999.0;
v22 = 1;
}
}
if ( !v23 )
{
v19 = (float *)(v17 + 1388);
if ( v15 == -99999.0 )
{
v15 = *v19;
}
else if ( v15 != *v19 )
{
v15 = -99999.0;
v23 = 1;
}
}
if ( !v24 )
{
v20 = (float *)(v17 + 1400);
if ( v7 == -99999.0 )
{
v7 = *v20;
}
else if ( v7 != *v20 )
{
v7 = -99999.0;
v24 = 1;
}
}
if ( !v11 )
{
v21 = (float *)(v17 + 1392);
if ( v14 == -99999.0 )
{
v14 = *v21;
}
else if ( v14 != *v21 )
{
v14 = -99999.0;
v11 = 1;
}
}
if ( !v10 )
{
if ( v12 == -99999 )
{
v12 = *(_DWORD *)(v17 + 1276);
}
else if ( v12 != *(_DWORD *)(v17 + 1276) )
{
v12 = -99999;
v10 = 1;
}
}
if ( !v9 )
{
if ( v13 == -99999 )
{
v13 = *(_DWORD *)(v17 + 1396);
}
else if ( v13 != *(_DWORD *)(v17 + 1396) )
{
v13 = -99999;
v9 = 1;
}
}
++v8;
}
if ( v16 != -99999.0 )
a1->m_moveTime = v16;
if ( v15 != -99999.0 )
a1->m_speed = v15;
if ( v7 != -99999.0 )
a1->m_maxSpeed = v7;
if ( v14 != -99999.0 )
a1->m_delay = v14;
if ( v12 != -99999 )
a1->m_targetGroupID = v12;
if ( v13 != -99999 )
a1->m_offset = v13;
}
}