//
// SetupCollisionStateTriggerPopup::init from 0x14041a9c0 to 0x14041ad90 (976 bytes)
//
// 3 xrefs:
// > SetupCollisionStateTriggerPopup::create @ 0x14041a97e
// > ??> @ 0x1406d926c
// > ??> @ 0x1406d9278
//
// 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=2
bool SetupCollisionStateTriggerPopup::init(
SetupCollisionStateTriggerPopup *a1,
EffectGameObject *a2,
cocos2d::CCArray *a3)
{
bool result; // al
__int64 v5; // rcx
cocos2d::CCDirector *v6; // rax
int v7; // eax
int v8; // eax
char v9; // [rsp+80h] [rbp-88h]
__int64 v10; // [rsp+80h] [rbp-88h]
__int128 v11; // [rsp+98h] [rbp-70h] BYREF
__int64 v12; // [rsp+A8h] [rbp-60h]
__int64 v13; // [rsp+B0h] [rbp-58h]
__int128 v14; // [rsp+B8h] [rbp-50h] BYREF
__int64 v15; // [rsp+C8h] [rbp-40h]
__int64 v16; // [rsp+D0h] [rbp-38h]
float v17; // [rsp+150h] [rbp+48h]
result = SetupTriggerPopup::init(a1, a2, a3, 340.0, 200.0, 1);
if ( result )
{
a1->m_disableTextDelegate = 1;
a1->determineStartValues(a1);
v12 = 15;
v13 = 15;
strcpy((char *)&v11, "Collision State");
SetupTriggerPopup::addTitle(a1, &v11);
v11 = 0;
v12 = 2;
v13 = 15;
strcpy((char *)&v11, "OK");
SetupTriggerPopup::addCloseButton(a1, &v11);
v11 = 0;
v12 = 0;
v13 = 15;
*(_QWORD *)&v11 = sub_14003AA10(0xA0u);
v12 = 149;
v13 = 159;
strcpy(
(char *)v11,
"Activates a group when the player collides with the hitbox.\n"
"State On is activated upon entering.\n"
"State Off is activated upon exiting.");
v14 = 0;
v15 = 4;
v16 = 15;
strcpy((char *)&v14, "Help");
SetupTriggerPopup::addHelpButton(a1, &v14, &v11);
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5);
cocos2d::CCDirector::getWinSize(v6);
v15 = 8;
v16 = 15;
v14 = 0x6E4F206574617453uLL;
cocos2d::CCPoint::CCPoint(0.0, (float)(v17 * 0.5) - 70.0);
v9 = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
51,
(unsigned int)&v14,
v7,
1060320051,
1,
3,
6,
1,
0,
1120403456,
0,
0,
0,
2,
v9,
&v14);
*((_QWORD *)&v11 + 1) = 102;
v12 = 9;
v13 = 15;
*(_QWORD *)&v11 = 0x664F206574617453LL;
cocos2d::CCPoint::CCPoint(7.1449349e31, (float)(v17 * 0.5) + 70.0);
LOBYTE(v10) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
71,
(unsigned int)&v11,
v8,
1060320051,
1,
3,
6,
1,
0,
1120403456,
0,
0,
0,
2,
v10);
a1->updateDefaultTriggerValues(a1);
a1->m_disableTextDelegate = 0;
return 1;
}
return result;
}