//
// SetupTimerEventTriggerPopup::init from 0x1404627b0 to 0x140462cf7 (1351 bytes)
//
// 3 xrefs:
// > SetupTimerEventTriggerPopup::create @ 0x14046276e
// > ??> @ 0x1406daeb0
// > ??> @ 0x1406daebc
//
// 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=3
bool SetupTimerEventTriggerPopup::init(
SetupTimerEventTriggerPopup *a1,
TimerTriggerGameObject *a2,
cocos2d::CCArray *a3)
{
bool result; // al
double v5; // xmm0_8
__int64 v6; // rcx
cocos2d::CCDirector *v7; // rax
char v8; // [rsp+80h] [rbp-88h]
__int64 v9; // [rsp+80h] [rbp-88h]
__int64 v10; // [rsp+80h] [rbp-88h]
float v11; // [rsp+88h] [rbp-80h]
_QWORD v12[2]; // [rsp+90h] [rbp-78h] BYREF
__int128 *v13; // [rsp+A0h] [rbp-68h]
__int128 v14; // [rsp+A8h] [rbp-60h] BYREF
__int64 v15; // [rsp+B8h] [rbp-50h]
__int64 v16; // [rsp+C0h] [rbp-48h]
__int128 v17; // [rsp+C8h] [rbp-40h] BYREF
__int64 v18; // [rsp+D8h] [rbp-30h]
__int64 v19; // [rsp+E0h] [rbp-28h]
char v20; // [rsp+150h] [rbp+48h] BYREF
result = SetupTriggerPopup::init(a1, a2, a3, 400.0, 280.0, 1);
if ( result )
{
a1->m_disableTextDelegate = 1;
a1->determineStartValues(a1);
v14 = 0;
*(_QWORD *)&v14 = sub_14003AA10(0x20u);
v15 = 18;
v16 = 31;
strcpy((char *)v14, "Time Event Trigger");
SetupTriggerPopup::addTitle(a1, &v14);
v14 = 0;
v15 = 2;
v16 = 15;
strcpy((char *)&v14, "OK");
SetupTriggerPopup::addCloseButton(a1, &v14);
v12[0] = &v14;
v14 = 0;
v15 = 0;
v16 = 15;
*(_QWORD *)&v14 = sub_14003AA10(0x80u);
v15 = 123;
v16 = 127;
strcpy(
(char *)v14,
"Activates objects using TargetID when a specific TargetTime is reached for a timer given by ItemID.");
v17 = 0;
v18 = 4;
v19 = 15;
strcpy((char *)&v17, "Help");
v5 = SetupTriggerPopup::addHelpButton(a1, &v17, &v14);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6);
cocos2d::CCDirector::getWinSize(v7);
cocos2d::CCPoint::CCPoint(*(float *)&v5, v11 * 0.5);
v12[1] = &v14;
v14 = 0;
v15 = 6;
v16 = 15;
strcpy((char *)&v14, "ItemID");
cocos2d::CCPoint::CCPoint(0.0, -85.0);
cocos2d::CCPoint::operator+(&v20, v12);
v8 = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
80,
(unsigned int)&v14,
(unsigned int)v12,
1061997773,
1,
3,
6,
1,
0,
1176255488,
0,
0,
0,
2,
v8);
v13 = &v17;
v18 = 8;
v19 = 15;
v17 = 0x4449746567726154uLL;
cocos2d::CCPoint::CCPoint(0.0, 85.0);
cocos2d::CCPoint::operator+(&v20, v12);
LOBYTE(v9) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
51,
(unsigned int)&v17,
(unsigned int)v12,
1061997773,
1,
3,
6,
1,
0,
1176255488,
0,
0,
0,
2,
v9);
v13 = &v14;
*((_QWORD *)&v14 + 1) = 25965;
v15 = 10;
v16 = 15;
*(_QWORD *)&v14 = 0x6954746567726154LL;
cocos2d::CCPoint::CCPoint(1.1446081e24, -85.0);
cocos2d::CCPoint::operator+(&v20, v12);
LOBYTE(v10) = 0;
SetupTriggerPopup::createValueControlAdvanced(
(_DWORD)a1,
473,
(unsigned int)&v14,
(unsigned int)v12,
1061997773,
0,
1,
10,
0,
0,
1120403456,
0,
0,
0,
2,
v10);
v13 = &v14;
v15 = 14;
v16 = 15;
strcpy((char *)&v14, "Multi\nActivate");
HIBYTE(v14) = 0;
cocos2d::CCPoint::CCPoint(7.4936597e31, 85.0);
cocos2d::CCPoint::operator+(&v20, v12);
SetupTriggerPopup::createToggleValueControl(
(_DWORD)a1,
475,
(unsigned int)&v14,
(unsigned int)v12,
0,
0,
0,
1065353216);
a1->updateDefaultTriggerValues(a1);
a1->m_disableTextDelegate = 0;
return 1;
}
return result;
}