//
// SetupRotateGameplayPopup::init from 0x140441550 to 0x140441f16 (2502 bytes)
//
// 2 xrefs:
// > EditorUI::editObject @ 0x14011c3cd
// > ??> @ 0x1406da40c
//
// 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
//
// Hidden C++ exception states: #wind=3
bool SetupRotateGameplayPopup::init(SetupRotateGameplayPopup *a1, RotateGameplayGameObject *a2, cocos2d::CCArray *a3)
{
bool result; // al
_QWORD *v5; // r9
_QWORD *v6; // rcx
const char *v7; // rdx
__int64 v8; // r8
double v9; // xmm0_8
__int64 v10; // rcx
cocos2d::CCDirector *v11; // rax
double v12; // xmm0_8
double ToggleValueControl; // xmm0_8
int v14; // eax
int v15; // r9d
_BOOL8 v16; // r8
_BOOL8 v17; // r8
int v18; // eax
__int128 v19; // xmm0
int v20; // eax
char v21; // [rsp+80h] [rbp-88h]
__int64 v22; // [rsp+80h] [rbp-88h]
__int64 v23; // [rsp+80h] [rbp-88h]
__int128 v24; // [rsp+88h] [rbp-80h] BYREF
__int64 v25; // [rsp+98h] [rbp-70h]
__int64 v26; // [rsp+A0h] [rbp-68h]
int v27[2]; // [rsp+A8h] [rbp-60h] BYREF
__int128 *v28; // [rsp+B0h] [rbp-58h]
__int128 *v29; // [rsp+B8h] [rbp-50h] BYREF
__int128 v30; // [rsp+C0h] [rbp-48h] BYREF
__int64 v31; // [rsp+D0h] [rbp-38h]
__int64 v32; // [rsp+D8h] [rbp-30h]
_BYTE v33[4]; // [rsp+E0h] [rbp-28h] BYREF
_BYTE v34[8]; // [rsp+E8h] [rbp-20h] BYREF
_BYTE v35[88]; // [rsp+F0h] [rbp-18h] BYREF
float v36; // [rsp+170h] [rbp+68h]
result = SetupTriggerPopup::init(a1, a2, a3, 380.0, 280.0, 1);
if ( result )
{
a1->m_disableTextDelegate = 1;
a1->determineStartValues(a1);
v25 = 15;
v26 = 15;
strcpy((char *)&v24, "Rotate Gameplay");
SetupTriggerPopup::addTitle(a1, &v24);
v24 = 0;
v25 = 2;
v26 = 15;
strcpy((char *)&v24, "OK");
SetupTriggerPopup::addCloseButton(a1, &v24);
*(_QWORD *)v27 = &v24;
v24 = 0;
v25 = 0;
v26 = 15;
v5 = sub_14003AA10(0x2B0u);
*(_QWORD *)&v24 = v5;
v25 = 685;
v26 = 687;
v6 = v5;
v7 = "VelMod modifies the velocity after switching rotation.\n"
"Override Velocity sets the velocity instead of multiplying.\n"
"Change Channel allows you to specify which channel to switch to after rotating. Triggers in a given cha"
"nnel will only be activated when the player is in that channel. You can use Channel Only to exclude gam"
"eplay rotation.\n"
"The Rotate Gameplay trigger direction determines how the channel's triggers are sorted. Upwards means s"
"maller Y values are triggered first, right means smaller X values are triggered first, and so on.\n"
"Instant Offset makes the camera update instantly when switching gameplay to the opposite direction.";
v8 = 5;
do
{
*(_OWORD *)v6 = *(_OWORD *)v7;
*((_OWORD *)v6 + 1) = *((_OWORD *)v7 + 1);
*((_OWORD *)v6 + 2) = *((_OWORD *)v7 + 2);
*((_OWORD *)v6 + 3) = *((_OWORD *)v7 + 3);
*((_OWORD *)v6 + 4) = *((_OWORD *)v7 + 4);
*((_OWORD *)v6 + 5) = *((_OWORD *)v7 + 5);
*((_OWORD *)v6 + 6) = *((_OWORD *)v7 + 6);
v6 += 16;
*((_OWORD *)v6 - 1) = *((_OWORD *)v7 + 7);
v7 += 128;
--v8;
}
while ( v8 );
*(_OWORD *)v6 = *(_OWORD *)v7;
*((_OWORD *)v6 + 1) = *((_OWORD *)v7 + 1);
v6[4] = *((_QWORD *)v7 + 4);
*((_DWORD *)v6 + 10) = *((_DWORD *)v7 + 10);
*((_BYTE *)v6 + 44) = v7[44];
*((_BYTE *)v5 + 685) = 0;
v30 = 0;
v31 = 4;
v32 = 15;
strcpy((char *)&v30, "Help");
v9 = SetupTriggerPopup::addHelpButton(a1, &v30, &v24);
v11 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::getWinSize(v11);
v12 = cocos2d::CCPoint::CCPoint(*(float *)&v9, (float)(v36 * 0.5) - 25.0);
cocos2d::CCPoint::CCPoint(*(float *)&v12, v36 * 0.5);
v29 = &v24;
v25 = 13;
v26 = 15;
strcpy((char *)&v24, "Edit\nVelocity");
HIWORD(v24) = 0;
cocos2d::CCPoint::CCPoint(7.3964775e31, -60.0);
cocos2d::CCPoint::operator+(v33, v27);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
169,
(unsigned int)&v24,
(unsigned int)v27,
0,
0,
0,
1065353216);
v28 = &v24;
v24 = 0;
v25 = 0;
v26 = 15;
*(_QWORD *)&v24 = sub_14003AA10(0x20u);
v25 = 17;
v26 = 31;
strcpy((char *)v24, "Override\nVelocity");
cocos2d::CCPoint::CCPoint(4.544966e30, 60.0);
cocos2d::CCPoint::operator+(v33, v27);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
584,
(unsigned int)&v24,
(unsigned int)v27,
0,
0,
169,
1065353216);
v28 = &v30;
v31 = 8;
v32 = 15;
v30 = 0x3A58646F4D6C6556uLL;
cocos2d::CCPoint::CCPoint(0.0, -80.0);
cocos2d::CCPoint::operator+(v34, v27);
v21 = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
582,
(unsigned int)&v30,
(unsigned int)v27,
1060320051,
0,
1,
6,
0,
-1082130432,
1065353216,
0,
169,
1,
2,
v21);
v28 = &v30;
v30 = 0;
v31 = 2;
v32 = 15;
strcpy((char *)&v30, "Y:");
cocos2d::CCPoint::CCPoint(0.0, 80.0);
cocos2d::CCPoint::operator+(v34, v27);
LOBYTE(v22) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
583,
(unsigned int)&v30,
(unsigned int)v27,
1060320051,
0,
1,
6,
0,
-1082130432,
1065353216,
0,
169,
1,
2,
v22);
v28 = &v24;
v25 = 14;
v26 = 15;
strcpy((char *)&v24, "Change\nChannel");
HIBYTE(v24) = 0;
cocos2d::CCPoint::CCPoint(1.7440043e28, -60.0);
cocos2d::CCPoint::operator+(v33, v27);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
171,
(unsigned int)&v24,
(unsigned int)v27,
0,
0,
0,
1065353216);
v28 = &v24;
v25 = 12;
v26 = 15;
strcpy((char *)&v24, "Channel\nOnly");
BYTE13(v24) = 0;
HIWORD(v24) = 0;
cocos2d::CCPoint::CCPoint(1.7440043e28, 60.0);
cocos2d::CCPoint::operator+(v33, v27);
ToggleValueControl = SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
172,
(unsigned int)&v24,
(unsigned int)v27,
0,
0,
171,
1065353216);
cocos2d::CCPoint::CCPoint(*(float *)&ToggleValueControl, 0.0);
cocos2d::CCPoint::operator+(v34, v35);
v28 = &v24;
v25 = 15;
v26 = 15;
strcpy((char *)&v24, "Target Channel:");
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v29);
LOBYTE(v23) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
173,
(unsigned int)&v24,
v14,
1061997773,
1,
3,
6,
1,
0,
1176255488,
0,
171,
0,
2,
v23);
v28 = &v30;
v30 = 0;
v31 = 0;
v32 = 15;
LOBYTE(v30) = 0;
cocos2d::CCPoint::CCPoint(0.0, 75.0);
cocos2d::CCPoint::operator+(v35, v27);
SetupTriggerPopup::createPlusButton((int)a1, 173, (int)v27, v15, &v30, 0, 171);
if ( a1->getValue(a1, 171) == 0.0 )
v16 = 0;
else
LOBYTE(v16) = 1;
a1->toggleGroup(a1, 171, v16);
if ( a1->getValue(a1, 169) == 0.0 )
v17 = 0;
else
LOBYTE(v17) = 1;
a1->toggleGroup(a1, 169, v17);
v28 = &v24;
v25 = 14;
v26 = 15;
strcpy((char *)&v24, "Instant\nOffset");
HIBYTE(v24) = 0;
cocos2d::CCPoint::CCPoint(v36 * 0.5, (float)((float)(a1->m_width * 0.5) + (float)(v36 * 0.5)) - 72.0);
SetupTriggerPopup::createToggleValueControl((_DWORD)a1, 368, (unsigned int)&v24, v18, 0, 0, 0, 1065353216);
v28 = &v24;
v19 = 0;
v25 = 10;
v26 = 15;
*(_QWORD *)&v19 = 0x696C530A746E6F44LL;
v24 = v19;
WORD4(v24) = 25956;
BYTE10(v24) = 0;
cocos2d::CCPoint::CCPoint(v36 * 0.5, (float)((float)(a1->m_width * 0.5) + (float)(v36 * 0.5)) - 72.0);
SetupTriggerPopup::createToggleValueControl((_DWORD)a1, 585, (unsigned int)&v24, v20, 0, 0, 0, 1065353216);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
a1->updateDefaultTriggerValues(a1);
a1->m_disableTextDelegate = 0;
return 1;
}
return result;
}