//
// GJGroundLayer::scaleGround from 0x5464dc to 0x546532 (86 bytes)
//
// 6 xrefs:
// > GJBaseGameLayer::updateCameraBGArt @ 0x596b64
// > GJBaseGameLayer::updateCameraBGArt @ 0x596b74
// > GJBaseGameLayer::preUpdateVisibility @ 0x5ae83e
// > GJBaseGameLayer::preUpdateVisibility @ 0x5ae852
// > GJBaseGameLayer::resetLevelVariables @ 0x5b98ea
// > GJBaseGameLayer::resetLevelVariables @ 0x5b9900
//
// 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:23 +0000
//
float __fastcall GJGroundLayer::scaleGround(GJGroundLayer *this, unsigned int a2)
{
void (__fastcall *v4)(GJGroundLayer *, unsigned int); // r6
unsigned int v5; // r1
float v6; // s16
float v7; // s15
(*(void (__fastcall **)(GJGroundLayer *))(*(_DWORD *)this + 64))(this);
v4 = *(void (__fastcall **)(GJGroundLayer *, unsigned int))(*(_DWORD *)this + 72);
if ( COERCE_FLOAT((*(int (__fastcall **)(GJGroundLayer *))(*(_DWORD *)this + 76))(this)) >= 0.0 )
v5 = a2;
else
v5 = a2 ^ 0x80000000;
v4(this, v5);
v6 = *((float *)this + 86);
GJGroundLayer::updateGroundWidth(this, 1);
v7 = *((float *)this + 86);
GJGroundLayer::updateShadows(this);
return v7 - v6;
}