//
// SetupStaticCameraPopup::init from 0x10039b3b0 to 0x10039bd12 (2402 bytes)
//
// 1 xrefs:
// > SetupStaticCameraPopup::create @ 0x10039b36b
//
// 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
//
bool __fastcall SetupStaticCameraPopup::init(
SetupStaticCameraPopup *a1,
CameraTriggerGameObject *a2,
cocos2d::CCArray *a3)
{
bool result; // al
bool v4; // r12
int v5; // r14d
__m128 v6; // xmm0
__m128 v7; // xmm0
__m128 v8; // rt1
char v9; // [rsp+38h] [rbp-198h] BYREF
char v10[15]; // [rsp+39h] [rbp-197h] BYREF
void *v11; // [rsp+48h] [rbp-188h]
__int128 v12; // [rsp+50h] [rbp-180h] BYREF
void *v13; // [rsp+60h] [rbp-170h]
char v14; // [rsp+68h] [rbp-168h] BYREF
char v15[15]; // [rsp+69h] [rbp-167h] BYREF
void *v16; // [rsp+78h] [rbp-158h]
void *v17[3]; // [rsp+80h] [rbp-150h] BYREF
char v18; // [rsp+98h] [rbp-138h] BYREF
_BYTE v19[23]; // [rsp+99h] [rbp-137h] BYREF
char v20; // [rsp+B0h] [rbp-120h] BYREF
_BYTE v21[23]; // [rsp+B1h] [rbp-11Fh] BYREF
float v22[2]; // [rsp+C8h] [rbp-108h] BYREF
void *v23[3]; // [rsp+D0h] [rbp-100h] BYREF
__int128 v24; // [rsp+E8h] [rbp-E8h] BYREF
void *v25; // [rsp+F8h] [rbp-D8h]
__int128 v26; // [rsp+100h] [rbp-D0h] BYREF
void *v27; // [rsp+110h] [rbp-C0h]
__int128 v28; // [rsp+118h] [rbp-B8h] BYREF
void *v29; // [rsp+128h] [rbp-A8h]
__int128 v30; // [rsp+130h] [rbp-A0h] BYREF
void *v31; // [rsp+140h] [rbp-90h]
__int128 v32; // [rsp+148h] [rbp-88h] BYREF
void *v33; // [rsp+158h] [rbp-78h]
char v34; // [rsp+160h] [rbp-70h] BYREF
char v35[15]; // [rsp+161h] [rbp-6Fh] BYREF
void *v36; // [rsp+170h] [rbp-60h]
char v37; // [rsp+178h] [rbp-58h] BYREF
_BYTE v38[23]; // [rsp+179h] [rbp-57h] BYREF
float v39; // [rsp+194h] [rbp-3Ch]
unsigned __int64 v40; // [rsp+198h] [rbp-38h] BYREF
double v41; // [rsp+1A0h] [rbp-30h] BYREF
unsigned __int64 v42[5]; // [rsp+1A8h] [rbp-28h] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 420.0, 310.0, 1);
if ( result )
{
v4 = result;
SetupTriggerPopup::preSetup(a1);
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v22);
sub_10028CBE0((float *)&v40, v22[0] * 0.5, v22[1] * 0.5);
strcpy((char *)v23, "&Setup Static Camera");
SetupTriggerPopup::addTitle((__int64)a1, (__int64)v23);
if ( ((__int64)v23[0] & 1) != 0 )
operator delete(v23[2]);
v9 = 8;
strcpy(v10, "Help");
v13 = operator new(0x180u);
*(_QWORD *)&v12 = 385;
*((_QWORD *)&v12 + 1) = 378;
strcpy(
(char *)v13,
"Makes the camera static around a target object.\n"
"Follow makes the camera change according to the object's movement.\n"
"Smooth Velocity makes the transition to the target adapt to current camera velocity. Recommended no easing"
".\n"
"Duration is how long the camera takes to change to the target object.\n"
"Use another trigger with Exit Static to stop.");
SetupTriggerPopup::addHelpButton((__int64)a1, (__int64)&v9, &v12, (__m128)0x3F800000u);
if ( (v12 & 1) != 0 )
operator delete(v13);
if ( (v9 & 1) != 0 )
operator delete(v11);
v14 = 4;
strcpy(v15, "OK");
SetupTriggerPopup::addCloseButton((__int64)a1, (__int64)&v14);
if ( (v14 & 1) != 0 )
operator delete(v16);
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1);
LOBYTE(v24) = 22;
strcpy((char *)&v24 + 1, "Exit\nStatic");
sub_10028CBE0((float *)v42, (float)(a1->m_width * 0.5) + -80.0, (float)(a1->m_height * 0.5) + -20.0);
sub_10028CCE0(&v41, &v40, v42);
SetupTriggerPopup::createToggleValueControl((int)a1, 110, &v24, 1.0, (__int64)&v41, 0, 0, 0);
if ( (v24 & 1) != 0 )
operator delete(v25);
LOBYTE(v26) = 24;
strcpy((char *)&v26 + 1, "Exit\nInstant");
sub_10028CBE0((float *)v42, (float)(a1->m_width * 0.5) + -80.0, (float)(0.5 * a1->m_height) + -50.0);
sub_10028CCE0(&v41, &v40, v42);
SetupTriggerPopup::createToggleValueControl((int)a1, 465, &v26, 1.0, (__int64)&v41, 0, 0, 0);
if ( (v26 & 1) != 0 )
operator delete(v27);
strcpy((char *)v17, " Target Group ID:");
sub_10028CBE0((float *)v42, -100.0, 80.0);
sub_10028CCE0(&v41, &v40, v42);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
71,
(__int64)v17,
(float *)&v41,
1,
Int,
0.75,
-100.0,
100.0,
10,
1,
0,
0,
0,
0,
0);
if ( ((__int64)v17[0] & 1) != 0 )
operator delete(v17[2]);
v39 = ((float (__fastcall *)(SetupStaticCameraPopup *, __int64))a1->getValue)(a1, 101);
LOBYTE(v28) = 12;
strcpy((char *)&v28 + 1, "X\nOnly");
sub_10028CBE0((float *)v42, 40.0, 80.0);
sub_10028CCE0(&v41, &v40, v42);
v5 = (int)v39;
SetupTriggerPopup::createCustomToggleValueControl((__int64)a1, 1, (int)v39 == 1, 1, &v28, (__int64)&v41, 0, 0, 0);
if ( (v28 & 1) != 0 )
operator delete(v29);
LOBYTE(v30) = 12;
strcpy((char *)&v30 + 1, "Y\nOnly");
sub_10028CBE0((float *)v42, 130.0, 80.0);
sub_10028CCE0(&v41, &v40, v42);
SetupTriggerPopup::createCustomToggleValueControl((__int64)a1, 2, v5 == 2, 1, &v30, (__int64)&v41, 0, 0, 0);
if ( (v30 & 1) != 0 )
operator delete(v31);
LOBYTE(v32) = 12;
strcpy((char *)&v32 + 1, "Follow");
sub_10028CBE0((float *)v42, -130.0, 30.0);
sub_10028CCE0(&v41, &v40, v42);
SetupTriggerPopup::createToggleValueControl((int)a1, 212, &v32, 1.0, (__int64)&v41, 0, 0, 0);
if ( (v32 & 1) != 0 )
operator delete(v33);
v34 = 14;
strcpy(v35, "Easing:");
sub_10028CBE0((float *)v42, 95.0, 30.0);
sub_10028CCE0(&v41, &v40, v42);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
213,
(__int64)&v34,
(float *)&v41,
0,
Float,
0.75,
0.0,
50.0,
10,
0,
0,
212,
1,
1,
0);
if ( (v34 & 1) != 0 )
operator delete(v36);
v37 = 30;
strcpy(v38, "Smooth\nVelocity");
sub_10028CBE0((float *)v42, -130.0, -10.0);
sub_10028CCE0(&v41, &v40, v42);
SetupTriggerPopup::createToggleValueControl((int)a1, 453, (__int128 *)&v37, 1.0, (__int64)&v41, 0, 0, 0);
if ( (v37 & 1) != 0 )
operator delete(*(void **)&v38[15]);
v18 = 18;
strcpy(v19, "Modifier:");
sub_10028CBE0((float *)v42, 95.0, -10.0);
sub_10028CCE0(&v41, &v40, v42);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
454,
(__int64)&v18,
(float *)&v41,
0,
Float,
0.75,
0.0,
1.0,
10,
0,
0,
453,
1,
2,
0);
if ( (v18 & 1) != 0 )
operator delete(*(void **)&v19[15]);
v20 = 18;
strcpy(v21, "Duration:");
sub_10028CBE0((float *)v42, -100.0, -60.0);
sub_10028CCE0(&v41, &v40, v42);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
10,
(__int64)&v20,
(float *)&v41,
0,
Float,
0.75,
0.0,
10.0,
10,
0,
0,
0,
0,
2,
0);
if ( (v20 & 1) != 0 )
operator delete(*(void **)&v21[15]);
sub_10028CBE0((float *)v42, 105.0, -60.0);
sub_10028CCE0(&v41, &v40, v42);
v6 = (__m128)0x3F4CCCCDu;
SetupTriggerPopup::createEasingControls(a1, (cocos2d::CCPoint)1061997773LL, -60.0, (int)&v41, 0);
*(double *)v6.i64 = ((double (__fastcall *)(SetupStaticCameraPopup *, __int64))a1->getValue)(a1, 212);
v7 = _mm_cmpneq_ss(v6, (__m128)0LL);
((void (__fastcall *)(SetupStaticCameraPopup *, __int64, _QWORD))a1->toggleGroup)(
a1,
212,
_mm_cvtsi128_si32((__m128i)v7) & 1);
*(double *)v7.i64 = ((double (__fastcall *)(SetupStaticCameraPopup *, __int64))a1->getValue)(a1, 453);
v8.i32[0] = 0;
((void (__fastcall *)(SetupStaticCameraPopup *, __int64, _QWORD))a1->toggleGroup)(
a1,
453,
_mm_cvtsi128_si32((__m128i)_mm_cmpneq_ss(v7, v8)) & 1);
SetupTriggerPopup::postSetup(a1);
return v4;
}
return result;
}