//
// SetupTimeWarpPopup::init from 0x140463460 to 0x1404638d0 (1136 bytes)
//
// 2 xrefs:
// > SetupTimeWarpPopup::create @ 0x140463418
// > ??> @ 0x1406daf04
//
// 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 SetupTimeWarpPopup::init(SetupTimeWarpPopup *a1, EffectGameObject *a2, cocos2d::CCArray *a3)
{
bool result; // al
__int64 v5; // rcx
cocos2d::CCDirector *v6; // rax
struct cocos2d::CCLabelBMFont *v7; // rdi
cocos2d::CCLabelBMFont_vtbl *v8; // rbx
const cocos2d::CCPoint *v9; // rax
ButtonSprite *v10; // rbx
CCMenuItemSpriteExtra *v11; // rax
char *v12; // rdi
__int64 v13; // rbx
struct cocos2d::CCPoint v14; // rax
cocos2d::CCLabelBMFont *v15; // rax
float v16; // xmm0_4
cocos2d::CCLabelBMFont_vtbl *v17; // rbx
const cocos2d::CCPoint *v18; // rax
const char *v19; // r8
Slider *v20; // rax
float v21; // xmm0_4
const cocos2d::CCPoint *v22; // rax
ButtonSprite *v23; // [rsp+58h] [rbp-39h] BYREF
struct cocos2d::CCPoint v24; // [rsp+60h] [rbp-31h] BYREF
__int128 v25; // [rsp+68h] [rbp-29h] BYREF
__int64 v26; // [rsp+78h] [rbp-19h]
__int64 v27; // [rsp+80h] [rbp-11h]
__int128 v28; // [rsp+88h] [rbp-9h] BYREF
__int64 v29; // [rsp+98h] [rbp+7h]
__int64 v30; // [rsp+A0h] [rbp+Fh]
float v31; // [rsp+110h] [rbp+7Fh]
float v32; // [rsp+114h] [rbp+83h]
result = SetupTriggerPopup::init(a1, a2, a3, 340.0, 200.0, 1);
if ( result )
{
a1->determineStartValues(a1);
v6 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v5);
cocos2d::CCDirector::getWinSize(v6);
v7 = cocos2d::CCLabelBMFont::create("Setup TimeWarp Effect", "goldFont.fnt");
a1->addChild_1(a1, v7);
((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v7->setScale_0)(v7);
v8 = v7->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
cocos2d::CCPoint::CCPoint(v32 * 0.5, v31 * 0.5);
v8->setPosition_0(v7, v9);
v23 = (ButtonSprite *)operator new(0x2C0u);
v10 = ButtonSprite::ButtonSprite(v23);
if ( v10 )
{
if ( ButtonSprite::init_1(v10, "OK", 40, 0, 0.80000001, 1, "goldFont.fnt", "GJ_button_01.png", 30.0) )
{
cocos2d::CCObject::autorelease(v10);
}
else
{
((void (__fastcall *)(ButtonSprite *, __int64))v10->~ButtonSprite)(v10, 1);
v10 = nullptr;
}
}
v11 = CCMenuItemSpriteExtra::create(v10, nullptr, a1, (cocos2d::SEL_MenuHandler *)sub_14009BEF0);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, v11);
v23 = (ButtonSprite *)&v25;
v25 = 0;
v26 = 0;
v27 = 15;
*(_QWORD *)&v25 = sub_14003AA10(0x70u);
v26 = 104;
v27 = 111;
strcpy(
(char *)v25,
"Lets you warp all time a given amount.\nI need to add more options\nbefore you can do Za Warudo...");
v28 = 0;
v29 = 4;
v30 = 15;
strcpy((char *)&v28, "Help");
v12 = InfoAlertButton::create((__int64)&v28, (__int64)&v25);
a1->m_buttonMenu->addChild_1(a1->m_buttonMenu, (cocos2d::CCNode *)v12);
v13 = *(_QWORD *)v12;
cocos2d::CCPoint::CCPoint(a1->m_width * 0.5, (float)((float)(v31 * 0.5) - (float)(a1->m_width * 0.5)) + 18.0);
v14 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, &v24);
(*(void (__fastcall **)(char *, struct cocos2d::CCPoint))(v13 + 184))(v12, v14);
v15 = cocos2d::CCLabelBMFont::create(" ", "goldFont.fnt");
a1->m_timeWarpLabel = v15;
v16 = ((float (__fastcall *)(SetupTimeWarpPopup *, cocos2d::CCLabelBMFont *))a1->addChild_1)(a1, v15);
v17 = a1->m_timeWarpLabel->__vftable;
cocos2d::CCPoint::CCPoint(v16, v31 * 0.5);
v17->setPosition_0(a1->m_timeWarpLabel, v18);
((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_timeWarpLabel->setScale_0)(a1->m_timeWarpLabel);
v20 = Slider::create(
a1,
(cocos2d::SEL_MenuHandler *)SetupTimeWarpPopup::sliderChanged,
v19,
"slidergroove.png",
"sliderthumb.png",
"sliderthumbsel.png",
1.0);
a1->m_timeWarpSlider = v20;
v21 = ((float (__fastcall *)(SetupTimeWarpPopup *, Slider *))a1->addChild_1)(a1, v20);
cocos2d::CCPoint::CCPoint(v21, 0.0);
v22 = a1->m_timeWarpLabel->getPosition_0(a1->m_timeWarpLabel);
cocos2d::CCPoint::operator+(v22, &v23);
a1->m_timeWarpSlider->setPosition_0(a1->m_timeWarpSlider, (const cocos2d::CCPoint *)&v23);
SetupTimeWarpPopup::updateTimeWarpLabel(a1);
Slider::setValue(a1->m_timeWarpSlider, (float)(a1->m_timeWarpMod - 0.1) / 1.9);
SetupTriggerPopup::createMultiTriggerItemsDefaultVertical(a1);
return 1;
}
return result;
}