//
// SetupCameraOffsetTrigger::determineStartValues from 0x1404166b0 to 0x1404169ef (831 bytes)
//
// 4 xrefs:
// > ??> @ 0x1405dfc70
// > ??> @ 0x14069fb24
// > ??> @ 0x14069fb58
// > ??> @ 0x1406d8ee8
//
// 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)
{
__int64 v2; // rcx
cocos2d::CCArray *m_gameObjects; // r14
EasingType v4; // ebp
int x; // r12d
int m_nTag; // esi
int y; // r15d
unsigned int v8; // r13d
float v9; // xmm7_4
float v10; // xmm8_4
char v11; // bl
struct cocos2d::CCObject *v12; // rax
struct cocos2d::CCObject *v13; // rdi
EasingType v14; // eax
char v15; // [rsp+20h] [rbp-A8h]
char v16; // [rsp+21h] [rbp-A7h]
cocos2d::CCPoint v17; // [rsp+24h] [rbp-A4h] BYREF
cocos2d::CCPoint v18; // [rsp+2Ch] [rbp-9Ch] BYREF
cocos2d::CCPoint v19; // [rsp+34h] [rbp-94h] BYREF
cocos2d::CCPoint v20; // [rsp+3Ch] [rbp-8Ch] BYREF
char v22; // [rsp+D8h] [rbp+10h]
char v23; // [rsp+E0h] [rbp+18h]
char v24; // [rsp+E8h] [rbp+20h]
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 )
{
if ( cocos2d::CCArray::count(m_gameObjects) )
{
v4 = -99999;
x = -99999;
m_nTag = -99999;
y = -99999;
v8 = 0;
v9 = -99999.0;
v24 = 0;
v16 = 0;
v10 = -99999.0;
v22 = 0;
v23 = 0;
v15 = 0;
if ( cocos2d::CCArray::count(m_gameObjects) )
{
v11 = 0;
do
{
v12 = cocos2d::CCArray::objectAtIndex(m_gameObjects, v8);
v13 = v12;
if ( !v22 )
{
if ( v10 == -99999.0 )
{
v10 = *(float *)&v12[26].m_nLuaID;
}
else if ( v10 != *(float *)&v12[26].m_nLuaID )
{
v10 = -99999.0;
v22 = 1;
}
}
if ( !v23 )
{
v14 = (EasingType)v12[27].__vftable;
if ( v4 == -99999 )
{
v4 = v14;
}
else if ( v4 != v14 )
{
v4 = -99999;
v23 = 1;
}
}
if ( !v24 )
{
if ( v9 == -99999.0 )
{
v9 = *((float *)&v13[27].__vftable + 1);
}
else if ( v9 != *((float *)&v13[27].__vftable + 1) )
{
v9 = -99999.0;
v24 = 1;
}
}
if ( !v15 )
{
if ( x == -99999 )
{
cocos2d::CCPoint::CCPoint(&v17);
x = (int)v17.x;
}
else
{
cocos2d::CCPoint::CCPoint(&v18);
if ( x != (int)v18.x )
{
x = -99999;
v15 = 1;
}
}
}
if ( !v16 )
{
if ( y == -99999 )
{
cocos2d::CCPoint::CCPoint(&v19);
y = (int)v19.y;
}
else
{
cocos2d::CCPoint::CCPoint(&v20);
if ( y != (int)v20.y )
{
y = -99999;
v16 = 1;
}
}
}
if ( !v11 )
{
if ( m_nTag == -99999 )
{
m_nTag = v13[27].m_nTag;
}
else if ( m_nTag != v13[27].m_nTag )
{
m_nTag = -99999;
v11 = 1;
}
}
++v8;
}
while ( v8 < cocos2d::CCArray::count(m_gameObjects) );
if ( v10 != -99999.0 )
a1->m_moveTime = v10;
if ( v4 != -99999 )
a1->m_cameraEasingType = v4;
if ( v9 != -99999.0 )
a1->m_cameraEasingRate = v9;
if ( x != -99999 )
a1->m_offsetX = x;
if ( y != -99999 )
a1->m_offsetY = y;
if ( m_nTag != -99999 )
a1->m_targetMode = m_nTag;
}
}
}
}