//
// GJBaseGameLayer::resetAreaObjectValues from 0x59dec4 to 0x59e084 (448 bytes)
//
// 11 xrefs:
// > GJBaseGameLayer::resetStoppedAreaObjects @ 0x59e0b2
// > GJBaseGameLayer::moveAreaObject @ 0x59e0f8
// > GJBaseGameLayer::transformAreaObjects @ 0x59e1ba
// > GJBaseGameLayer::transformAreaObjects @ 0x59e2ca
// > GJBaseGameLayer::processAreaTransformGroupAction @ 0x59e670
// > GJBaseGameLayer::rotateAreaObjects @ 0x59e85e
// > GJBaseGameLayer::rotateAreaObjects @ 0x59e99c
// > GJBaseGameLayer::processAreaRotateGroupAction @ 0x59eb78
// > GJBaseGameLayer::processAreaMoveGroupAction @ 0x59edc2
// > GJBaseGameLayer::processAreaEffects @ 0x5accb0
// > GJBaseGameLayer::processAreaActions @ 0x5ad154
//
// 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:53:15 +0000
//
int __fastcall GJBaseGameLayer::resetAreaObjectValues(GJBaseGameLayer *this, GameObject *a2, int a3)
{
float v6; // s14
int v7; // r6
double v8; // d6
float v9; // s14
double v10; // d6
float v11; // s13
float v12; // s14
float v13; // s15
float v14; // s13
float v15; // s14
float v16; // s15
int v17; // r3
int v18; // r2
_DWORD *v19; // r3
_DWORD v21[3]; // [sp+0h] [bp-Ch] BYREF
v21[0] = this;
v21[1] = a2;
v21[2] = a3;
if ( *((_DWORD *)a2 + 269) >= *((_DWORD *)this + 202) )
return 0;
if ( a3 )
GJBaseGameLayer::updateAreaObjectLastValues((int)this, a2);
v6 = *((float *)a2 + 142);
if ( v6 == 0.0 )
{
v7 = 0;
}
else
{
v7 = 1;
v8 = *((double *)a2 + 101);
*((_DWORD *)a2 + 142) = 0;
*((_BYTE *)a2 + 710) = 1;
*((double *)a2 + 101) = v8 - v6;
}
v9 = *((float *)a2 + 143);
if ( v9 != 0.0 )
{
v10 = *((double *)a2 + 102);
v7 = 1;
*((_DWORD *)a2 + 143) = 0;
*((_BYTE *)a2 + 710) = 1;
*((double *)a2 + 102) = v10 - v9;
}
v11 = *((float *)a2 + 150);
v12 = *((float *)a2 + 151);
if ( v11 != 0.0 || v12 != 0.0 )
{
v13 = *((float *)a2 + 148);
*((_DWORD *)a2 + 150) = 0;
*((_DWORD *)a2 + 151) = 0;
*((float *)a2 + 148) = v13 - v11;
*((float *)a2 + 252) = *((float *)a2 + 252) - v11;
*((float *)a2 + 149) = *((float *)a2 + 149) - v12;
*((float *)a2 + 253) = *((float *)a2 + 253) - v12;
if ( !a3 )
(*(void (__fastcall **)(GameObject *, int))(*(_DWORD *)a2 + 728))(a2, 1065353216);
}
v14 = *((float *)a2 + 145);
v15 = *((float *)a2 + 147);
if ( v14 != 0.0 || v15 != 0.0 )
{
v16 = *((float *)a2 + 144);
*((_DWORD *)a2 + 145) = 0;
*((_DWORD *)a2 + 147) = 0;
*((float *)a2 + 144) = v16 - v14;
*((float *)a2 + 146) = *((float *)a2 + 146) - v15;
if ( !a3 )
(*(void (__fastcall **)(GameObject *, _DWORD))(*(_DWORD *)a2 + 740))(a2, 0);
}
*((_DWORD *)a2 + 269) = *((_DWORD *)this + 202);
if ( a3 )
{
v17 = *((_DWORD *)this + 561);
v18 = *((_DWORD *)this + 566);
v21[0] = a2;
if ( v18 > v17 )
{
*(_DWORD *)(*((_DWORD *)this + 537) + 4 * v17) = a2;
}
else
{
v19 = *((_DWORD **)this + 538);
if ( v19 == *((_DWORD **)this + 539) )
{
std::vector::__push_back_slow_path((int)this + 2148, v21);
}
else
{
if ( v19 )
*v19 = a2;
*((_DWORD *)this + 538) += 4;
}
++*((_DWORD *)this + 566);
}
++*((_DWORD *)this + 561);
}
else
{
GJBaseGameLayer::updateAreaObjectLastValues((int)this, a2);
}
return v7;
}