//
// SetupTimeWarpPopup::init from 0x659258 to 0x65950c (692 bytes)
//
// 1 xrefs:
// > SetupTimeWarpPopup::create @ 0x659750
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:55:31 +0000
//
int __fastcall SetupTimeWarpPopup::init(Slider **this, EffectGameObject *a2, cocos2d::CCArray *a3)
{
int v4; // r9
cocos2d::CCDirector *v5; // r0
const char *v6; // r2
int v7; // r7
void (__fastcall *v8)(int, _DWORD *); // r11
ButtonSprite *v9; // r0
int v10; // r0
int v11; // r10
const cocos2d::CCPoint *v12; // r11
void (__fastcall *v13)(int, _DWORD *); // r8
const char *v14; // r2
Slider *v15; // r0
Slider *v16; // r3
int v17; // r8
void (__fastcall *v18)(int, _DWORD *); // r10
int v19; // r0
Slider *v20; // r3
int v21; // r5
void (__fastcall *v22)(int, _BYTE *); // r10
int v23; // r11
const char *v24; // r1
float v26; // [sp+10h] [bp-4Ch]
float v27; // [sp+14h] [bp-48h] BYREF
float v28; // [sp+18h] [bp-44h]
_BYTE v29[8]; // [sp+1Ch] [bp-40h] BYREF
_BYTE v30[8]; // [sp+24h] [bp-38h] BYREF
int v31; // [sp+2Ch] [bp-30h]
int v32; // [sp+30h] [bp-2Ch]
_DWORD v33[2]; // [sp+34h] [bp-28h] BYREF
int v34[3]; // [sp+3Ch] [bp-20h] BYREF
int v35[3]; // [sp+48h] [bp-14h] BYREF
v4 = SetupTriggerPopup::init((SetupTriggerPopup *)this, a2, a3, 340.0, 200.0, 1, 0.0);
if ( v4 )
{
v5 = (cocos2d::CCDirector *)(*((int (__fastcall **)(Slider **))*this + 170))(this);
cocos2d::CCDirector::sharedDirector(v5);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v27);
v7 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Setup TimeWarp Effect", "goldFont.fnt", v6);
(*((void (__fastcall **)(Slider **, int))*this + 57))(this, v7);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 80))(v7, 1060320051);
v8 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v33,
v27 * 0.5,
(float)((float)(*((float *)this + 140) * 0.5) + (float)(v28 * 0.5)) - 18.0);
v8(v7, v33);
v9 = ButtonSprite::create(
(ButtonSprite *)"OK",
(const char *)&word_28,
0,
0.8,
1,
"goldFont.fnt",
"GJ_button_01.png",
(const char *)0x41F00000,
v26);
v31 = 684;
v32 = 1;
v10 = CCMenuItemSpriteExtra::create((int)v9, 0, (int)this, 684, 1);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v10);
memset(v34, 0, sizeof(v34));
std::string::__init(v34, "Help", 4u);
memset(v35, 0, sizeof(v35));
std::string::__init(
v35,
"Lets you warp all time a given amount.\nI need to add more options\nbefore you can do Za Warudo...",
0x68u);
v11 = InfoAlertButton::create((char *)v34, (int)v35, 1065353216);
std::string::~string((int)v35);
std::string::~string((int)v34);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v11);
v12 = *(this + 111);
v13 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v11 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v30,
(float)((float)(v27 * 0.5) - (float)(*((float *)this + 139) * 0.5)) + 18.0,
(float)((float)(*((float *)this + 140) * 0.5) + (float)(v28 * 0.5)) - 18.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v33, v12);
v13(v11, v33);
v15 = (Slider *)cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "goldFont.fnt", v14);
v16 = *this;
*(this + 178) = v15;
(*((void (__fastcall **)(Slider **, Slider *))v16 + 57))(this, v15);
v17 = (int)*(this + 178);
v18 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v17 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, v27 * 0.5, (float)(v28 * 0.5) + 20.0);
v18(v17, v33);
(*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 178) + 80))(*(this + 178), 1061997773);
v33[0] = SetupTimeWarpPopup::sliderChanged;
v33[1] = 0;
v19 = Slider::create((int)this);
v20 = *this;
*(this + 179) = (Slider *)v19;
(*((void (__fastcall **)(Slider **, int))v20 + 57))(this, v19);
v21 = (int)*(this + 179);
v22 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v21 + 92);
v23 = (*(int (__fastcall **)(_DWORD))(*(_DWORD *)*(this + 178) + 96))(*(this + 178));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v29, 0.0, -23.0);
cocos2d::CCPoint::operator+(v30, v23, v29);
v22(v21, v30);
SetupTimeWarpPopup::updateTimeWarpLabel((SetupTimeWarpPopup *)this, v24);
Slider::setValue(*(this + 179), (float)(*((float *)this + 180) - 0.1) / 1.9);
SetupTriggerPopup::createMultiTriggerItemsDefaultVertical((SetupTriggerPopup *)this);
}
return v4;
}