//
// SetupInstantCollisionTriggerPopup::init from 0x1003972f0 to 0x10039791e (1582 bytes)
//
// 1 xrefs:
// > SetupInstantCollisionTriggerPopup::create @ 0x1003972ab
//
// 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 __fastcall SetupInstantCollisionTriggerPopup::init(
SetupInstantCollisionTriggerPopup *a1,
EffectGameObject *a2,
cocos2d::CCArray *a3)
{
bool result; // al
bool v4; // r15
float v5; // xmm0_4
void *v6[3]; // [rsp+40h] [rbp-140h] BYREF
char v7; // [rsp+58h] [rbp-128h] BYREF
char v8[15]; // [rsp+59h] [rbp-127h] BYREF
void *v9; // [rsp+68h] [rbp-118h]
char v10; // [rsp+70h] [rbp-110h] BYREF
char v11[15]; // [rsp+71h] [rbp-10Fh] BYREF
void *v12; // [rsp+80h] [rbp-100h]
__int128 v13; // [rsp+88h] [rbp-F8h] BYREF
void *v14; // [rsp+98h] [rbp-E8h]
char v15; // [rsp+A0h] [rbp-E0h] BYREF
_BYTE v16[23]; // [rsp+A1h] [rbp-DFh] BYREF
char v17; // [rsp+B8h] [rbp-C8h] BYREF
_BYTE v18[23]; // [rsp+B9h] [rbp-C7h] BYREF
char v19; // [rsp+D0h] [rbp-B0h] BYREF
_BYTE v20[23]; // [rsp+D1h] [rbp-AFh] BYREF
__int128 v21; // [rsp+E8h] [rbp-98h] BYREF
void *v22; // [rsp+F8h] [rbp-88h]
__int128 v23; // [rsp+100h] [rbp-80h] BYREF
void *v24; // [rsp+110h] [rbp-70h]
__int128 v25; // [rsp+118h] [rbp-68h] BYREF
void *v26; // [rsp+128h] [rbp-58h]
char v27; // [rsp+130h] [rbp-50h] BYREF
char v28[15]; // [rsp+131h] [rbp-4Fh] BYREF
void *v29; // [rsp+140h] [rbp-40h]
float v30[2]; // [rsp+14Ch] [rbp-34h] BYREF
float v31; // [rsp+154h] [rbp-2Ch]
float v32; // [rsp+158h] [rbp-28h]
float v33[2]; // [rsp+15Ch] [rbp-24h] BYREF
float v34; // [rsp+164h] [rbp-1Ch]
result = SetupTriggerPopup::init(a1, a2, a3, 340.0, 280.0, 1);
if ( result )
{
v4 = result;
SetupTriggerPopup::preSetup(a1);
strcpy((char *)v6, "\"Instant Collision");
SetupTriggerPopup::addTitle((__int64)a1, (__int64)v6);
if ( ((__int64)v6[0] & 1) != 0 )
operator delete(v6[2]);
v7 = 4;
strcpy(v8, "OK");
SetupTriggerPopup::addCloseButton((__int64)a1, (__int64)&v7);
if ( (v7 & 1) != 0 )
operator delete(v9);
v10 = 8;
strcpy(v11, "Help");
v14 = operator new(0x1D0u);
*(_QWORD *)&v13 = 465;
*((_QWORD *)&v13 + 1) = 463;
strcpy(
(char *)v14,
"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((__int64)a1, (__int64)&v10, &v13, (__m128)0x3F800000u);
if ( (v13 & 1) != 0 )
operator delete(v14);
if ( (v10 & 1) != 0 )
operator delete(v12);
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v30);
v32 = 0.5 * v30[0];
v15 = 18;
strcpy(v16, "BlockA ID");
v31 = (float)(0.5 * v30[0]) + -70.0;
v34 = (float)(v30[1] * 0.5) + 70.0;
sub_10028CBE0(v33, v31, v34);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
80,
(__int64)&v15,
v33,
1,
Uint,
0.69999999,
0.0,
100.0,
6,
1,
0,
0,
0,
2,
0);
v32 = v32 + 70.0;
if ( (v15 & 1) != 0 )
operator delete(*(void **)&v16[15]);
v17 = 18;
strcpy(v18, "BlockB ID");
sub_10028CBE0(v33, v32, v34);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
95,
(__int64)&v17,
v33,
1,
Uint,
0.69999999,
0.0,
100.0,
6,
1,
0,
0,
0,
2,
0);
if ( (v17 & 1) != 0 )
operator delete(*(void **)&v18[15]);
v27 = 14;
strcpy(v28, "True ID");
v5 = v31;
v31 = v34 + -60.0;
sub_10028CBE0(v33, v5, v34 + -60.0);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
51,
(__int64)&v27,
v33,
1,
Uint,
0.69999999,
0.0,
100.0,
6,
1,
0,
0,
0,
2,
0);
if ( (v27 & 1) != 0 )
operator delete(v29);
v19 = 16;
strcpy(v20, "False ID");
sub_10028CBE0(v33, v32, v31);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
71,
(__int64)&v19,
v33,
1,
Uint,
0.69999999,
0.0,
100.0,
6,
1,
0,
0,
0,
2,
0);
if ( (v19 & 1) != 0 )
operator delete(*(void **)&v20[15]);
LOBYTE(v21) = 4;
strcpy((char *)&v21 + 1, "P1");
v34 = (float)(v34 + -120.0) + 10.0;
sub_10028CBE0(v33, (float)(v30[0] * 0.5) + -75.0, v34);
SetupTriggerPopup::createToggleValueControl((int)a1, 138, &v21, 1.0, (__int64)v33, 0, 0, 0);
if ( (v21 & 1) != 0 )
operator delete(v22);
LOBYTE(v23) = 4;
strcpy((char *)&v23 + 1, "P2");
sub_10028CBE0(v33, v30[0] * 0.5, v34);
SetupTriggerPopup::createToggleValueControl((int)a1, 200, &v23, 1.0, (__int64)v33, 0, 0, 0);
if ( (v23 & 1) != 0 )
operator delete(v24);
LOBYTE(v25) = 4;
strcpy((char *)&v25 + 1, "PP");
sub_10028CBE0(v33, (float)(v30[0] * 0.5) + 75.0, v34);
SetupTriggerPopup::createToggleValueControl((int)a1, 201, &v25, 1.0, (__int64)v33, 0, 0, 0);
if ( (v25 & 1) != 0 )
operator delete(v26);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
SetupTriggerPopup::postSetup(a1);
return v4;
}
return result;
}