//
// SetLevelOrderPopup::init from 0x6d592c to 0x6d5b3a (526 bytes)
//
// 1 xrefs:
// > SetLevelOrderPopup::create @ 0x6d5c00
//
// 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:57:06 +0000
//
int __fastcall SetLevelOrderPopup::init(SetLevelOrderPopup *this, int a2, int a3, int a4)
{
int v8; // r11
cocos2d::CCDirector *v9; // r0
const char *v10; // r1
int v11; // r7
_DWORD *v12; // r7
const char *v13; // r1
int v14; // r7
int v15; // r5
void (__fastcall *v16)(int, _BYTE *); // r6
void (__fastcall *v18)(_DWORD *, _DWORD *); // [sp+2Ch] [bp-4Ch]
float v19[2]; // [sp+34h] [bp-44h] BYREF
_BYTE v20[8]; // [sp+3Ch] [bp-3Ch] BYREF
_BYTE v21[8]; // [sp+44h] [bp-34h] BYREF
_BYTE v22[8]; // [sp+4Ch] [bp-2Ch] BYREF
_BYTE v23[8]; // [sp+54h] [bp-24h] BYREF
int (__fastcall *v24)(SetLevelOrderPopup *, cocos2d::CCObject *); // [sp+5Ch] [bp-1Ch]
int v25; // [sp+60h] [bp-18h]
_DWORD v26[2]; // [sp+64h] [bp-14h] BYREF
int v27[3]; // [sp+6Ch] [bp-Ch] BYREF
int v28[3]; // [sp+78h] [bp+0h] BYREF
memset(v27, 0, sizeof(v27));
std::string::__init(v27, "Level Order", 0xBu);
memset(v28, 0, sizeof(v28));
std::string::__init(v28, "OK", 2u);
v8 = SetIDPopup::init((int *)this, a3, 1, a4, (unsigned __int8 *)v27, (int)v28, 0, 0, 0.0, 1, 1);
std::string::~string((int)v28);
v9 = (cocos2d::CCDirector *)std::string::~string((int)v27);
if ( v8 )
{
*((_DWORD *)this + 137) = a2;
cocos2d::CCDirector::sharedDirector(v9);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v19);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, v19[0] * 0.5, (float)(v19[1] * 0.5) + 5.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v21, *((const cocos2d::CCPoint **)this + 111));
v11 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_leftBtn2_001.png", v10);
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v11 + 480))(v11, &unk_BEFF5E);
(*(void (__fastcall **)(int, int))((char *)&dword_50 + *(_DWORD *)v11))(v11, 1066192077);
(*(void (__fastcall **)(int, int))((char *)&dword_B4 + *(_DWORD *)v11))(v11, 1119092736);
v24 = SetLevelOrderPopup::onOrderButton;
v25 = 0;
v12 = (_DWORD *)CCMenuItemSpriteExtra::create(v11, 0, (int)this, (int)SetLevelOrderPopup::onOrderButton, 0);
(*(void (__fastcall **)(_DWORD, _DWORD *))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v12);
(*(void (__fastcall **)(_DWORD *, _DWORD))((char *)&dword_24 + *v12))(v12, 0);
v18 = *(void (__fastcall **)(_DWORD *, _DWORD *))((char *)off_5C + *v12);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v23, -85.0, 0.0);
cocos2d::CCPoint::operator+(v26, v21, v23);
v18(v12, v26);
CCMenuItemSpriteExtra::setSizeMult((int)v12, 1.4);
v14 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"edit_rightBtn2_001.png", v13);
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v14 + 480))(v14, &unk_BEFF61);
(*(void (__fastcall **)(int, int))((char *)&dword_50 + *(_DWORD *)v14))(v14, 1066192077);
(*(void (__fastcall **)(int, int))((char *)&dword_B4 + *(_DWORD *)v14))(v14, 1119092736);
v26[0] = SetLevelOrderPopup::onOrderButton;
v26[1] = 0;
v15 = CCMenuItemSpriteExtra::create(v14, 0, (int)this, (int)SetLevelOrderPopup::onOrderButton, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v15);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v15 + 36))(v15, 1);
v16 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v15 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v22, 85.0, 0.0);
cocos2d::CCPoint::operator+(v23, v21, v22);
v16(v15, v23);
CCMenuItemSpriteExtra::setSizeMult(v15, 1.4);
}
return v8;
}