//
// GJBaseGameLayer::resetPlayer from 0x1001004e0 to 0x100100632 (338 bytes)
//
// 3 xrefs:
// > PlayLayer::setupHasCompleted @ 0x10007b5ac
// > LevelEditorLayer::onPlaytest @ 0x1000c5f70
// > GJBaseGameLayer::resetLevelVariables @ 0x100138e67
//
// 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:21:20 +0000
//
__int64 __fastcall GJBaseGameLayer::resetPlayer(_QWORD *a1)
{
__int64 v2; // rdi
__int64 v3; // rax
__int64 v4; // r14
__int64 v5; // r14
char v6; // cl
__int64 result; // rax
__int64 Object; // rax
_BYTE v9[8]; // [rsp+0h] [rbp-30h] BYREF
_DWORD v10[10]; // [rsp+8h] [rbp-28h] BYREF
sub_100278250(v10, 0.0, 105.0);
v2 = a1[1554];
if ( v2 )
{
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 192LL))(v2);
sub_100278300(v10, v3);
}
else if ( *(int *)(a1[409] + 444LL) > 0 )
{
Object = GJBaseGameLayer::tryGetObject(a1);
if ( Object )
{
(*(void (__fastcall **)(_BYTE *, __int64))(*(_QWORD *)Object + 1360LL))(v9, Object);
sub_100278300(v10, v9);
if ( !*(_BYTE *)(a1[409] + 341LL) )
v10[0] = 0;
}
}
v4 = a1[407];
sub_1002782D0(v9, v10);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v4 + 1368LL))(v4, v9);
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)a1[407] + 1288LL))(a1[407]);
v5 = a1[408];
sub_1002782D0(v9, v10);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v5 + 1368LL))(v5, v9);
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)a1[408] + 1288LL))(a1[408]);
v6 = *(_BYTE *)(a1[409] + 461LL) ^ 1;
*(_BYTE *)(a1[407] + 2528LL) = v6;
result = a1[408];
*(_BYTE *)(result + 2528) = v6;
return result;
}