//
// SetupCameraRotatePopup2::init from 0x1004beb70 to 0x1004bf008 (1176 bytes)
//
// 1 xrefs:
// > SetupCameraRotatePopup2::create @ 0x1004beb2e
//
// 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 SetupCameraRotatePopup2::init(SetupCameraRotatePopup2 *a1, EffectGameObject *a2, cocos2d::CCArray *a3)
{
bool result; // al
bool v4; // r12
__int128 v5; // [rsp+40h] [rbp-100h] BYREF
void *v6; // [rsp+50h] [rbp-F0h]
char v7; // [rsp+58h] [rbp-E8h] BYREF
char v8[15]; // [rsp+59h] [rbp-E7h] BYREF
void *v9; // [rsp+68h] [rbp-D8h]
char v10; // [rsp+70h] [rbp-D0h] BYREF
char v11[15]; // [rsp+71h] [rbp-CFh] BYREF
void *v12; // [rsp+80h] [rbp-C0h]
__int128 v13; // [rsp+88h] [rbp-B8h] BYREF
void *v14; // [rsp+98h] [rbp-A8h]
char v15; // [rsp+A0h] [rbp-A0h] BYREF
_BYTE v16[23]; // [rsp+A1h] [rbp-9Fh] BYREF
float v17[2]; // [rsp+B8h] [rbp-88h] BYREF
_BYTE v18[24]; // [rsp+C0h] [rbp-80h] BYREF
__int128 v19; // [rsp+D8h] [rbp-68h] BYREF
void *v20; // [rsp+E8h] [rbp-58h]
char v21; // [rsp+F0h] [rbp-50h] BYREF
_BYTE v22[23]; // [rsp+F1h] [rbp-4Fh] BYREF
unsigned __int64 v23; // [rsp+108h] [rbp-38h] BYREF
double v24; // [rsp+110h] [rbp-30h] BYREF
unsigned __int64 v25[5]; // [rsp+118h] [rbp-28h] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 400.0, 260.0, 1);
if ( result )
{
v4 = result;
SetupTriggerPopup::preSetup(a1);
strcpy(v18, "*Setup Camera Rotation");
SetupTriggerPopup::addTitle((__int64)a1, (__int64)v18);
if ( (v18[0] & 1) != 0 )
operator delete(*(void **)&v18[16]);
v7 = 4;
strcpy(v8, "OK");
SetupTriggerPopup::addCloseButton((__int64)a1, (__int64)&v7);
if ( (v7 & 1) != 0 )
operator delete(v9);
v10 = 8;
strcpy(v11, "Help");
v14 = operator new(0xF8u);
*(_QWORD *)&v13 = 249;
*((_QWORD *)&v13 + 1) = 244;
strcpy(
(char *)v14,
"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((__int64)a1, (__int64)&v10, &v13, (__m128)0x3F800000u);
if ( (v13 & 1) != 0 )
operator delete(v14);
if ( (v10 & 1) != 0 )
operator delete(v12);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v17);
sub_10028CBE0((float *)&v23, v17[0] * 0.5, 0.5 * v17[1]);
v15 = 16;
strcpy(v16, "Degrees:");
sub_10028CBE0((float *)v25, -100.0, 60.0);
sub_10028CCE0(&v24, &v23, v25);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
68,
(__int64)&v15,
(float *)&v24,
0,
Float,
0.80000001,
-360.0,
360.0,
10,
0,
0,
0,
0,
2,
0);
if ( (v15 & 1) != 0 )
operator delete(*(void **)&v16[15]);
LOBYTE(v5) = 6;
*(_DWORD *)((char *)&v5 + 1) = 6579265;
sub_10028CBE0((float *)v25, 60.0, 70.0);
sub_10028CCE0(&v24, &v23, v25);
SetupTriggerPopup::createToggleValueControl((int)a1, 70, &v5, 1.0, (__int64)&v24, 0, 0, 0);
if ( (v5 & 1) != 0 )
operator delete(v6);
LOBYTE(v19) = 14;
strcpy((char *)&v19 + 1, "Snap360");
sub_10028CBE0((float *)v25, 60.0, 30.0);
sub_10028CCE0(&v24, &v23, v25);
SetupTriggerPopup::createToggleValueControl((int)a1, 394, &v19, 1.0, (__int64)&v24, 0, 0, 0);
if ( (v19 & 1) != 0 )
operator delete(v20);
v21 = 20;
strcpy(v22, "Move Time:");
sub_10028CBE0((float *)v25, -100.0, -10.0);
sub_10028CCE0(&v24, &v23, v25);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
10,
(__int64)&v21,
(float *)&v24,
0,
Float,
0.80000001,
0.0,
10.0,
10,
0,
0,
0,
0,
2,
0);
if ( (v21 & 1) != 0 )
operator delete(*(void **)&v22[15]);
sub_10028CBE0((float *)v25, 95.0, -10.0);
sub_10028CCE0(&v24, &v23, v25);
SetupTriggerPopup::createEasingControls(a1, (cocos2d::CCPoint)1061997773LL, -10.0, (int)&v24, 0);
SetupTriggerPopup::postSetup(a1);
return v4;
}
return result;
}