//
// SetupTimerEventTriggerPopup::init from 0x1003a17e0 to 0x1003a1cbb (1243 bytes)
//
// 1 xrefs:
// > SetupTimerEventTriggerPopup::create @ 0x1003a179e
//
// 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 SetupTimerEventTriggerPopup::init(
SetupTimerEventTriggerPopup *a1,
TimerTriggerGameObject *a2,
cocos2d::CCArray *a3)
{
bool result; // al
bool v4; // r14
char v5; // [rsp+38h] [rbp-F8h] BYREF
char v6[15]; // [rsp+39h] [rbp-F7h] BYREF
void *v7; // [rsp+48h] [rbp-E8h]
char v8; // [rsp+50h] [rbp-E0h] BYREF
char v9[15]; // [rsp+51h] [rbp-DFh] BYREF
void *v10; // [rsp+60h] [rbp-D0h]
__int128 v11; // [rsp+68h] [rbp-C8h] BYREF
void *v12; // [rsp+78h] [rbp-B8h]
char v13; // [rsp+80h] [rbp-B0h] BYREF
_BYTE v14[23]; // [rsp+81h] [rbp-AFh] BYREF
float v15[2]; // [rsp+98h] [rbp-98h] BYREF
void *v16[3]; // [rsp+A0h] [rbp-90h] BYREF
char v17; // [rsp+B8h] [rbp-78h] BYREF
char v18[15]; // [rsp+B9h] [rbp-77h] BYREF
void *v19; // [rsp+C8h] [rbp-68h]
char v20; // [rsp+D0h] [rbp-60h] BYREF
_BYTE v21[23]; // [rsp+D1h] [rbp-5Fh] BYREF
__int128 v22; // [rsp+E8h] [rbp-48h] BYREF
void *v23; // [rsp+F8h] [rbp-38h]
unsigned __int64 v24; // [rsp+100h] [rbp-30h] BYREF
double v25; // [rsp+108h] [rbp-28h] BYREF
unsigned __int64 v26[4]; // [rsp+110h] [rbp-20h] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 400.0, 280.0, 1);
if ( result )
{
v4 = result;
SetupTriggerPopup::preSetup(a1);
strcpy((char *)v16, "$Time Event Trigger");
SetupTriggerPopup::addTitle((__int64)a1, (__int64)v16);
if ( ((__int64)v16[0] & 1) != 0 )
operator delete(v16[2]);
v5 = 4;
strcpy(v6, "OK");
SetupTriggerPopup::addCloseButton((__int64)a1, (__int64)&v5);
if ( (v5 & 1) != 0 )
operator delete(v7);
v8 = 8;
strcpy(v9, "Help");
v12 = operator new(0x80u);
*(_QWORD *)&v11 = 129;
*((_QWORD *)&v11 + 1) = 123;
strcpy(
(char *)v12,
"Activates objects using TargetID when a specific TargetTime is reached for a timer given by ItemID.");
SetupTriggerPopup::addHelpButton((__int64)a1, (__int64)&v8, &v11, (__m128)0x3F800000u);
if ( (v11 & 1) != 0 )
operator delete(v12);
if ( (v8 & 1) != 0 )
operator delete(v10);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v15);
sub_10028CBE0((float *)&v24, v15[0] * 0.5, (float)(0.5 * v15[1]) + 85.0);
v17 = 12;
strcpy(v18, "ItemID");
sub_10028CBE0((float *)v26, -85.0, -15.0);
sub_10028CCE0(&v25, &v24, v26);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
80,
(__int64)&v17,
(float *)&v25,
1,
Uint,
0.80000001,
0.0,
9999.0,
6,
1,
0,
0,
0,
2,
0);
if ( (v17 & 1) != 0 )
operator delete(v19);
v13 = 16;
strcpy(v14, "TargetID");
sub_10028CBE0((float *)v26, 85.0, -15.0);
sub_10028CCE0(&v25, &v24, v26);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
51,
(__int64)&v13,
(float *)&v25,
1,
Uint,
0.80000001,
0.0,
9999.0,
6,
1,
0,
0,
0,
2,
0);
if ( (v13 & 1) != 0 )
operator delete(*(void **)&v14[15]);
v20 = 20;
strcpy(v21, "TargetTime");
sub_10028CBE0((float *)v26, -85.0, -60.0);
sub_10028CCE0(&v25, &v24, v26);
SetupTriggerPopup::createValueControlAdvanced(
(__int64)a1,
473,
(__int64)&v20,
(float *)&v25,
0,
Float,
0.80000001,
0.0,
100.0,
10,
0,
0,
0,
0,
2,
0);
if ( (v20 & 1) != 0 )
operator delete(*(void **)&v21[15]);
LOBYTE(v22) = 28;
strcpy((char *)&v22 + 1, "Multi\nActivate");
sub_10028CBE0((float *)v26, 85.0, -60.0);
sub_10028CCE0(&v25, &v24, v26);
SetupTriggerPopup::createToggleValueControl((int)a1, 475, &v22, 1.0, (__int64)&v25, 0, 0, 0);
if ( (v22 & 1) != 0 )
operator delete(v23);
SetupTriggerPopup::postSetup(a1);
return v4;
}
return result;
}