//
// GJColorSetupLayer::onPage from 0x1001ef210 to 0x1001ef2a8 (152 bytes)
//
// 2 xrefs:
// > GJColorSetupLayer::init @ 0x1001eed1e
// > GJColorSetupLayer::init @ 0x1001eedef
//
// This function is hookable on this platform (idp: pc, 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 12:26:32 +0000
//
__int64 __fastcall GJColorSetupLayer::onPage(__int64 a1, __int64 a2)
{
int v2; // eax
int v3; // r14d
double v4; // xmm0_8
v2 = *(_DWORD *)(a1 + 720) + ((*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) != 0 ? -1 : 1);
if ( v2 <= 0 )
v2 = 0;
v3 = *(_DWORD *)(a1 + 728) - 1;
if ( v3 >= v2 )
v3 = v2;
*(_DWORD *)(a1 + 720) = v3;
(*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 736) + 344LL))(*(_QWORD *)(a1 + 736), v3 != 0);
v4 = (*(double (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 744) + 344LL))(
*(_QWORD *)(a1 + 744),
*(_DWORD *)(a1 + 728) - 1 != v3);
*(_DWORD *)(*(_QWORD *)(a1 + 680) + 420LL) = v3;
return GJColorSetupLayer::updateSpriteColors(a1, v4);
}