//
// SetupGravityTriggerPopup::init from 0x140429250 to 0x1404296c8 (1144 bytes)
//
// 3 xrefs:
// > SetupGravityTriggerPopup::create @ 0x14042920e
// > ??> @ 0x1406d9890
// > ??> @ 0x1406d989c
//
// 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 SetupGravityTriggerPopup::init(SetupGravityTriggerPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3)
{
bool result; // al
double v5; // xmm0_8
__int64 v6; // rcx
cocos2d::CCDirector *v7; // rax
double v8; // xmm0_8
char v9; // [rsp+80h] [rbp-21h]
float v10; // [rsp+88h] [rbp-19h]
_QWORD v11[2]; // [rsp+90h] [rbp-11h] BYREF
__int128 *v12; // [rsp+A0h] [rbp-1h]
__int128 v13; // [rsp+A8h] [rbp+7h] BYREF
__int64 v14; // [rsp+B8h] [rbp+17h]
__int64 v15; // [rsp+C0h] [rbp+1Fh]
__int128 v16; // [rsp+C8h] [rbp+27h] BYREF
__int64 v17; // [rsp+D8h] [rbp+37h]
__int64 v18; // [rsp+E0h] [rbp+3Fh]
char v19; // [rsp+120h] [rbp+7Fh] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 320.0, 240.0, 1);
if ( result )
{
a1->determineStartValues(a1);
v14 = 15;
v15 = 15;
strcpy((char *)&v13, "Gravity Trigger");
SetupTriggerPopup::addTitle(a1, &v13);
v13 = 0;
v14 = 2;
v15 = 15;
strcpy((char *)&v13, "OK");
SetupTriggerPopup::addCloseButton(a1, &v13);
v11[0] = &v13;
v13 = 0;
v14 = 0;
v15 = 15;
*(_QWORD *)&v13 = sub_14003AA10(0xA0u);
v14 = 144;
v15 = 159;
strcpy(
(char *)v13,
"Changes the gameplay gravity.\n"
"P1 is player 1 and P2 is player 2.\n"
"PT targets the player that touches the trigger.");
v16 = 0;
v17 = 4;
v18 = 15;
strcpy((char *)&v16, "Help");
v5 = SetupTriggerPopup::addHelpButton(a1, &v16, &v13);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6);
cocos2d::CCDirector::getWinSize(v7);
v8 = cocos2d::CCPoint::CCPoint(*(float *)&v5, v10 * 0.5);
v11[1] = &v13;
v14 = 7;
v15 = 15;
v13 = 0x79746976617247uLL;
cocos2d::CCPoint::CCPoint(*(float *)&v8, 0.0);
cocos2d::CCPoint::operator+(&v19, v11);
v9 = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
148,
(unsigned int)&v13,
(unsigned int)v11,
1059481190,
0,
1,
6,
0,
1036831949,
0x40000000,
0,
0,
0,
2,
v9);
v12 = &v16;
v16 = 0;
v17 = 2;
v18 = 15;
strcpy((char *)&v16, "P1");
cocos2d::CCPoint::CCPoint(0.0, -75.0);
cocos2d::CCPoint::operator+(&v19, v11);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
138,
(unsigned int)&v16,
(unsigned int)v11,
0,
0,
0,
1065353216);
v12 = &v16;
v16 = 0;
v17 = 2;
v18 = 15;
strcpy((char *)&v16, "P2");
cocos2d::CCPoint::CCPoint(0.0, 0.0);
cocos2d::CCPoint::operator+(&v19, v11);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
200,
(unsigned int)&v16,
(unsigned int)v11,
0,
0,
0,
1065353216);
v12 = &v16;
v16 = 0;
v17 = 2;
v18 = 15;
strcpy((char *)&v16, "PT");
cocos2d::CCPoint::CCPoint(0.0, 75.0);
cocos2d::CCPoint::operator+(&v19, v11);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
201,
(unsigned int)&v16,
(unsigned int)v11,
0,
0,
0,
1065353216);
a1->updateDefaultTriggerValues(a1);
a1->m_disableTextDelegate = 0;
return 1;
}
return result;
}