//
// SetupCameraGuidePopup::init from 0x100584750 to 0x100584c38 (1256 bytes)
//
// 1 xrefs:
// > SetupCameraGuidePopup::create @ 0x10058470e
//
// 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 SetupCameraGuidePopup::init(
SetupCameraGuidePopup *a1,
CameraTriggerGameObject *a2,
cocos2d::CCArray *a3)
{
bool result; // al
bool v4; // r15
char v5; // [rsp+38h] [rbp-F8h] BYREF
char v6[15]; // [rsp+39h] [rbp-F7h] BYREF
void *v7; // [rsp+48h] [rbp-E8h]
char v8; // [rsp+50h] [rbp-E0h] BYREF
char v9[15]; // [rsp+51h] [rbp-DFh] BYREF
void *v10; // [rsp+60h] [rbp-D0h]
__int128 v11; // [rsp+68h] [rbp-C8h] BYREF
void *v12; // [rsp+78h] [rbp-B8h]
char v13[16]; // [rsp+80h] [rbp-B0h] BYREF
void *v14; // [rsp+90h] [rbp-A0h]
char v15; // [rsp+98h] [rbp-98h] BYREF
_BYTE v16[23]; // [rsp+99h] [rbp-97h] BYREF
char v17; // [rsp+B0h] [rbp-80h] BYREF
_BYTE v18[23]; // [rsp+B1h] [rbp-7Fh] BYREF
char v19; // [rsp+C8h] [rbp-68h] BYREF
_BYTE v20[23]; // [rsp+C9h] [rbp-67h] BYREF
char v21; // [rsp+E0h] [rbp-50h] BYREF
_BYTE v22[23]; // [rsp+E1h] [rbp-4Fh] BYREF
unsigned __int64 v23; // [rsp+F8h] [rbp-38h] BYREF
float v24; // [rsp+100h] [rbp-30h] BYREF
float v25; // [rsp+104h] [rbp-2Ch]
unsigned __int64 v26; // [rsp+108h] [rbp-28h] BYREF
double v27[4]; // [rsp+110h] [rbp-20h] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 360.0, 250.0, 1);
if ( result )
{
v4 = result;
SetupTriggerPopup::preSetup(a1);
a1->m_disableSliderDelegate = 1;
v19 = 24;
strcpy(v20, "Camera Guide");
SetupTriggerPopup::addTitle((__int64)a1, (__int64)&v19);
if ( (v19 & 1) != 0 )
operator delete(*(void **)&v20[15]);
v5 = 4;
strcpy(v6, "OK");
SetupTriggerPopup::addCloseButton((__int64)a1, (__int64)&v5);
if ( (v5 & 1) != 0 )
operator delete(v7);
v8 = 8;
strcpy(v9, "Help");
v12 = operator new(0xD0u);
*(_QWORD *)&v11 = 209;
*((_QWORD *)&v11 + 1) = 205;
strcpy(
(char *)v12,
"Preview the camera bounds at specified Zoom and Offset values for different aspect ratios. The inn"
"er line is the guaranteed view 4:3 and the outer line is based on your window aspect ratio.");
SetupTriggerPopup::addHelpButton((__int64)a1, (__int64)&v8, &v11, (__m128)0x3F800000u);
if ( (v11 & 1) != 0 )
operator delete(v12);
if ( (v8 & 1) != 0 )
operator delete(v10);
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v24);
sub_10028CBE0((float *)&v23, v24 * 0.5, v25 * 0.5);
strcpy(v13, "\nZoom:");
sub_10028CBE0((float *)&v26, 0.0, 70.0);
sub_10028CCE0(v27, &v23, &v26);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
371,
(__int64)v13,
(float *)v27,
0,
Float,
0.80000001,
0.40000001,
3.0,
4,
0,
0,
0,
0,
3,
0);
if ( (v13[0] & 1) != 0 )
operator delete(v14);
v15 = 18;
strcpy(v16, "Offset X:");
sub_10028CBE0((float *)&v26, -85.0, -5.0);
sub_10028CCE0(v27, &v23, &v26);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
28,
(__int64)&v15,
(float *)v27,
0,
Int,
0.80000001,
-100.0,
100.0,
10,
0,
0,
0,
0,
0,
0);
if ( (v15 & 1) != 0 )
operator delete(*(void **)&v16[15]);
v17 = 18;
strcpy(v18, "Offset Y:");
sub_10028CBE0((float *)&v26, 90.0, -5.0);
sub_10028CCE0(v27, &v23, &v26);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
29,
(__int64)&v17,
(float *)v27,
0,
Int,
0.80000001,
-100.0,
100.0,
10,
0,
0,
0,
0,
0,
0);
if ( (v17 & 1) != 0 )
operator delete(*(void **)&v18[15]);
v21 = 30;
strcpy(v22, "Preview\nOpacity");
sub_10028CBE0(
(float *)v27,
(float)((float)(a1->m_width * 0.5) + (float)(v24 * 0.5)) + -72.0,
(float)((float)(v25 * 0.5) - (float)(0.5 * a1->m_height)) + 40.0);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
506,
(__int64)&v21,
(float *)v27,
0,
Float,
0.64999998,
0.0,
0.0,
5,
0,
0,
0,
0,
2,
0);
if ( (v21 & 1) != 0 )
operator delete(*(void **)&v22[15]);
SetupTriggerPopup::postSetup(a1);
return v4;
}
return result;
}