//
// InfoLayer::setupLevelInfo from 0x42f8a8 to 0x42fa0c (356 bytes)
//
// 1 xrefs:
// > InfoLayer::init @ 0x430910
//
// 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 InfoLayer::setupLevelInfo(InfoLayer *a1)
{
cocos2d::CCDirector *v2; // r0
GJLevelList *m_levelList; // r3
const char *m_listID; // r4
cocos2d::CCString *v5; // r0
GJGameLevel *m_level; // r5
cocos2d::CCLabelBMFont *v7; // r5
cocos2d::CCMenu *v8; // r9
cocos2d::CCString *v9; // r0
cocos2d::CCLabelBMFont *v10; // r10
CCMenuItemSpriteExtra *v11; // r0
void (__fastcall *v12)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8
void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+Ch] [bp-38h]
cocos2d::CCSize v14; // [sp+14h] [bp-30h] BYREF
cocos2d::CCPoint v15; // [sp+1Ch] [bp-28h] BYREF
cocos2d::CCPoint v16; // [sp+24h] [bp-20h] BYREF
cocos2d::CCPoint v17; // [sp+2Ch] [bp-18h] BYREF
_DWORD v18[2]; // [sp+34h] [bp-10h] BYREF
v2 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(&v14, v2);
m_levelList = a1->m_levelList;
if ( m_levelList )
{
m_listID = (const char *)m_levelList->m_listID;
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Version: %i",
(const char *)m_levelList->m_listVersion);
}
else
{
m_level = a1->m_level;
m_listID = (const char *)(m_level->m_levelID.random - m_level->m_levelID.seed);
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Version: %i",
(const char *)m_level->m_levelVersion);
}
cocos2d::CCString::getCString(v5);
v7 = cocos2d::CCLabelBMFont::create();
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v7, 2);
v8 = cocos2d::CCMenu::create();
a1->m_mainLayer->addChild_0(a1->m_mainLayer, v8, 2);
if ( m_listID )
{
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"ID: %i", m_listID);
cocos2d::CCString::getCString(v9);
}
v10 = cocos2d::CCLabelBMFont::create();
cocos2d::CCPoint::CCPoint(&v15, v14.width * 0.5, (float)((float)(v14.height * 0.5) - 145.0) + 14.0);
setPosition = v7->setPosition;
cocos2d::CCPoint::CCPoint(&v17, -50.0, 0.0);
cocos2d::CCPoint::operator+(v18, &v15, &v17);
setPosition(v7, (const cocos2d::CCPoint *)v18);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v7->setScale)(v7, 1058642330);
((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v10->setScale)(v10, 1058642330);
v18[0] = InfoLayer::onCopyLevelID;
v18[1] = 0;
v11 = CCMenuItemSpriteExtra::create(
v10,
nullptr,
(cocos2d::SEL_MenuHandler)__PAIR64__(InfoLayer::onCopyLevelID, (unsigned int)a1));
v8->addChild(v8, v11);
v12 = v8->setPosition;
cocos2d::CCPoint::CCPoint(&v16, 50.0, 0.0);
cocos2d::CCPoint::operator+(&v17, &v15, &v16);
v12(v8, &v17);
}