//
// SetupCameraOffsetTrigger::determineStartValues from 0x501664 to 0x501864 (512 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 SetupCameraOffsetTrigger::determineStartValues(SetupCameraOffsetTrigger *a1)
{
cocos2d::CCArray *v2; // r0
cocos2d::CCArray *m_gameObjects; // r11
float v4; // s17
int v5; // r8
int x; // r7
EasingType v7; // r9
unsigned int v8; // r6
float v9; // s18
int v10; // r0
int v11; // r10
float *v12; // r3
float *v13; // r3
const cocos2d::CCPoint *v14; // r1
const cocos2d::CCPoint *v15; // r1
int y; // [sp+0h] [bp-34h]
int v17; // [sp+4h] [bp-30h]
int v18; // [sp+8h] [bp-2Ch]
int v19; // [sp+Ch] [bp-28h]
int v20; // [sp+10h] [bp-24h]
int v21; // [sp+14h] [bp-20h]
int v22; // [sp+18h] [bp-1Ch]
cocos2d::CCPoint v23; // [sp+24h] [bp-10h] BYREF
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;
}
a1->m_moveTime = -99999.0;
a1->m_cameraEasingType = -99999;
a1->m_offsetX = -99999;
a1->m_offsetY = -99999;
a1->m_cameraEasingRate = -99999.0;
if ( m_gameObjects && cocos2d::CCArray::count(m_gameObjects) )
{
v4 = -99999.0;
v5 = -99999;
x = -99999;
v7 = -99999;
v8 = 0;
y = -99999;
v22 = 0;
v9 = -99999.0;
v21 = 0;
v20 = 0;
v19 = 0;
v18 = 0;
v17 = 0;
while ( v8 < cocos2d::CCArray::count(m_gameObjects) )
{
v10 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v8);
v11 = v10;
if ( !v17 )
{
v12 = (float *)(v10 + 1264);
if ( v9 == -99999.0 )
{
v9 = *v12;
}
else if ( v9 != *v12 )
{
v9 = -99999.0;
v17 = 1;
}
}
if ( !v18 )
{
if ( v7 == -99999 )
{
v7 = *(_DWORD *)(v10 + 1308);
}
else if ( v7 != *(_DWORD *)(v10 + 1308) )
{
v7 = -99999;
v18 = 1;
}
}
if ( !v19 )
{
v13 = (float *)(v10 + 1312);
if ( v4 == -99999.0 )
{
v4 = *v13;
}
else if ( v4 != *v13 )
{
v4 = -99999.0;
v19 = 1;
}
}
if ( !v20 )
{
v14 = (const cocos2d::CCPoint *)(v10 + 1300);
if ( x == -99999 )
{
cocos2d::CCPoint::CCPoint(&v23, v14);
x = (int)v23.x;
}
else
{
cocos2d::CCPoint::CCPoint(&v23, v14);
if ( x != (int)v23.x )
{
x = -99999;
v20 = 1;
}
}
}
if ( !v21 )
{
v15 = (const cocos2d::CCPoint *)(v11 + 1300);
if ( y == -99999 )
{
cocos2d::CCPoint::CCPoint(&v23, v15);
y = (int)v23.y;
}
else
{
cocos2d::CCPoint::CCPoint(&v23, v15);
if ( y != (int)v23.y )
{
v21 = 1;
y = -99999;
}
}
}
if ( !v22 )
{
if ( v5 == -99999 )
{
v5 = *(_DWORD *)(v11 + 1324);
}
else if ( v5 != *(_DWORD *)(v11 + 1324) )
{
v5 = -99999;
v22 = 1;
}
}
++v8;
}
if ( v9 != -99999.0 )
a1->m_moveTime = v9;
if ( v7 != -99999 )
a1->m_cameraEasingType = v7;
if ( v4 != -99999.0 )
a1->m_cameraEasingRate = v4;
if ( x != -99999 )
a1->m_offsetX = x;
if ( y != -99999 )
a1->m_offsetY = y;
if ( v5 != -99999 )
a1->m_targetMode = v5;
}
}