//
// PlayLayer::dtCommitPlaytime from 0x14051e8e0 to 0x14051e9a7 (199 bytes)
//
// 5 xrefs:
// > PlayLayer::levelComplete @ 0x140506e93
// > PlayLayer::destroyPlayer @ 0x140512a76
// > PlayLayer::pauseGame @ 0x14051a3f3
// > PlayLayer::onQuit @ 0x14051b124
// > ??> @ 0x14092b34c
//
// 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 11:33:36 +0000
//
void __fastcall PlayLayer::dtCommitPlaytime(__int64 a1)
{
int v2; // eax
_DWORD *v3; // rcx
__int64 v4; // rcx
if ( (!*(_BYTE *)(a1 + 12670) || *(_BYTE *)(a1 + 15232))
&& !*(_BYTE *)(a1 + 14841)
&& !*(_BYTE *)(a1 + 14842)
&& !*(_BYTE *)(a1 + 12668) )
{
if ( !*(_BYTE *)(a1 + 13024) )
{
v2 = lround(*(double *)(a1 + 15384) - *(double *)(a1 + 15128));
v3 = *(_DWORD **)(a1 + 2168);
if ( v2 > 0 )
{
v3[465] += v2;
v3[464] += v2;
v3[428] = 2;
}
}
*(_QWORD *)(a1 + 15128) = *(_QWORD *)(a1 + 15384);
*(_DWORD *)(*(_QWORD *)(a1 + 2168) + 1852LL) = time64(nullptr);
v4 = *(_QWORD *)(a1 + 2168);
if ( !*(_DWORD *)(v4 + 1848) )
*(_DWORD *)(v4 + 1848) = *(_DWORD *)(v4 + 1852);
}
}