//
// SetupInstantCollisionTriggerPopup::init from 0x4f5378 to 0x4f56de (870 bytes)
//
// 1 xrefs:
// > SetupInstantCollisionTriggerPopup::create @ 0x4f57a6
//
// 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 SetupInstantCollisionTriggerPopup::init(
SetupInstantCollisionTriggerPopup *a1,
EffectGameObject *a2,
cocos2d::CCArray *a3)
{
_BOOL4 v4; // r10
cocos2d::CCDirector *v5; // r0
float v6; // s16
float v7; // s21
float v8; // s18
float v9; // s16
_BYTE v11[4]; // [sp+38h] [bp-1Ch] BYREF
cocos2d::CCSize v12; // [sp+3Ch] [bp-18h] BYREF
cocos2d::CCPoint v13; // [sp+44h] [bp-10h] BYREF
v4 = SetupTriggerPopup::init(a1, a2, a3, 340.0, 280.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
sub_776584((int)&v13, "Instant Collision");
SetupTriggerPopup::addTitle(a1, (std::string)&v13);
sub_774008(&v13);
sub_776584((int)&v13, "OK");
SetupTriggerPopup::addCloseButton(a1, (std::string)&v13);
sub_774008(&v13);
sub_776584((int)&v12, "Help");
sub_776584(
(int)&v13,
"Activates a group when Collision Blocks using BlockA ID and BlockB ID collide or do not collide. The condi"
"tion is only checked when it is hit and never again. Make sure that one of the blocks have Dynamic Block enabled.\n"
"True ID is activated if they collide. False ID is activated if they do not collide.\n"
"P1 and P2 makes collision trigger upon the respective player touching BlockB ID.\n"
"PP triggers when both players collide.");
SetupTriggerPopup::addHelpButton(a1, (std::string)&v12, (std::string)&v13, 1.0);
sub_774008(&v13);
sub_774008(&v12);
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v12, v5);
v6 = (float)(v12.height * 0.5) + 70.0;
v7 = (float)(v12.width * 0.5) - 70.0;
v8 = (float)(v12.width * 0.5) + 70.0;
sub_776584((int)v11, "BlockA ID");
cocos2d::CCPoint::CCPoint(&v13, v7, v6);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
80,
(int)v11,
(int)&v13,
0.7,
1,
3,
6,
1,
nullptr,
100.0,
0,
0,
0,
2,
0);
sub_774008(v11);
sub_776584((int)v11, "BlockB ID");
cocos2d::CCPoint::CCPoint(&v13, v8, v6);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
95,
(int)v11,
(int)&v13,
0.7,
1,
3,
6,
1,
nullptr,
100.0,
0,
0,
0,
2,
0);
sub_774008(v11);
sub_776584((int)v11, "True ID");
cocos2d::CCPoint::CCPoint(&v13, v7, v6 - 60.0);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
51,
(int)v11,
(int)&v13,
0.7,
1,
3,
6,
1,
nullptr,
100.0,
0,
0,
0,
2,
0);
sub_774008(v11);
sub_776584((int)v11, "False ID");
cocos2d::CCPoint::CCPoint(&v13, v8, v6 - 60.0);
SetupTriggerPopup::createValueControlAdvanced(
(int)a1,
71,
(int)v11,
(int)&v13,
0.7,
1,
3,
6,
1,
nullptr,
100.0,
0,
0,
0,
2,
0);
sub_774008(v11);
sub_776584((int)v11, "P1");
v9 = (float)(v6 - 120.0) + 10.0;
cocos2d::CCPoint::CCPoint(&v13, (float)(v12.width * 0.5) - 75.0, v9);
SetupTriggerPopup::createToggleValueControl((int)a1, 138, (int)v11, (int)&v13, 0, 0, 0, 1.0);
sub_774008(v11);
sub_776584((int)v11, "P2");
cocos2d::CCPoint::CCPoint(&v13, v12.width * 0.5, v9);
SetupTriggerPopup::createToggleValueControl((int)a1, 200, (int)v11, (int)&v13, 0, 0, 0, 1.0);
sub_774008(v11);
sub_776584((int)v11, "PP");
cocos2d::CCPoint::CCPoint(&v13, (float)(v12.width * 0.5) + 75.0, v9);
SetupTriggerPopup::createToggleValueControl((int)a1, 201, (int)v11, (int)&v13, 0, 0, 0, 1.0);
sub_774008(v11);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
SetupTriggerPopup::postSetup(a1);
}
return v4;
}