//
// GJBaseGameLayer::resetPlayer from 0x140318f90 to 0x1403190e6 (342 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::resetLevelVariables @ 0x1403458c9
// > LevelEditorLayer::onPlaytest @ 0x1403feec7
// > PlayLayer::setupHasCompleted @ 0x140504e60
// > ??> @ 0x14091eab8
//
// 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:30:19 +0000
//
__int64 __fastcall GJBaseGameLayer::resetPlayer(_QWORD *a1)
{
__int64 v2; // rcx
__int64 v3; // rax
_QWORD *v4; // rsi
__int64 Object; // rax
__int64 v6; // rax
__int64 *v7; // rdi
__int64 v8; // rbx
__int64 v9; // rax
__int64 *v10; // rdi
__int64 v11; // rbx
__int64 v12; // rax
__int64 result; // rax
int v14; // [rsp+40h] [rbp+8h] BYREF
char v15; // [rsp+48h] [rbp+10h] BYREF
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v14, 0.0, 105.0);
v2 = a1[1614];
if ( v2 )
{
v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v2 + 200LL))(v2);
cocos2d::CCPoint::operator=(&v14, v3);
v4 = a1 + 441;
}
else
{
v4 = a1 + 441;
if ( *(int *)(a1[441] + 452LL) > 0 )
{
Object = GJBaseGameLayer::tryGetObject(a1);
if ( Object )
{
v6 = (*(__int64 (__fastcall **)(__int64, char *))(*(_QWORD *)Object + 1208LL))(Object, &v15);
cocos2d::CCPoint::operator=(&v14, v6);
if ( !*(_BYTE *)(*v4 + 341LL) )
v14 = 0;
}
}
}
v7 = (__int64 *)a1[439];
v8 = *v7;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const struct cocos2d::CCPoint *)&v14);
(*(void (__fastcall **)(__int64 *, __int64))(v8 + 1216))(v7, v9);
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)a1[439] + 1136LL))(a1[439]);
v10 = (__int64 *)a1[440];
v11 = *v10;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (const struct cocos2d::CCPoint *)&v14);
(*(void (__fastcall **)(__int64 *, __int64))(v11 + 1216))(v10, v12);
(*(void (__fastcall **)(_QWORD))(*(_QWORD *)a1[440] + 1136LL))(a1[440]);
*(_BYTE *)(a1[439] + 2608LL) = *(_BYTE *)(*v4 + 469LL) == 0;
result = a1[440];
*(_BYTE *)(result + 2608) = *(_BYTE *)(*v4 + 469LL) == 0;
return result;
}