//
// GJRateLevelListLayer::impliedStarsForLevel from 0x951e98 to 0x951f4c (180 bytes)
//
// 2 xrefs:
// > GJRateLevelListLayer::init @ 0x9559d0
// > ??> @ 0x76558
//
// 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 12:57:23 +0000
//
__int64 __fastcall GJRateLevelListLayer::impliedStarsForLevel(GJRateLevelListLayer *this, GJGameLevel *a2)
{
int v2; // w1
int v4; // w0
if ( !this )
return 0;
v2 = *((_DWORD *)this + 237) - *((_DWORD *)this + 238);
if ( v2 <= 0 )
{
v2 = 10;
if ( *((_DWORD *)this + 233) - *((_DWORD *)this + 234) != 1 )
{
v2 = 1;
if ( !*((_BYTE *)this + 960) )
{
v4 = GJGameLevel::getAverageDifficulty(this) - 1;
v2 = 0;
switch ( v4 )
{
case 0:
v2 = 2;
break;
case 1:
v2 = 3;
break;
case 2:
v2 = 5;
break;
case 3:
v2 = 7;
break;
case 4:
v2 = 9;
break;
default:
return (unsigned int)v2;
}
}
}
}
return (unsigned int)v2;
}