//
// InfoLayer::setupLevelInfo from 0x1007b0410 to 0x1007b060b (507 bytes)
//
// 1 xrefs:
// > InfoLayer::init @ 0x1007af01b
//
// 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
//
void __fastcall InfoLayer::setupLevelInfo(InfoLayer *a1)
{
GJLevelList *m_levelList; // rax
int m_listID; // r12d
int *p_m_listVersion; // rax
GJGameLevel *m_level; // rcx
char *v5; // rax
const char *CString; // rax
cocos2d::CCLabelBMFont *v7; // r15
cocos2d::CCMenu *v8; // r14
char *v9; // rax
const char *v10; // rdi
cocos2d::CCLabelBMFont *v11; // r13
CCMenuItemSpriteExtra *v12; // rax
double v13; // [rsp+0h] [rbp-50h] BYREF
unsigned __int64 v14; // [rsp+8h] [rbp-48h] BYREF
InfoLayer *v15; // [rsp+10h] [rbp-40h]
float v16[2]; // [rsp+18h] [rbp-38h] BYREF
unsigned __int64 v17[6]; // [rsp+20h] [rbp-30h] BYREF
double v18; // 0:xmm0_8.8
cocos2d::CCDirector::sharedDirector();
*(cocos2d::CCSize *)&v18 = cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v16);
m_levelList = a1->m_levelList;
if ( m_levelList )
{
m_listID = m_levelList->m_listID;
p_m_listVersion = &m_levelList->m_listVersion;
}
else
{
m_level = a1->m_level;
p_m_listVersion = &m_level->m_levelVersion;
m_listID = m_level->m_levelID.random - m_level->m_levelID.seed;
}
v5 = sub_1007AB580("Version: %i", *p_m_listVersion);
CString = cocos2d::CCString::getCString((cocos2d::CCString *)v5);
v7 = cocos2d::CCLabelBMFont::create_3(CString, "goldFont.fnt");
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64, double))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v7,
2,
v18);
v8 = cocos2d::CCMenu::create();
((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCMenu *, __int64))a1->m_mainLayer->addChild_0)(
a1->m_mainLayer,
v8,
2);
v15 = a1;
if ( m_listID )
{
v9 = sub_1007AB580("ID: %i", m_listID);
v10 = cocos2d::CCString::getCString((cocos2d::CCString *)v9);
}
else
{
v10 = "ID: na";
}
v11 = cocos2d::CCLabelBMFont::create_3(v10, "goldFont.fnt");
sub_10028CBE0((float *)v17, v16[0] * 0.5, (float)((float)(0.5 * v16[1]) + -145.0) + 14.0);
sub_10028CBE0((float *)&v14, -50.0, 0.0);
sub_10028CCE0(&v13, v17, &v14);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, double *))v7->setPosition)(v7, &v13);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v7->setScale)(v7, 0.60000002);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v11->setScale)(v11, 0.60000002);
v12 = CCMenuItemSpriteExtra::create(
v11,
nullptr,
v15,
(cocos2d::SEL_MenuHandler)(unsigned __int64)InfoLayer::onCopyLevelID);
((void (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))v8->addChild)(v8, v12);
sub_10028CBE0((float *)&v14, 50.0, 0.0);
sub_10028CCE0(&v13, v17, &v14);
((void (__fastcall *)(cocos2d::CCMenu *, double *))v8->setPosition)(v8, &v13);
}