//
// LevelPage::onInfo from 0x40b9f4 to 0x40bb6e (378 bytes)
//
// 1 xrefs:
// > LevelSelectLayer::onInfo @ 0x40bbb4
//
// 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 LevelPage::onInfo(LevelPage *a1, cocos2d::CCObject *a2)
{
GJGameLevel *m_level; // r1
int v4; // r3
FLAlertLayer *v5; // r7
FLAlertLayer *v6; // r7
GJGameLevel *v7; // r0
const char *v8; // r11
int v9; // r9
int v10; // r8
int NormalPercent; // r0
cocos2d::CCString *v12; // r0
char *CString; // r0
char *v14; // [sp+Ch] [bp-10h] BYREF
const char *v15; // [sp+10h] [bp-Ch] BYREF
m_level = a1->m_level;
if ( m_level )
{
v4 = m_level->m_levelID.random - m_level->m_levelID.seed;
if ( v4 == -1 )
{
sub_776584((int)&v14, "Roses are red\nViolets are blue\nWelcome to\n2.2");
sub_776584((int)&v15, v14);
v5 = FLAlertLayer::create(0, (int)"It's a secret...", (int)&v15, (int)"OK", 0, 360.0);
sub_774008(&v15);
v5->show(v5);
}
else
{
if ( v4 == -2 )
{
sub_776584(
(int)&v14,
"The path leads to an old tower. It's been left alone for years, with little reason to explore.");
sub_776584((int)&v15, v14);
v6 = FLAlertLayer::create(0, (int)"The Tower", (int)&v15, (int)"OK", 0, 360.0);
}
else
{
sub_775C20(&v15);
v7 = a1->m_level;
v8 = v15;
v9 = v7->m_attempts.random - v7->m_attempts.seed;
v10 = v7->m_jumps.random - v7->m_jumps.seed;
NormalPercent = GJGameLevel::getNormalPercent(v7);
v12 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s\n"
"Total Attempts: %i\n"
"Total Jumps: %i\n"
"Normal: %i%%\n"
"Practice: %i%%",
v8,
v9,
v10,
NormalPercent,
a1->m_level->m_practicePercent);
CString = (char *)cocos2d::CCString::getCString(v12);
sub_776584((int)&v14, CString);
sub_774008(&v15);
sub_776584((int)&v15, v14);
v6 = FLAlertLayer::create(0, (int)"Level Stats", (int)&v15, (int)"OK", 0, 300.0);
}
sub_774008(&v15);
v6->show(v6);
}
sub_774008(&v14);
}
}