//
// SetupCameraRotatePopup2::init from 0x1405af210 to 0x1405af78e (1406 bytes)
//
// 3 xrefs:
// > SetupCameraRotatePopup2::create @ 0x1405af1ce
// > ??> @ 0x14092da04
// > ??> @ 0x14092da10
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:34:42 +0000
//
// Hidden C++ exception states: #wind=3
char __fastcall SetupCameraRotatePopup2::init(_BYTE *a1, int a2, int a3, int a4)
{
char result; // al
__int64 v6; // rcx
__int64 v7; // rax
__int64 v8; // rax
__int64 v9; // rax
__int64 v10; // rax
__int64 v11; // rax
__int64 v12; // rax
int v13; // r8d
int v14; // r9d
float v15[2]; // [rsp+88h] [rbp-80h] BYREF
__int128 *v16; // [rsp+90h] [rbp-78h] BYREF
__int128 *v17; // [rsp+98h] [rbp-70h] BYREF
__int128 *v18; // [rsp+A0h] [rbp-68h] BYREF
__int128 v19; // [rsp+A8h] [rbp-60h] BYREF
__int64 v20; // [rsp+B8h] [rbp-50h]
__int64 v21; // [rsp+C0h] [rbp-48h]
__int128 v22; // [rsp+C8h] [rbp-40h] BYREF
__int64 v23; // [rsp+D8h] [rbp-30h]
__int64 v24; // [rsp+E0h] [rbp-28h]
char v25; // [rsp+150h] [rbp+48h] BYREF
result = SetupTriggerPopup::init((_DWORD)a1, a2, a3, a4, 1132593152, 1, 0);
if ( result )
{
a1[744] = 1;
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1096LL))(a1);
v19 = 0;
*(_QWORD *)&v19 = sub_14003D460(0x20u);
v20 = 21;
v21 = 31;
strcpy((char *)v19, "Setup Camera Rotation");
SetupTriggerPopup::addTitle(a1, &v19);
v19 = 0;
v20 = 2;
v21 = 15;
strcpy((char *)&v19, "OK");
SetupTriggerPopup::addCloseButton(a1, &v19);
v16 = &v19;
v19 = 0;
v20 = 0;
v21 = 0;
*(_QWORD *)&v19 = sub_14003D460(0x100u);
v20 = 244;
v21 = 255;
strcpy(
(char *)v19,
"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.");
v22 = 0;
v23 = 4;
v24 = 15;
strcpy((char *)&v22, "Help");
SetupTriggerPopup::addHelpButton(a1, &v22, &v19);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
v7 = cocos2d::CCDirector::sharedDirector(v6);
cocos2d::CCDirector::getWinSize(v7, v15);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v25, v15[0] * 0.5, v15[1] * 0.5);
v17 = &v22;
v23 = 8;
v24 = 15;
v22 = 0x3A73656572676544uLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, -100.0, 60.0);
cocos2d::CCPoint::operator+(&v25, &v16, v8);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
68,
(unsigned int)&v22,
(unsigned int)&v16,
1061997773,
0,
1,
10,
0,
-1011613696,
1135869952,
0,
0,
0,
2,
0);
v18 = &v19;
v19 = 0;
v20 = 3;
v21 = 15;
LOWORD(v19) = *(_WORD *)"Add";
WORD1(v19) = (unsigned __int8)aAdd[2];
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, 60.0, 70.0);
cocos2d::CCPoint::operator+(&v25, &v16, v9);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
70,
(unsigned int)&v19,
(unsigned int)&v16,
0,
0,
0,
1065353216);
v18 = &v19;
v20 = 7;
v21 = 15;
v19 = 0x30363370616E53uLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, 60.0, 30.0);
cocos2d::CCPoint::operator+(&v25, &v16, v10);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
394,
(unsigned int)&v19,
(unsigned int)&v16,
0,
0,
0,
1065353216);
v18 = &v19;
*((_QWORD *)&v19 + 1) = 14949;
v20 = 10;
v21 = 15;
*(_QWORD *)&v19 = 0x6D69542065766F4DLL;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, -100.0, -10.0);
cocos2d::CCPoint::operator+(&v25, &v16, v11);
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
10,
(unsigned int)&v19,
(unsigned int)&v16,
1061997773,
0,
1,
10,
0,
0,
1092616192,
0,
0,
0,
2,
0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v18, 95.0, -10.0);
cocos2d::CCPoint::operator+(&v25, &v16, v12);
SetupTriggerPopup::createEasingControls((_DWORD)a1, (unsigned int)&v16, v13, v14, 0);
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)a1 + 1136LL))(a1);
a1[744] = 0;
return 1;
}
return result;
}