//
// GJRateLevelListLayer::impliedStarsForLevel from 0x565830 to 0x565890 (96 bytes)
//
// 1 xrefs:
// > GJRateLevelListLayer::init @ 0x5676ca
//
// 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:52:27 +0000
//
int __fastcall GJRateLevelListLayer::impliedStarsForLevel(GJRateLevelListLayer *this, GJGameLevel *a2)
{
int v2; // r3
if ( !this )
return 0;
v2 = *((_DWORD *)this + 193) - *((_DWORD *)this + 194);
if ( v2 <= 0 )
{
if ( *((_DWORD *)this + 189) - *((_DWORD *)this + 190) == 1 )
{
return 10;
}
else if ( *((_BYTE *)this + 784) )
{
return 1;
}
else
{
switch ( GJGameLevel::getAverageDifficulty(this) )
{
case 1:
v2 = 2;
break;
case 2:
v2 = 3;
break;
case 3:
v2 = 5;
break;
case 4:
v2 = 7;
break;
case 5:
v2 = 9;
break;
default:
v2 = 0;
break;
}
}
}
return v2;
}