//
// SetupPlayerControlPopup::init from 0x578708 to 0x5789c4 (700 bytes)
//
// 1 xrefs:
// > SetupPlayerControlPopup::create @ 0x578a8a
//
// 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 SetupPlayerControlPopup::init(SetupPlayerControlPopup *a1, PlayerControlGameObject *a2, cocos2d::CCArray *a3)
{
_BOOL4 v4; // r11
cocos2d::CCDirector *v5; // r0
_BYTE v7[4]; // [sp+18h] [bp-34h] BYREF
cocos2d::CCSize v8; // [sp+1Ch] [bp-30h] BYREF
cocos2d::CCPoint v9; // [sp+24h] [bp-28h] BYREF
_BYTE v10[8]; // [sp+2Ch] [bp-20h] BYREF
cocos2d::CCPoint v11; // [sp+34h] [bp-18h] BYREF
cocos2d::CCPoint v12; // [sp+3Ch] [bp-10h] BYREF
v4 = SetupTriggerPopup::init(a1, a2, a3, 320.0, 220.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
sub_776584((int)&v12, "Player Control");
SetupTriggerPopup::addTitle((int)a1);
sub_774008(&v12);
sub_776584((int)&v12, "OK");
SetupTriggerPopup::addCloseButton((unsigned int)a1, (ButtonSprite **)&v12);
sub_774008(&v12);
sub_776584((int)&v11, "Help");
sub_776584(
(int)&v12,
"Controls player P1 or P2 behavior with a specified setting.\n"
"Stop Slide can be used to stop the player from sliding after a force has been applied.");
SetupTriggerPopup::addHelpButton((int)a1, (int)&v11, (int)&v12, 1065353216);
sub_774008(&v12);
sub_774008(&v11);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v8, v5);
cocos2d::CCPoint::CCPoint(&v9, v8.width * 0.5, v8.height * 0.5);
cocos2d::CCPoint::CCPoint(&v12, -20.0, 40.0);
cocos2d::CCPoint::operator+(v10, &v9, &v12);
sub_776584((int)v7, "P1");
cocos2d::CCPoint::CCPoint(&v11, -40.0, 20.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 138, (int)v7, &v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "P2");
cocos2d::CCPoint::CCPoint(&v11, 40.0, 20.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 200, (int)v7, &v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Stop\nJump");
cocos2d::CCPoint::CCPoint(&v11, -80.0, -20.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 540, (int)v7, &v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Stop\nMove");
cocos2d::CCPoint::CCPoint(&v11, 0.0, -20.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 541, (int)v7, &v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Stop\nRot");
cocos2d::CCPoint::CCPoint(&v11, 80.0, -20.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 542, (int)v7, &v12, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Stop\nSlide");
cocos2d::CCPoint::CCPoint(&v11, -80.0, -60.0);
cocos2d::CCPoint::operator+(&v12, v10, &v11);
SetupTriggerPopup::createToggleValueControl(a1, 543, (int)v7, &v12, 0, 0, 0, 1.0);
sub_774008(v7);
SetupTriggerPopup::postSetup(a1);
}
return v4;
}