//
// LevelInfoLayer::onRateStars from 0x49acdc to 0x49adb4 (216 bytes)
//
// 1 xrefs:
// > LevelInfoLayer::FLAlert_Clicked @ 0x49bbe4
//
// 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:49:45 +0000
//
GameManager *__fastcall LevelInfoLayer::onRateStars(GameManager *this, cocos2d::CCObject *a2)
{
GameManager *v2; // r4
GameLevelManager *updated; // r0
GameLevelManager *v4; // r0
unsigned __int8 *v5; // r0
int v6; // r5
int *v7; // r5
GJGameLevel *v8; // r0
RateStarsLayer *v9; // r5
int isPlatformer; // r0
bool v11; // r3
int *v12; // r0
int v13; // r3
int v14[3]; // [sp+8h] [bp-14h] BYREF
v2 = this;
if ( !*((_BYTE *)this + 356) )
{
updated = (GameLevelManager *)GameManager::sharedState(this);
if ( *((_DWORD *)updated + 116) == *((_DWORD *)updated + 117) )
{
v4 = (GameLevelManager *)GameLevelManager::sharedState(updated);
updated = (GameLevelManager *)GameLevelManager::updateUserScore(v4);
}
v5 = (unsigned __int8 *)GameManager::sharedState(updated);
v6 = v5[733];
if ( v5[733] )
{
v8 = *((GJGameLevel **)v2 + 91);
v9 = (RateStarsLayer *)(*((_DWORD *)v8 + 67) - *((_DWORD *)v8 + 68));
isPlatformer = GJGameLevel::isPlatformer(v8);
v12 = (int *)RateStarsLayer::create(v9, isPlatformer, 0, v11);
v13 = *v12;
v12[142] = (int)v2 + 324;
return (GameManager *)(*(int (__fastcall **)(int *))(v13 + 656))(v12);
}
else
{
v14[0] = v5[733];
v14[1] = v6;
v14[2] = v6;
*(_BYTE *)(GameManager::sharedState((GameManager *)v5) + 733) = 1;
std::string::__init(
v14,
"Auto: 1 Star or Moon\n"
"Easy: 2 Stars or Moons\n"
"Normal: 3 Stars or Moons\n"
"Hard: 4 to 5 Stars or Moons\n"
"Harder: 6 to 7 Stars or Moons\n"
"Insane: 8 to 9 Stars or Moons\n"
"Demon: 10 Stars or Moons\n"
"(These values are not assigned before a rating is manually given by RobTop.)",
0x13Au);
v7 = FLAlertLayer::create(
(int)v2 + 332,
(cocos2d::CCLabelBMFont *)"Rating guide",
(int)v14,
(ButtonSprite *)"OK",
(ButtonSprite *)v6,
300.0);
std::string::~string((int)v14);
(*(void (__fastcall **)(int *, int))(*v7 + 36))(v7, 8);
return (GameManager *)(*(int (__fastcall **)(int *))(*v7 + 656))(v7);
}
}
return this;
}