//
// SetupSpawnPopup::init from 0x5eb130 to 0x5eb88a (1882 bytes)
//
// 1 xrefs:
// > SetupSpawnPopup::create @ 0x5eba98
//
// 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:54:23 +0000
//
int __fastcall SetupSpawnPopup::init(cocos2d::CCPoint **this, EffectGameObject *a2, cocos2d::CCArray *a3)
{
cocos2d::CCDirector *v4; // r0
cocos2d::CCArray *v5; // r0
cocos2d::CCObject *v6; // r0
const char *v7; // r1
ButtonSprite *v8; // r0
ButtonSprite *v9; // r0
cocos2d::CCObject *v10; // r11
const char *v11; // r1
ButtonSprite *v12; // r0
ButtonSprite *v13; // r0
cocos2d::CCObject *v14; // r11
GameManager *v15; // r0
ButtonSprite *v16; // r8
cocos2d::CCObject *v17; // r11
const cocos2d::CCPoint *v18; // r8
void (__fastcall *v19)(cocos2d::CCObject *, _BYTE *); // r5
cocos2d::CCObject *v20; // r5
void (__fastcall *v21)(cocos2d::CCObject *, _BYTE *); // r7
float v23; // [sp+10h] [bp-9Ch]
float v24; // [sp+14h] [bp-98h]
float v25; // [sp+14h] [bp-98h]
int v26; // [sp+30h] [bp-7Ch]
void (__fastcall *v27)(cocos2d::CCObject *, _BYTE *); // [sp+34h] [bp-78h]
void (__fastcall *v28)(cocos2d::CCObject *, _BYTE *); // [sp+34h] [bp-78h]
cocos2d::CCPoint *v29; // [sp+3Ch] [bp-70h]
cocos2d::CCPoint *v30; // [sp+3Ch] [bp-70h]
float v31; // [sp+44h] [bp-68h] BYREF
float v32; // [sp+48h] [bp-64h]
_BYTE v33[8]; // [sp+4Ch] [bp-60h] BYREF
_BYTE v34[8]; // [sp+54h] [bp-58h] BYREF
_BYTE v35[8]; // [sp+5Ch] [bp-50h] BYREF
unsigned __int8 *(__fastcall *v36)(unsigned __int8 *, cocos2d::CCObject *); // [sp+64h] [bp-48h]
int v37; // [sp+68h] [bp-44h]
_DWORD v38[2]; // [sp+6Ch] [bp-40h] BYREF
_DWORD v39[2]; // [sp+74h] [bp-38h] BYREF
int v40[3]; // [sp+7Ch] [bp-30h] BYREF
int v41; // [sp+88h] [bp-24h] BYREF
int v42; // [sp+8Ch] [bp-20h]
int v43; // [sp+90h] [bp-1Ch]
_BYTE v44[16]; // [sp+94h] [bp-18h] BYREF
v26 = SetupTriggerPopup::init((SetupTriggerPopup *)this, a2, a3, 380.0, 280.0, 1, 0.0);
if ( v26 )
{
SetupTriggerPopup::preSetup((SetupTriggerPopup *)this);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(&v41, "Spawn Group", 0xBu);
SetupTriggerPopup::addTitle(this, &v41);
std::string::~string((int)&v41);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(&v41, "OK", 2u);
SetupTriggerPopup::addCloseButton(this, &v41);
std::string::~string((int)&v41);
memset(v40, 0, sizeof(v40));
std::string::__init(v40, "Help", 4u);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(
&v41,
"Activates other triggers simultaneously regardless of X position. These triggers need to use Group ID and "
"have Spawn Trigger enabled.\n"
"Preview Disable disables activation while not playtesting in editor.\n"
"Spawn Ordered spawns the triggers in order from left to right.\n"
"Use remapping (page 2) to copy a Spawn setup to another group.",
0x168u);
SetupTriggerPopup::addHelpButton(this, v40, &v41, 1065353216);
std::string::~string((int)&v41);
v4 = (cocos2d::CCDirector *)std::string::~string((int)v40);
cocos2d::CCDirector::sharedDirector(v4);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v31);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v33, v31 * 0.5, v32 * 0.5);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(&v41, "Group ID", 8u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, -50.0, 50.0);
cocos2d::CCPoint::operator+(v44, v33, v39);
IDNameInput::create((int)this, (int)(this + 110), 1, 51, (int)&v41, (int)v44, 0.9, 6, 0, 0, 0);
std::string::~string((int)&v41);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(&v41, "Delay:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, -85.0, -35.0);
cocos2d::CCPoint::operator+(v44, v33, v39);
SetupTriggerPopup::createValueControlAdvanced(
this,
63,
&v41,
v44,
1060320051,
0,
1,
10,
0,
0,
1065353216,
0,
0,
1,
5,
0);
std::string::~string((int)&v41);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(&v41, "+-", 2u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, 80.0, -35.0);
cocos2d::CCPoint::operator+(v44, v33, v39);
SetupTriggerPopup::createValueControlAdvanced(
this,
556,
&v41,
v44,
1060320051,
0,
1,
10,
0,
0,
1065353216,
0,
0,
1,
5,
0);
std::string::~string((int)&v41);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(&v41, "Preview\nDisable", 0xFu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, 50.0, 85.0);
cocos2d::CCPoint::operator+(v44, v33, v39);
SetupTriggerPopup::createToggleValueControl((int)this, 102, (int)&v41, (int)v44, 0, 0, 0, 1.0);
std::string::~string((int)&v41);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(&v41, "Spawn\nOrdered", 0xDu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, 50.0, 50.0);
cocos2d::CCPoint::operator+(v44, v33, v39);
SetupTriggerPopup::createToggleValueControl((int)this, 441, (int)&v41, (int)v44, 0, 0, 0, 1.0);
std::string::~string((int)&v41);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(&v41, "Reset\nRemap", 0xBu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, 50.0, 15.0);
cocos2d::CCPoint::operator+(v44, v33, v39);
SetupTriggerPopup::createToggleValueControl((int)this, 581, (int)&v41, (int)v44, 0, 0, 0, 1.0);
std::string::~string((int)&v41);
v5 = (cocos2d::CCArray *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v34, v31 * 0.5, v32 * 0.5);
v6 = (cocos2d::CCObject *)cocos2d::CCArray::create(v5);
*(this + 179) = v6;
cocos2d::CCObject::retain(v6);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(&v41, "OriginalID:", 0xBu);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, -100.0, 65.0);
cocos2d::CCPoint::operator+(v44, v34, v39);
IDNameInput::create((int)this, (int)(this + 110), 1, -1, (int)&v41, (int)v44, 0.7, 6, 0, 1, 0);
std::string::~string((int)&v41);
v41 = 0;
v42 = 0;
v43 = 0;
std::string::__init(&v41, "NewID:", 6u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v39, 20.0, 65.0);
cocos2d::CCPoint::operator+(v44, v34, v39);
IDNameInput::create((int)this, (int)(this + 110), 1, -2, (int)&v41, (int)v44, 0.7, 6, 0, 1, 0);
std::string::~string((int)&v41);
v8 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_addCBtn_001.png", v7);
v9 = ButtonSprite::create(
v8,
(cocos2d::CCSprite *)&dword_20,
0,
32.0,
1.0,
1,
"GJ_button_01.png",
(_BYTE *)&dword_0 + 1,
0.0,
v24);
v36 = SetupSpawnPopup::onAddRemap;
v37 = 0;
v10 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create((int)v9, 0, (int)this, (int)SetupSpawnPopup::onAddRemap, 0);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v10 + 80))(v10, 1058642330);
*((_DWORD *)v10 + 79) = 1058642330;
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v10);
v27 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v10 + 92);
v29 = *(this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, 120.0, 65.0);
cocos2d::CCPoint::operator+(v39, v34, v38);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v44, v29);
v27(v10, v44);
SetupTriggerPopup::addObjectToPage((SetupTriggerPopup *)this, v10, 1);
v12 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_delCBtn_001.png", v11);
v13 = ButtonSprite::create(
v12,
(cocos2d::CCSprite *)&dword_20,
0,
32.0,
1.0,
1,
"GJ_button_06.png",
(_BYTE *)&dword_0 + 1,
0.0,
v25);
v38[0] = SetupSpawnPopup::onDeleteRemap;
v38[1] = 0;
v14 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
(int)v13,
0,
(int)this,
(int)SetupSpawnPopup::onDeleteRemap,
0);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v14 + 80))(v14, 1058642330);
*((_DWORD *)v14 + 79) = 1058642330;
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v14);
v28 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v14 + 92);
v30 = *(this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, 150.0, 65.0);
cocos2d::CCPoint::operator+(v39, v34, v35);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v44, v30);
v28(v14, v44);
v15 = (GameManager *)SetupTriggerPopup::addObjectToPage((SetupTriggerPopup *)this, v14, 1);
if ( *(_DWORD *)(*(_DWORD *)(GameManager::sharedState(v15) + 408) + 12268) )
{
v16 = ButtonSprite::create(
(ButtonSprite *)"Paste",
(const char *)&dword_1C + 2,
0,
0.5,
1,
"goldFont.fnt",
"GJ_button_04.png",
(const char *)0x41F00000,
v23);
(*(void (__fastcall **)(ButtonSprite *, int))(*(_DWORD *)v16 + 80))(v16, 1061997773);
v39[0] = SetupSpawnPopup::onPasteRemap;
v39[1] = 0;
v17 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(
(int)v16,
0,
(int)this,
(int)SetupSpawnPopup::onPasteRemap,
0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v17);
v18 = *(this + 111);
v19 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v17 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v35,
(float)((float)(*((float *)this + 139) * 0.5) + (float)(v31 * 0.5)) - 25.0,
(float)((float)(*((float *)this + 140) * 0.5) + (float)(v32 * 0.5)) - 20.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v44, v18);
v19(v17, v44);
SetupTriggerPopup::addObjectToPage((SetupTriggerPopup *)this, v17, 1);
}
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v44, 0.0, 0.0, 80.0, 80.0);
v20 = (cocos2d::CCObject *)cocos2d::extension::CCScale9Sprite::create("square02_001.png", v44);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v20 + 456))(v20, 50);
v21 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v20 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v44, 360.0, 90.0);
v21(v20, v44);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v20, -1);
(*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v20 + 92))(v20, v34);
SetupTriggerPopup::addObjectToPage((SetupTriggerPopup *)this, v20, 1);
SetupSpawnPopup::updateRemapButtons((SetupSpawnPopup *)this, 0.0);
SetupTriggerPopup::createMultiTriggerItemsDefault((SetupTriggerPopup *)this);
SetupTriggerPopup::createPageButtons((SetupTriggerPopup *)this, (float)(*((float *)this + 139) * 0.5) + 15.0, 1);
SetupTriggerPopup::goToPage((SetupTriggerPopup *)this, 0, 0);
SetupTriggerPopup::postSetup((SetupTriggerPopup *)this);
}
return v26;
}