//
// PlayLayer::getCurrentPercent from 0x100147390 to 0x100147424 (148 bytes)
//
// 4 xrefs:
// > PlayLayer::updateProgressbar @ 0x100141224
// > sub_100147A10 @ 0x100147a18
// > PlayLayer::destroyPlayer @ 0x100147ae0
// > PlayLayer::resetLevel @ 0x10014bd20
//
// 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:59:34 +0000
//
float __fastcall PlayLayer::getCurrentPercent(__int64 a1)
{
float *v3; // x0
int v4; // w8
float v5; // s0
float v6; // s1
if ( *(_BYTE *)(a1 + 12238) == 1 )
return (float)*(int *)(*(_QWORD *)(a1 + 2152) + 832LL);
v3 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 3256) + 192LL))(*(_QWORD *)(a1 + 3256));
v4 = *(_DWORD *)(*(_QWORD *)(a1 + 1936) + 1232LL);
if ( v4 < 1 )
{
v5 = *v3;
v6 = *(float *)(a1 + 12600);
}
else
{
v5 = (float)*(int *)(a1 + 952);
v6 = (float)(unsigned int)(2 * v4);
}
return fminf(fmaxf((float)(v5 / v6) * 100.0, 0.0), 100.0);
}