//
// SetupRotateGameplayPopup::init from 0xb26628 to 0xb26e8c (2148 bytes)
//
// 2 xrefs:
// > SetupRotateGameplayPopup::create @ 0xb270e8
// > ??> @ 0x78b80
//
// This function is hookable on this platform (idp: arm, 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 13:01:39 +0000
//
__int64 __fastcall SetupRotateGameplayPopup::init(
SetupRotateGameplayPopup *this,
RotateGameplayGameObject *a2,
cocos2d::CCArray *a3)
{
unsigned __int8 v4; // w0
unsigned int v5; // w24
__int64 v7; // x2
__int64 v8; // x3
__int64 v9; // x4
__int64 v10; // x5
const char *v11; // x6
cocos2d::CCDirector *v12; // x0
cocos2d::CCDirector *v13; // x0
void (__fastcall *v14)(SetupRotateGameplayPopup *, __int64, bool); // x22
float v15; // s0
void (__fastcall *v16)(SetupRotateGameplayPopup *, __int64, bool); // x22
float v17; // s0
__int64 v18; // [xsp+A8h] [xbp+78h] BYREF
_BYTE v19[4]; // [xsp+B0h] [xbp+80h] BYREF
float v20; // [xsp+B4h] [xbp+84h]
_BYTE v21[8]; // [xsp+B8h] [xbp+88h] BYREF
__int64 v22; // [xsp+C0h] [xbp+90h] BYREF
_BYTE v23[8]; // [xsp+C8h] [xbp+98h] BYREF
__int64 v24; // [xsp+D0h] [xbp+A0h] BYREF
cocos2d::CCDirector *v25[2]; // [xsp+D8h] [xbp+A8h] BYREF
void *v26; // [xsp+E8h] [xbp+B8h]
__int64 v27; // [xsp+F0h] [xbp+C0h] BYREF
__int64 v28; // [xsp+F8h] [xbp+C8h]
void *v29; // [xsp+100h] [xbp+D0h]
v4 = SetupTriggerPopup::init(this, a2, a3, 380.0, 280.0, 1u, 0.0);
v5 = v4;
if ( v4 )
{
SetupTriggerPopup::preSetup(this);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, "Rotate Gameplay", 0xFu);
SetupTriggerPopup::addTitle((__int64)this, (__int64)&v27);
if ( (v27 & 1) != 0 )
operator delete(v29);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, "OK", 2u);
SetupTriggerPopup::addCloseButton((__int64)this, (__int64)&v27, v7, v8, v9, v10, v11);
if ( (v27 & 1) != 0 )
operator delete(v29);
v25[0] = nullptr;
v25[1] = nullptr;
v26 = nullptr;
std::string::__init((__int64 *)v25, "Help", 4u);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(
&v27,
"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 channe"
"l will only be activated when the player is in that channel. You can use Channel Only to exclude gameplay "
"rotation.\n"
"The Rotate Gameplay trigger direction determines how the channel's triggers are sorted. Upwards means smal"
"ler 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.",
0x2ADu);
SetupTriggerPopup::addHelpButton((__int64)this, (char *)v25, (char *)&v27, 0.9);
if ( (v27 & 1) != 0 )
operator delete(v29);
v12 = (cocos2d::CCDirector *)LOBYTE(v25[0]);
if ( ((__int64)v25[0] & 1) != 0 )
operator delete(v26);
v13 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v12);
cocos2d::CCDirector::getWinSize(&v18, v13);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v19,
(float)(*(float *)&v18 * 0.5) + -25.0,
(float)(*((float *)&v18 + 1) * 0.5) + 85.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v21, *(float *)&v18 * 0.5, v20);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, "Edit\nVelocity", 0xDu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -60.0, 0.0);
cocos2d::CCPoint::operator+(&v24, v19);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0xA9u,
&v27,
(const cocos2d::CCPoint *)&v24,
0,
0,
0,
1.0);
if ( (v27 & 1) != 0 )
operator delete(v29);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, "Override\nVelocity", 0x11u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 60.0, 0.0);
cocos2d::CCPoint::operator+(&v24, v19);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0x248u,
&v27,
(const cocos2d::CCPoint *)&v24,
0,
0,
169,
1.0);
if ( (v27 & 1) != 0 )
operator delete(v29);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, "VelModX:", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -80.0, -42.0);
cocos2d::CCPoint::operator+(&v24, v21);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
582,
(char *)&v27,
(__int64)&v24,
0,
1,
6,
0,
0.7,
-1.0,
1.0,
0,
169,
1,
2,
0);
if ( (v27 & 1) != 0 )
operator delete(v29);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, "Y:", 2u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 80.0, -42.0);
cocos2d::CCPoint::operator+(&v24, v21);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
583,
(char *)&v27,
(__int64)&v24,
0,
1,
6,
0,
0.7,
-1.0,
1.0,
0,
169,
1,
2,
0);
if ( (v27 & 1) != 0 )
operator delete(v29);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, "Change\nChannel", 0xEu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -60.0, -84.0);
cocos2d::CCPoint::operator+(&v24, v19);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0xABu,
&v27,
(const cocos2d::CCPoint *)&v24,
0,
0,
0,
1.0);
if ( (v27 & 1) != 0 )
operator delete(v29);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, "Channel\nOnly", 0xCu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 60.0, -84.0);
cocos2d::CCPoint::operator+(&v24, v19);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0xACu,
&v27,
(const cocos2d::CCPoint *)&v24,
0,
0,
171,
1.0);
if ( (v27 & 1) != 0 )
operator delete(v29);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v24, 0.0, -146.0);
cocos2d::CCPoint::operator+(&v22, v21);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, "Target Channel:", 0xFu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v24, (const cocos2d::CCPoint *)&v22);
SetupTriggerPopup::createValueControlAdvanced(
(cocos2d::CCArray **)this,
173,
(char *)&v27,
(__int64)&v24,
1,
3,
6,
1,
0.8,
0.0,
9999.0,
0,
171,
0,
2,
0);
if ( (v27 & 1) != 0 )
operator delete(v29);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, 75.0, 0.0);
cocos2d::CCPoint::operator+(&v24, &v22);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, &byte_11B8890, 0);
SetupTriggerPopup::createPlusButton((__int64)this, 0xADu, (const cocos2d::CCPoint *)&v24, &v27, 0, 171, 0.8);
if ( (v27 & 1) != 0 )
operator delete(v29);
v14 = *(void (__fastcall **)(SetupRotateGameplayPopup *, __int64, bool))(*(_QWORD *)this + 1352LL);
v15 = (*(float (__fastcall **)(SetupRotateGameplayPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 171);
v14(this, 171, v15 != 0.0);
v16 = *(void (__fastcall **)(SetupRotateGameplayPopup *, __int64, bool))(*(_QWORD *)this + 1352LL);
v17 = (*(float (__fastcall **)(SetupRotateGameplayPopup *, __int64))(*(_QWORD *)this + 1464LL))(this, 169);
v16(this, 169, v17 != 0.0);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, "Instant\nOffset", 0xEu);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v24,
(float)((float)(*((float *)this + 183) * 0.5) + (float)(*(float *)&v18 * 0.5)) - 72.0,
50.0 - (float)((float)(*((float *)this + 184) * 0.5) - (float)(*((float *)&v18 + 1) * 0.5)));
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0x170u,
&v27,
(const cocos2d::CCPoint *)&v24,
0,
0,
0,
1.0);
if ( (v27 & 1) != 0 )
operator delete(v29);
v27 = 0;
v28 = 0;
v29 = nullptr;
std::string::__init(&v27, "Dont\nSlide", 0xAu);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v24,
(float)((float)(*((float *)this + 183) * 0.5) + (float)(*(float *)&v18 * 0.5)) - 72.0,
(float)(50.0 - (float)((float)(*((float *)this + 184) * 0.5) - (float)(*((float *)&v18 + 1) * 0.5))) + 30.0);
SetupTriggerPopup::createToggleValueControl(
(__int64)this,
0x249u,
&v27,
(const cocos2d::CCPoint *)&v24,
0,
0,
0,
1.0);
if ( (v27 & 1) != 0 )
operator delete(v29);
SetupTriggerPopup::createMultiTriggerItemsDefault(this);
SetupTriggerPopup::postSetup(this);
}
return v5;
}