//
// SetupTimerTriggerPopup::init from 0x593bd4 to 0x59405e (1162 bytes)
//
// 1 xrefs:
// > SetupTimerTriggerPopup::create @ 0x5940e2
//
// 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 SetupTimerTriggerPopup::init(SetupTimerTriggerPopup *a1, TimerTriggerGameObject *a2, cocos2d::CCArray *a3)
{
_BOOL4 v4; // r11
cocos2d::CCDirector *v5; // r0
_BYTE v7[4]; // [sp+38h] [bp-2Ch] BYREF
cocos2d::CCSize v8; // [sp+3Ch] [bp-28h] BYREF
cocos2d::CCPoint v9; // [sp+44h] [bp-20h] BYREF
cocos2d::CCPoint v10; // [sp+4Ch] [bp-18h] BYREF
cocos2d::CCPoint v11; // [sp+54h] [bp-10h] BYREF
v4 = SetupTriggerPopup::init(a1, a2, a3, 400.0, 280.0, 1);
if ( v4 )
{
SetupTriggerPopup::preSetup(a1);
sub_776584((int)&v11, "Time Trigger");
SetupTriggerPopup::addTitle((int)a1);
sub_774008(&v11);
sub_776584((int)&v11, "OK");
SetupTriggerPopup::addCloseButton((unsigned int)a1, (ButtonSprite **)&v11);
sub_774008(&v11);
sub_776584((int)&v10, "Help");
sub_776584(
(int)&v11,
"These function as an in-game timer using ItemID.\n"
"TargetID is spawned when StopTime is hit.\n"
"TimeMod modifies the timer with multiplication (Can be negative).\n"
"StartPaused pauses at starting time until activated by another Time trigger.");
SetupTriggerPopup::addHelpButton((int)a1, (int)&v10, (int)&v11, 1065353216);
sub_774008(&v11);
sub_774008(&v10);
SetupTriggerPopup::createMultiTriggerItemsDefault(a1);
v5 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v8, v5);
cocos2d::CCPoint::CCPoint(&v9, v8.width * 0.5, (float)(v8.height * 0.5) + 85.0);
sub_776584((int)v7, "StartTime");
cocos2d::CCPoint::CCPoint(&v10, -85.0, 0.0);
cocos2d::CCPoint::operator+(&v11, &v9, &v10);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
467,
(int)v7,
&v11,
(cocos2d::CCZone *)0x3F4CCCCD,
0,
Float,
10,
0,
nullptr,
100.0,
0,
0,
0,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "StopTime");
cocos2d::CCPoint::CCPoint(&v10, 85.0, 0.0);
cocos2d::CCPoint::operator+(&v11, &v9, &v10);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
473,
(int)v7,
&v11,
(cocos2d::CCZone *)0x3F4CCCCD,
0,
Float,
10,
0,
nullptr,
100.0,
0,
0,
0,
2,
0);
sub_774008(v7);
sub_776584((int)v7, (char *)&unk_939830);
cocos2d::CCPoint::CCPoint(&v10, 175.0, 0.0);
cocos2d::CCPoint::operator+(&v11, &v9, &v10);
SetupTriggerPopup::createToggleValueControl(a1, 474, (int)v7, &v11, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "ItemID");
cocos2d::CCPoint::CCPoint(&v10, -85.0, -75.0);
cocos2d::CCPoint::operator+(&v11, &v9, &v10);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
80,
(int)v7,
&v11,
(cocos2d::CCZone *)0x3F4CCCCD,
1,
Uint,
6,
1,
nullptr,
9999.0,
0,
0,
0,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "TimeMod");
cocos2d::CCPoint::CCPoint(&v10, 85.0, -60.0);
cocos2d::CCPoint::operator+(&v11, &v9, &v10);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
470,
(int)v7,
&v11,
(cocos2d::CCZone *)0x3F4CCCCD,
0,
Float,
10,
0,
(cocos2d::CCFloat *)0x3C23D70A,
2.0,
0,
0,
0,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "TargetID");
cocos2d::CCPoint::CCPoint(&v10, -85.0, -135.0);
cocos2d::CCPoint::operator+(&v11, &v9, &v10);
SetupTriggerPopup::createValueControlAdvanced(
(unsigned int)a1,
51,
(int)v7,
&v11,
(cocos2d::CCZone *)0x3F4CCCCD,
1,
Uint,
6,
1,
nullptr,
9999.0,
0,
0,
0,
2,
0);
sub_774008(v7);
sub_776584((int)v7, "Ignore\nTimeWarp");
cocos2d::CCPoint::CCPoint(&v10, 10.0, -128.0);
cocos2d::CCPoint::operator+(&v11, &v9, &v10);
SetupTriggerPopup::createToggleValueControl(a1, 469, (int)v7, &v11, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Start\nPaused");
cocos2d::CCPoint::CCPoint(&v10, 120.0, -128.0);
cocos2d::CCPoint::operator+(&v11, &v9, &v10);
SetupTriggerPopup::createToggleValueControl(a1, 471, (int)v7, &v11, 0, 0, 0, 1.0);
sub_774008(v7);
sub_776584((int)v7, "Dont\nOverride");
cocos2d::CCPoint::CCPoint(&v10, 120.0, -163.0);
cocos2d::CCPoint::operator+(&v11, &v9, &v10);
SetupTriggerPopup::createToggleValueControl(a1, 468, (int)v7, &v11, 0, 0, 0, 1.0);
sub_774008(v7);
SetupTriggerPopup::postSetup(a1);
}
return v4;
}