//
// SetupPlatformerEndPopup::init from 0x50655c to 0x50680a (686 bytes)
//
// 1 xrefs:
// > SetupPlatformerEndPopup::create @ 0x5068d6
//
// 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 SetupPlatformerEndPopup::init(SetupPlatformerEndPopup *a1, EndTriggerGameObject *a2, cocos2d::CCArray *a3)
{
_BOOL4 v4; // r11
cocos2d::CCDirector *v5; // r0
_BYTE v7[4]; // [sp+38h] [bp-2Ch] BYREF
cocos2d::CCSize v8; // [sp+3Ch] [bp-28h] BYREF
cocos2d::CCPoint v9; // [sp+44h] [bp-20h] BYREF
cocos2d::CCPoint v10; // [sp+4Ch] [bp-18h] BYREF
_BYTE v11[8]; // [sp+54h] [bp-10h] BYREF
v4 = SetupTriggerPopup::init(a1, a2, a3, 300.0, 240.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
sub_776584((int)v11, "Setup End");
SetupTriggerPopup::addTitle(a1, (std::string)v11);
sub_774008(v11);
sub_776584((int)v11, "OK");
SetupTriggerPopup::addCloseButton(a1, (std::string)v11);
sub_774008(v11);
sub_776584((int)&v10, "Help");
sub_776584(
(int)v11,
"Sets a specific object given by TargetPos to be the end of the level. The player is pulled into th"
"e end instantly.\n"
"SpawnID lets you spawn a group at the end.\n"
"Instant teleports the player to the end instantly instead of the default gradual pull.\n"
"No Effects disables visual end effects.\n"
"No SFX disables end sound effects.");
SetupTriggerPopup::addHelpButton(a1, (std::string)&v10, (std::string)v11, 1.0);
sub_774008(v11);
sub_774008(&v10);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v8, v5);
cocos2d::CCPoint::CCPoint(&v9, v8.width * 0.5, v8.height * 0.5);
sub_776584((int)v7, "SpawnID:");
cocos2d::CCPoint::CCPoint(&v10, -75.0, 50.0);
cocos2d::CCPoint::operator+(v11, &v9, &v10);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
51,
(int)v7,
(int)v11,
0.8,
1,
2,
10,
1,
nullptr,
9999.0,
0,
0,
0,
0,
0);
sub_774008(v7);
sub_776584((int)v7, "TargetPos:");
cocos2d::CCPoint::CCPoint(&v10, 75.0, 50.0);
cocos2d::CCPoint::operator+(v11, &v9, &v10);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
71,
(int)v7,
(int)v11,
0.8,
1,
2,
10,
1,
nullptr,
9999.0,
0,
0,
0,
0,
0);
sub_774008(v7);
sub_776584((int)v7, "No Effects");
cocos2d::CCPoint::CCPoint(&v10, -90.0, 0.0);
cocos2d::CCPoint::operator+(v11, &v9, &v10);
SetupTriggerPopup::createToggleValueControl((int)a1, 460, (int)v7, (int)v11, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "No SFX");
cocos2d::CCPoint::CCPoint(&v10, -90.0, -30.0);
cocos2d::CCPoint::operator+(v11, &v9, &v10);
SetupTriggerPopup::createToggleValueControl((int)a1, 461, (int)v7, (int)v11, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Instant");
cocos2d::CCPoint::CCPoint(&v10, 40.0, 0.0);
cocos2d::CCPoint::operator+(v11, &v9, &v10);
SetupTriggerPopup::createToggleValueControl((int)a1, 487, (int)v7, (int)v11, 0, 0, 0, 1.0);
sub_774008(v7);
SetupTriggerPopup::postSetup(a1);
}
return v4;
}