//
// LevelInfoLayer::onRateStars from 0x10002bb4c to 0x10002bc60 (276 bytes)
//
// 2 xrefs:
// > LevelInfoLayer::FLAlert_Clicked @ 0x10002e5f0
// > LevelInfoLayer::init @ 0x1000288c0
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 10:57:28 +0000
//
__int64 __fastcall LevelInfoLayer::onRateStars(__int64 result)
{
__int64 v1; // x19
__int64 updated; // x0
__int64 v3; // x0
__int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x20
__int64 isPlatformer; // x0
_QWORD *v8; // x0
__int64 v9; // x19
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v11; // [xsp+1Fh] [xbp-11h]
if ( (*(_BYTE *)(result + 488) & 1) == 0 )
{
v1 = result;
updated = GameManager::sharedState(result);
if ( *(_DWORD *)(updated + 660) == *(_DWORD *)(updated + 664) )
{
v3 = GameLevelManager::sharedState(updated);
updated = GameLevelManager::updateUserScore(v3);
}
v4 = GameManager::sharedState(updated);
if ( (*(_BYTE *)(v4 + 933) & 1) != 0 )
{
v5 = *(_QWORD *)(v1 + 504);
v6 = (unsigned int)(*(_DWORD *)(v5 + 328) - *(_DWORD *)(v5 + 332));
isPlatformer = GJGameLevel::isPlatformer(v5);
v8 = (_QWORD *)RateStarsLayer::create(v6, isPlatformer, 0);
v8[94] = v1 + 424;
return (*(__int64 (__fastcall **)(_QWORD *))(*v8 + 1312LL))(v8);
}
else
{
*(_BYTE *)(GameManager::sharedState(v4) + 933) = 1;
sub_100009900(
__p,
"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.)");
v9 = FLAlertLayer::create_1(v1 + 440, "Rating guide", __p, "OK", 0, 300.0);
if ( v11 < 0 )
operator delete(__p[0]);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v9 + 72LL))(v9, 8);
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 1312LL))(v9);
}
}
return result;
}