//
// SetupCameraRotatePopup2::init from 0x9adc10 to 0x9ae30c (1788 bytes)
//
// 2 xrefs:
// > SetupCameraRotatePopup2::create @ 0x9ae4c0
// > ??> @ 0x9ea30
//
// 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 SetupCameraRotatePopup2::init(SetupCameraRotatePopup2 *a1, EffectGameObject *a2, cocos2d::CCArray *a3)
{
bool v4; // w26
void *v6; // x0
void *v7; // x0
void *v8; // x0
void *v9; // x0
cocos2d::CCDirector *v10; // x0
float v11; // s3
float v12; // s4
void *v13; // x0
float v14; // s2
void *v15; // x0
float v16; // s2
void *v17; // x0
float v18; // s3
float v19; // s4
void *v20; // x0
float v21; // s2
unsigned int *v22; // x1
int v23; // w2
unsigned int *v24; // x1
int v25; // w2
unsigned int *v26; // x1
int v27; // w2
unsigned int *v28; // x1
int v29; // w2
unsigned int *v30; // x1
int v31; // w2
unsigned int *v32; // x1
int v33; // w2
unsigned int *v34; // x1
int v35; // w2
unsigned int *v36; // x1
int v37; // w2
int v38; // [xsp+18h] [xbp-18h]
__int64 v39; // [xsp+18h] [xbp-18h]
char v40; // [xsp+20h] [xbp-10h]
__int64 v41; // [xsp+20h] [xbp-10h]
_QWORD v42[2]; // [xsp+30h] [xbp+0h] BYREF
float v43; // [xsp+C0h] [xbp+90h]
float v44; // [xsp+C4h] [xbp+94h]
cocos2d::CCPoint v45; // [xsp+C8h] [xbp+98h] BYREF
cocos2d::CCPoint v46; // [xsp+D0h] [xbp+A0h] BYREF
cocos2d::CCPoint v47; // [xsp+D8h] [xbp+A8h] BYREF
__int64 v48; // [xsp+E0h] [xbp+B0h] BYREF
cocos2d::CCPoint v49; // 0:s0.4,4:s1.4
cocos2d::CCPoint v50; // 0:s0.4,4:s1.4
cocos2d::CCPoint v51; // 0:s0.4,4:s1.4
cocos2d::CCPoint v52; // 0:s0.4,4:s1.4
cocos2d::CCPoint v53; // 0:s0.4,4:s1.4
v4 = SetupTriggerPopup::init(a1, a2, a3, 400.0, 260.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
sub_D153B8((unsigned int)v42 + 176, "Setup Camera Rotation");
SetupTriggerPopup::addTitle(a1, (std::string)&v48);
v6 = (void *)(v48 - 24);
if ( (__int64 *)(v48 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v22 = (unsigned int *)(v48 - 8);
do
v23 = __ldaxr(v22);
while ( __stlxr(v23 - 1, v22) );
}
else
{
v23 = *(_DWORD *)(v48 - 8);
*(_DWORD *)(v48 - 8) = v23 - 1;
}
if ( v23 <= 0 )
operator delete(v6);
}
sub_D153B8((unsigned int)v42 + 176, "OK");
SetupTriggerPopup::addCloseButton(a1, (std::string)&v48);
v7 = (void *)(v48 - 24);
if ( (__int64 *)(v48 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v24 = (unsigned int *)(v48 - 8);
do
v25 = __ldaxr(v24);
while ( __stlxr(v25 - 1, v24) );
}
else
{
v25 = *(_DWORD *)(v48 - 8);
*(_DWORD *)(v48 - 8) = v25 - 1;
}
if ( v25 <= 0 )
operator delete(v7);
}
sub_D153B8((int)&v47, "Help");
sub_D153B8(
(int)&v48,
"Rotates the camera to the target value.\n"
"Move Time is how fast the rotate happens.\n"
"Easing changes the method used.\n"
"Add the rotation to the current camera rotation.\n"
"Snap360 converts rotation to closest 360.");
SetupTriggerPopup::addHelpButton(a1, (std::string)&v47, (std::string)&v48, 1.0);
v8 = (void *)(v48 - 24);
if ( (__int64 *)(v48 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v28 = (unsigned int *)(v48 - 8);
do
v29 = __ldaxr(v28);
while ( __stlxr(v29 - 1, v28) );
}
else
{
v29 = *(_DWORD *)(v48 - 8);
*(_DWORD *)(v48 - 8) = v29 - 1;
}
if ( v29 <= 0 )
operator delete(v8);
}
v9 = (void *)(*(_QWORD *)&v47 - 24LL);
if ( (__int64 *)(*(_QWORD *)&v47 - 24LL) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v32 = (unsigned int *)(*(_QWORD *)&v47 - 8LL);
do
v33 = __ldaxr(v32);
while ( __stlxr(v33 - 1, v32) );
}
else
{
v33 = *(_DWORD *)(*(_QWORD *)&v47 - 8LL);
*(_DWORD *)(*(_QWORD *)&v47 - 8LL) = v33 - 1;
}
if ( v33 <= 0 )
operator delete(v9);
}
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
v10 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v10);
cocos2d::CCPoint::CCPoint(&v45, v43 * 0.5, v44 * 0.5);
sub_D153B8((int)&v48, "Degrees:");
cocos2d::CCPoint::CCPoint(&v46, -100.0, 60.0);
cocos2d::CCPoint::operator+(&v47, &v45, &v46);
v49.y = -360.0;
v38 = 2;
v49.x = 0.8;
v40 = 0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
68,
(std::string)&v48,
v49,
360.0,
(bool)&v47,
(InputValueType)0,
1,
10,
v11,
v12,
0,
0,
GoldLabel,
0,
v38,
v40);
v13 = (void *)(v48 - 24);
if ( (__int64 *)(v48 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v26 = (unsigned int *)(v48 - 8);
do
v27 = __ldaxr(v26);
while ( __stlxr(v27 - 1, v26) );
}
else
{
v27 = *(_DWORD *)(v48 - 8);
*(_DWORD *)(v48 - 8) = v27 - 1;
}
if ( v27 <= 0 )
operator delete(v13);
}
sub_D153B8((int)&v48, "Add");
cocos2d::CCPoint::CCPoint(&v46, 60.0, 70.0);
cocos2d::CCPoint::operator+(&v47, &v45, &v46);
v50.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 70, (std::string)&v48, v50, (bool)&v47, 0, 0, v14);
v15 = (void *)(v48 - 24);
if ( (__int64 *)(v48 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v34 = (unsigned int *)(v48 - 8);
do
v35 = __ldaxr(v34);
while ( __stlxr(v35 - 1, v34) );
}
else
{
v35 = *(_DWORD *)(v48 - 8);
*(_DWORD *)(v48 - 8) = v35 - 1;
}
if ( v35 <= 0 )
operator delete(v15);
}
sub_D153B8((int)&v48, "Snap360");
cocos2d::CCPoint::CCPoint(&v46, 60.0, 30.0);
cocos2d::CCPoint::operator+(&v47, &v45, &v46);
v51.x = 1.0;
SetupTriggerPopup::createToggleValueControl(a1, 394, (std::string)&v48, v51, (bool)&v47, 0, 0, v16);
v17 = (void *)(v48 - 24);
if ( (__int64 *)(v48 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v30 = (unsigned int *)(v48 - 8);
do
v31 = __ldaxr(v30);
while ( __stlxr(v31 - 1, v30) );
}
else
{
v31 = *(_DWORD *)(v48 - 8);
*(_DWORD *)(v48 - 8) = v31 - 1;
}
if ( v31 <= 0 )
operator delete(v17);
}
sub_D153B8((int)&v48, "Move Time:");
cocos2d::CCPoint::CCPoint(&v46, -100.0, -10.0);
cocos2d::CCPoint::operator+(&v47, &v45, &v46);
v52.x = 0.8;
v52.y = 0.0;
LODWORD(v39) = 2;
LOBYTE(v41) = 0;
SetupTriggerPopup::createValueControlAdvanced(
a1,
10,
(std::string)&v48,
v52,
10.0,
(bool)&v47,
(InputValueType)0,
1,
10,
v18,
v19,
0,
0,
GoldLabel,
0,
v39,
v41);
v20 = (void *)(v48 - 24);
if ( (__int64 *)(v48 - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v36 = (unsigned int *)(v48 - 8);
do
v37 = __ldaxr(v36);
while ( __stlxr(v37 - 1, v36) );
}
else
{
v37 = *(_DWORD *)(v48 - 8);
*(_DWORD *)(v48 - 8) = v37 - 1;
}
if ( v37 <= 0 )
operator delete(v20);
}
cocos2d::CCPoint::CCPoint(&v47, 95.0, -10.0);
cocos2d::CCPoint::operator+(&v48, &v45, &v47);
v53.x = 0.8;
SetupTriggerPopup::createEasingControls(a1, v53, v21, (int)&v48, 0);
SetupTriggerPopup::postSetup(a1);
}
return v4;
}