//
// SetupStaticCameraPopup::init from 0x96ad98 to 0x96b954 (3004 bytes)
//
// 2 xrefs:
// > SetupStaticCameraPopup::create @ 0x96bb20
// > ??> @ 0x8c8e0
//
// 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 SetupStaticCameraPopup::init(SetupStaticCameraPopup *a1, CameraTriggerGameObject *a2, cocos2d::CCArray *a3)
{
bool v4; // w27
cocos2d::CCDirector *v6; // x0
void *v7; // x0
void *v8; // x0
void *v9; // x0
void *v10; // x0
float v11; // s2
void *v12; // x0
float v13; // s2
void *v14; // x0
float v15; // s3
float v16; // s4
void *v17; // x0
int v18; // w28
void *v19; // x0
void *v20; // x0
float v21; // s2
void *v22; // x0
float v23; // s3
float v24; // s4
void *v25; // x0
float v26; // s2
void *v27; // x0
float v28; // s3
float v29; // s4
void *v30; // x0
float v31; // s3
float v32; // s4
void *v33; // x0
float v34; // s2
unsigned int *v35; // x1
int v36; // w2
unsigned int *v37; // x1
int v38; // w2
unsigned int *v39; // x1
int v40; // w2
unsigned int *v41; // x1
int v42; // w2
unsigned int *v43; // x1
int v44; // w2
unsigned int *v45; // x1
int v46; // w2
unsigned int *v47; // x1
int v48; // w2
unsigned int *v49; // x1
int v50; // w2
unsigned int *v51; // x1
int v52; // w2
unsigned int *v53; // x1
int v54; // w2
unsigned int *v55; // x1
int v56; // w2
unsigned int *v57; // x1
int v58; // w2
unsigned int *v59; // x1
int v60; // w2
unsigned int *v61; // x22
int v62; // w1
int v63; // [xsp+18h] [xbp-18h]
__int64 v64; // [xsp+18h] [xbp-18h]
__int64 v65; // [xsp+18h] [xbp-18h]
__int64 v66; // [xsp+18h] [xbp-18h]
char v67; // [xsp+20h] [xbp-10h]
__int64 v68; // [xsp+20h] [xbp-10h]
__int64 v69; // [xsp+20h] [xbp-10h]
__int64 v70; // [xsp+20h] [xbp-10h]
_QWORD v71[2]; // [xsp+30h] [xbp+0h] BYREF
int v72; // [xsp+BCh] [xbp+8Ch]
float v73; // [xsp+D0h] [xbp+A0h]
float v74; // [xsp+D4h] [xbp+A4h]
cocos2d::CCPoint v75; // [xsp+D8h] [xbp+A8h] BYREF
cocos2d::CCPoint v76; // [xsp+E0h] [xbp+B0h] BYREF
cocos2d::CCPoint v77; // [xsp+E8h] [xbp+B8h] BYREF
__int64 v78; // [xsp+F0h] [xbp+C0h] BYREF
cocos2d::CCPoint v79; // 0:s0.4,4:s1.4
cocos2d::CCPoint v80; // 0:s0.4,4:s1.4
cocos2d::CCPoint v81; // 0:s0.4,4:s1.4
cocos2d::CCPoint v82; // 0:s0.4,4:s1.4
cocos2d::CCPoint v83; // 0:s0.4,4:s1.4
cocos2d::CCPoint v84; // 0:s0.4,4:s1.4
cocos2d::CCPoint v85; // 0:s0.4,4:s1.4
cocos2d::CCPoint v86; // 0:s0.4,4:s1.4
cocos2d::CCPoint v87; // 0:s0.4,4:s1.4
v4 = SetupTriggerPopup::init(a1, a2, a3, 420.0, 310.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
v6 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v6);
cocos2d::CCPoint::CCPoint(&v75, v73 * 0.5, v74 * 0.5);
sub_D153B8((unsigned int)v71 + 192, "Setup Static Camera");
SetupTriggerPopup::addTitle(a1, (std::string)&v78);
v7 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v35 = (unsigned int *)(v78 - 8);
do
v36 = __ldaxr(v35);
while ( __stlxr(v36 - 1, v35) );
}
else
{
v36 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v36 - 1;
}
if ( v36 <= 0 )
operator delete(v7);
}
sub_D153B8((int)&v77, "Help");
sub_D153B8(
(unsigned int)v71 + 192,
"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(a1, (std::string)&v77, (std::string)&v78, 1.0);
v8 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v37 = (unsigned int *)(v78 - 8);
do
v38 = __ldaxr(v37);
while ( __stlxr(v38 - 1, v37) );
}
else
{
v38 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v38 - 1;
}
if ( v38 <= 0 )
operator delete(v8);
}
v9 = (void *)(*(_QWORD *)&v77 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v77 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v41 = (unsigned int *)(*(_QWORD *)&v77 - 8LL);
do
v42 = __ldaxr(v41);
while ( __stlxr(v42 - 1, v41) );
}
else
{
v42 = *(_DWORD *)(*(_QWORD *)&v77 - 8LL);
*(_DWORD *)(*(_QWORD *)&v77 - 8LL) = v42 - 1;
}
if ( v42 <= 0 )
operator delete(v9);
}
sub_D153B8((unsigned int)v71 + 192, "OK");
SetupTriggerPopup::addCloseButton(a1, (std::string)&v78);
v10 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v49 = (unsigned int *)(v78 - 8);
do
v50 = __ldaxr(v49);
while ( __stlxr(v50 - 1, v49) );
}
else
{
v50 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v50 - 1;
}
if ( v50 <= 0 )
operator delete(v10);
}
SetupTriggerPopup::createMultiTriggerItemsDefaultHorizontal(a1);
sub_D153B8((unsigned int)v71 + 192, "Exit\nStatic");
cocos2d::CCPoint::CCPoint(&v76, (float)(a1->m_width * 0.5) + -80.0, (float)(a1->m_height * 0.5) + -20.0);
cocos2d::CCPoint::operator+(&v77, &v75, &v76);
v79.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 110, (std::string)&v78, v79, (bool)&v77, 0, 0, v11);
v12 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v45 = (unsigned int *)(v78 - 8);
do
v46 = __ldaxr(v45);
while ( __stlxr(v46 - 1, v45) );
}
else
{
v46 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v46 - 1;
}
if ( v46 <= 0 )
operator delete(v12);
}
sub_D153B8((unsigned int)v71 + 192, "Exit\nInstant");
cocos2d::CCPoint::CCPoint(&v76, (float)(a1->m_width * 0.5) + -80.0, (float)(a1->m_height * 0.5) + -50.0);
cocos2d::CCPoint::operator+(&v77, &v75, &v76);
v80.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 465, (std::string)&v78, v80, (bool)&v77, 0, 0, v13);
v14 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v53 = (unsigned int *)(v78 - 8);
do
v54 = __ldaxr(v53);
while ( __stlxr(v54 - 1, v53) );
}
else
{
v54 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v54 - 1;
}
if ( v54 <= 0 )
operator delete(v14);
}
sub_D153B8((unsigned int)v71 + 192, "Target Group ID:");
cocos2d::CCPoint::CCPoint(&v76, -100.0, 80.0);
cocos2d::CCPoint::operator+(&v77, &v75, &v76);
v81.y = -100.0;
v63 = 0;
v67 = 0;
v81.x = 0.75;
SetupTriggerPopup::createValueControlAdvanced(
a1,
71,
(std::string)&v78,
v81,
100.0,
(bool)&v77,
Float,
2,
10,
v15,
v16,
1,
0,
GoldLabel,
0,
v63,
v67);
v17 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v39 = (unsigned int *)(v78 - 8);
do
v40 = __ldaxr(v39);
while ( __stlxr(v40 - 1, v39) );
}
else
{
v40 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v40 - 1;
}
if ( v40 <= 0 )
operator delete(v17);
}
v18 = (int)a1->getValue(a1, 101);
v72 = v18 == 1;
sub_D153B8((unsigned int)v71 + 192, "X\nOnly");
cocos2d::CCPoint::CCPoint(&v76, 40.0, 80.0);
cocos2d::CCPoint::operator+(&v77, &v75, &v76);
SetupTriggerPopup::createCustomToggleValueControl(
(int)a1,
1,
(unsigned __int8)v72,
1,
(int)&v78,
(int)&v77,
0,
0,
0);
v19 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v55 = (unsigned int *)(v78 - 8);
do
v56 = __ldaxr(v55);
while ( __stlxr(v56 - 1, v55) );
}
else
{
v56 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v56 - 1;
}
if ( v56 <= 0 )
operator delete(v19);
}
sub_D153B8((unsigned int)v71 + 192, "Y\nOnly");
cocos2d::CCPoint::CCPoint(&v76, 130.0, 80.0);
cocos2d::CCPoint::operator+(&v77, &v75, &v76);
SetupTriggerPopup::createCustomToggleValueControl(
(int)a1,
2,
v18 == 2,
1,
(unsigned int)v71 + 192,
(int)&v77,
0,
0,
0);
v20 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v47 = (unsigned int *)(v78 - 8);
do
v48 = __ldaxr(v47);
while ( __stlxr(v48 - 1, v47) );
}
else
{
v48 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v48 - 1;
}
if ( v48 <= 0 )
operator delete(v20);
}
sub_D153B8((unsigned int)v71 + 192, "Follow");
cocos2d::CCPoint::CCPoint(&v76, -130.0, 30.0);
cocos2d::CCPoint::operator+(&v77, &v75, &v76);
v82.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 212, (std::string)&v78, v82, (bool)&v77, 0, 0, v21);
v22 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v59 = (unsigned int *)(v78 - 8);
do
v60 = __ldaxr(v59);
while ( __stlxr(v60 - 1, v59) );
}
else
{
v60 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v60 - 1;
}
if ( v60 <= 0 )
operator delete(v22);
}
sub_D153B8((unsigned int)v71 + 192, "Easing:");
cocos2d::CCPoint::CCPoint(&v76, 95.0, 30.0);
cocos2d::CCPoint::operator+(&v77, &v75, &v76);
v83.y = 0.0;
LODWORD(v64) = 1;
LOBYTE(v68) = 0;
v83.x = 0.75;
SetupTriggerPopup::createValueControlAdvanced(
a1,
213,
(std::string)&v78,
v83,
50.0,
(bool)&v77,
(InputValueType)0,
1,
10,
v23,
v24,
0,
0,
(GJInputStyle)212,
1,
v64,
v68);
v25 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v43 = (unsigned int *)(v78 - 8);
do
v44 = __ldaxr(v43);
while ( __stlxr(v44 - 1, v43) );
}
else
{
v44 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v44 - 1;
}
if ( v44 <= 0 )
operator delete(v25);
}
sub_D153B8((unsigned int)v71 + 192, "Smooth\nVelocity");
cocos2d::CCPoint::CCPoint(&v76, -130.0, -10.0);
cocos2d::CCPoint::operator+(&v77, &v75, &v76);
v84.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 453, (std::string)&v78, v84, (bool)&v77, 0, 0, v26);
v27 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v57 = (unsigned int *)(v78 - 8);
do
v58 = __ldaxr(v57);
while ( __stlxr(v58 - 1, v57) );
}
else
{
v58 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v58 - 1;
}
if ( v58 <= 0 )
operator delete(v27);
}
sub_D153B8((unsigned int)v71 + 192, "Modifier:");
cocos2d::CCPoint::CCPoint(&v76, 95.0, -10.0);
cocos2d::CCPoint::operator+(&v77, &v75, &v76);
v85.y = 0.0;
LODWORD(v65) = 2;
LOBYTE(v69) = 0;
v85.x = 0.75;
SetupTriggerPopup::createValueControlAdvanced(
a1,
454,
(std::string)&v78,
v85,
1.0,
(bool)&v77,
(InputValueType)0,
1,
10,
v28,
v29,
0,
0,
(GJInputStyle)453,
1,
v65,
v69);
v30 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v51 = (unsigned int *)(v78 - 8);
do
v52 = __ldaxr(v51);
while ( __stlxr(v52 - 1, v51) );
}
else
{
v52 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v52 - 1;
}
if ( v52 <= 0 )
operator delete(v30);
}
sub_D153B8((unsigned int)v71 + 192, "Duration:");
cocos2d::CCPoint::CCPoint(&v76, -100.0, -60.0);
cocos2d::CCPoint::operator+(&v77, &v75, &v76);
v86.y = 0.0;
LODWORD(v66) = 2;
LOBYTE(v70) = 0;
v86.x = 0.75;
SetupTriggerPopup::createValueControlAdvanced(
a1,
10,
(std::string)&v78,
v86,
10.0,
(bool)&v77,
(InputValueType)0,
1,
10,
v31,
v32,
0,
0,
GoldLabel,
0,
v66,
v70);
v33 = (void *)(v78 - 24);
if ( (__int64 *)(v78 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v61 = (unsigned int *)(v78 - 8);
do
v62 = __ldaxr(v61);
while ( __stlxr(v62 - 1, v61) );
}
else
{
v62 = *(_DWORD *)(v78 - 8);
*(_DWORD *)(v78 - 8) = v62 - 1;
}
if ( v62 <= 0 )
operator delete(v33);
}
cocos2d::CCPoint::CCPoint(&v77, 105.0, -60.0);
cocos2d::CCPoint::operator+(&v78, &v75, &v77);
v87.x = 0.8;
SetupTriggerPopup::createEasingControls(a1, v87, v34, (unsigned int)v71 + 192, 0);
SetupStaticCameraPopup::updateState(a1);
SetupTriggerPopup::postSetup(a1);
}
return v4;
}