//
// PlayLayer::resume from 0x5d28ac to 0x5d29f4 (328 bytes)
//
// 2 xrefs:
// > PauseLayer::onResume @ 0x6c6a4c
// > ??> @ 0x41328
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void PlayLayer::resume(PlayLayer *a1)
{
FMODAudioEngine *v2; // x0
FMODAudioEngine *v3; // x0
cocos2d::CCDirector *v4; // x0
FMODAudioEngine *v5; // x0
float BackgroundMusicVolume; // s0
GameManager *v7; // x0
AppDelegate *v8; // x0
PlayLayer_vtbl *v9; // x1
GameManager *v10; // x0
float DeviceRefreshRate; // [xsp+30h] [xbp+30h]
if ( BYTE1(AppDelegate::get()->m_startupScriptFilename.m_data.m_data) )
{
if ( a1->m_playerDied )
{
v2 = FMODAudioEngine::sharedEngine();
FMODAudioEngine::resumeAllAudio(v2);
v3 = FMODAudioEngine::sharedEngine();
FMOD::System::update(v3->m_system);
}
else
{
GJBaseGameLayer::preResumeGame(a1);
a1->m_audioPaused = 1;
}
DeviceRefreshRate = PlatformToolbox::getDeviceRefreshRate();
v4 = cocos2d::CCDirector::sharedDirector();
v4->setAnimationInterval(v4, (float)(1.0 / DeviceRefreshRate));
v5 = FMODAudioEngine::sharedEngine();
BackgroundMusicVolume = FMODAudioEngine::getBackgroundMusicVolume(v5);
a1->m_isPaused = 0;
a1->m_isSilent = BackgroundMusicVolume <= 0.0;
cocos2d::CCDirector::sharedDirector()->m_bSmoothFixCheck = 1;
v7 = GameManager::sharedState();
if ( GameManager::getGameVariable(v7, "0128") )
{
PlatformToolbox::toggleLockCursor(1);
}
else
{
v10 = GameManager::sharedState();
if ( !GameManager::getGameVariable(v10, "0024") )
PlatformToolbox::hideCursor();
}
v8 = AppDelegate::get();
v9 = a1->GJBaseGameLayer::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;
BYTE1(v8->m_startupScriptFilename.m_data.m_data) = 0;
v9->onEnter(a1);
PlayerObject::releaseAllButtons(a1->m_player1);
UILayer::refreshDpad(a1->m_uiLayer);
UILayer::resetAllButtons(a1->m_uiLayer);
UILayer::toggleMenuVisibility(a1->m_uiLayer, 1);
a1->m_pauseDelta = a1->m_pauseDelta + PlayLayer::getTempMilliTime(a1) - a1->m_pauseTime;
}
}