//
// PlayerObject::getOldPosition from 0x4351a8 to 0x435204 (92 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::processPlayerFollowActions @ 0x5949fc
//
// 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:48:18 +0000
//
int __fastcall PlayerObject::getOldPosition(PlayerObject *this, float a2)
{
int v4; // r0
int v5; // r1
if ( a2 <= 0.0 )
return *((_DWORD *)this + 19);
v4 = (int)floorf(a2 / 0.01);
if ( v4 >= 199 )
v4 = 199;
v5 = *((_DWORD *)this + 539) % 200;
if ( v4 >= 0 )
v5 -= v4;
return *(_DWORD *)(*((_DWORD *)this + 540) + 4 * (v5 + (v5 < 0 ? 0xC8 : 0)));
}