//
// SetupCameraModePopup::determineStartValues from 0x140414bf0 to 0x140414daa (442 bytes)
//
// 4 xrefs:
// > ??> @ 0x1405df410
// > ??> @ 0x14069f9ac
// > ??> @ 0x14069f9f4
// > ??> @ 0x1406d8e10
//
// 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 SetupCameraModePopup::determineStartValues(SetupCameraModePopup *a1)
{
__int64 v2; // rcx
cocos2d::CCArray *m_gameObjects; // rdi
char v4; // bp
unsigned int v5; // esi
char v6; // r14
float v7; // xmm7_4
float v8; // xmm8_4
struct cocos2d::CCObject *v9; // rax
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 )
{
if ( cocos2d::CCArray::count(m_gameObjects) )
{
v4 = 0;
v5 = 0;
v6 = 0;
v7 = -99999.0;
v8 = -99999.0;
*(_WORD *)&a1->m_freeMode = 257;
a1->m_cameraModeObjects = 1;
if ( cocos2d::CCArray::count(m_gameObjects) )
{
do
{
v9 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v5);
if ( !LOBYTE(v9[31].m_eObjType) )
a1->m_freeMode = 0;
if ( !BYTE1(v9[31].m_eObjType) )
a1->m_cameraSettingsEnabled = 0;
if ( !v4 )
{
if ( v8 == -99999.0 )
{
v8 = *(float *)&v9[31].m_uIndexInArray;
}
else if ( v8 != *(float *)&v9[31].m_uIndexInArray )
{
v8 = -99999.0;
v4 = 1;
}
}
if ( !v6 )
{
if ( v7 == -99999.0 )
{
v7 = *(float *)&v9[31].m_uUnknown;
}
else if ( v7 != *(float *)&v9[31].m_uUnknown )
{
v7 = -99999.0;
v6 = 1;
}
}
if ( v9[18].m_eObjType != 2925 )
a1->m_cameraModeObjects = 0;
++v5;
}
while ( v5 < cocos2d::CCArray::count(m_gameObjects) );
if ( v8 != -99999.0 )
a1->m_cameraEasing = (int)v8;
if ( v7 != -99999.0 )
a1->m_cameraPadding = v7;
}
}
}
if ( !a1->m_cameraSettingsEnabled )
{
a1->m_cameraEasing = 10;
a1->m_cameraPadding = 0.5;
}
}