//
// PlayLayer::resumeAndRestart from 0x10008dae0 to 0x10008dc23 (323 bytes)
//
// 2 xrefs:
// > PauseLayer::onRestartFull @ 0x1003c11ce
// > PauseLayer::onRestart @ 0x1003c157b
//
// 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:20:07 +0000
//
__int64 __fastcall PlayLayer::resumeAndRestart(_BYTE *a1, __int64 a2, double a3)
{
char v3; // r14
_BYTE *v4; // rbx
__int64 v5; // rax
__int64 v6; // rax
__int64 result; // rax
__int64 v8; // rdi
__int64 v9; // rdi
__int64 v10; // rdx
double v11; // xmm0_8
const char *v12; // rsi
__int64 v13; // rax
__int64 v14; // rdi
__int64 v15; // rdx
double v16; // xmm0_8
__int64 v17; // rax
__int64 v18; // rdx
v3 = a2;
v4 = a1;
if ( a1[12544] != 1 || a1[12545] == 1 )
{
if ( (_BYTE)a2 || !a1[12238] )
{
a3 = GJBaseGameLayer::resetAudio(a1);
}
else
{
v5 = FMODAudioEngine::sharedEngine(a3);
FMODAudioEngine::stopAllEffects(v5);
v6 = FMODAudioEngine::sharedEngine(a3);
a2 = 0;
FMODAudioEngine::stopAllMusic(v6, 0);
}
a1[14880] = 0;
a1 = (_BYTE *)FMODAudioEngine::sharedEngine(a3);
v4[14288] = FMODAudioEngine::getBackgroundMusicVolume(a1) <= 0.0;
}
v4[14751] = 0;
v4[1982] = 0;
result = AppDelegate::get(a1, a2);
if ( *(_BYTE *)(result + 65) == 1 )
{
*(_BYTE *)(AppDelegate::get(a1, a2) + 65) = 0;
PlayerObject::releaseAllButtons(*((_QWORD *)v4 + 407));
v8 = *((_QWORD *)v4 + 408);
if ( v8 )
PlayerObject::releaseAllButtons(v8);
UILayer::resetAllButtons(*((_QWORD *)v4 + 1661));
v9 = *((_QWORD *)v4 + 1661);
UILayer::toggleMenuVisibility(v9, 1);
*(_QWORD *)&v11 = GameManager::sharedState(v9, 1, v10).u64[0];
v12 = "0128";
v14 = v13;
if ( (unsigned __int8)GameManager::getGameVariable(v13, "0128") )
{
PlatformToolbox::toggleLockCursor(1, v11);
}
else
{
*(_QWORD *)&v16 = GameManager::sharedState(v14, "0128", v15).u64[0];
v12 = "0024";
if ( !(unsigned __int8)GameManager::getGameVariable(v17, "0024") )
PlatformToolbox::hideCursor(v16);
}
(*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 704LL))(v4);
if ( v3 )
return PlayLayer::resetLevelFromStart(v4, (__int64)v12, v18);
else
return (*(__int64 (__fastcall **)(_BYTE *))(*(_QWORD *)v4 + 1608LL))(v4);
}
return result;
}