//
// AppDelegate::trySaveGame from 0x100269718 to 0x1002697ec (212 bytes)
//
// 1 xrefs:
// > ??> @ 0x1007d2778
//
// 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 __fastcall AppDelegate::trySaveGame(AppDelegate *a1, bool a2)
{
GameManager *v3; // x0
LocalLevelManager *v4; // x0
float v5; // s0
timeb v6; // [xsp+0h] [xbp-20h] BYREF
if ( a2 )
{
LODWORD(a1->m_startupScriptFilename.m_data.m_long.size) = 0;
}
else if ( *(float *)&a1->m_startupScriptFilename.m_data.m_long.size != 0.0 )
{
ftime(&v6);
if ( (double)(v6.millitm + 1000 * (unsigned __int64)(v6.time & 0xFFFFF)) / 1000.0
- *(float *)&a1->m_startupScriptFilename.m_data.m_long.size < 10.0 )
return;
}
if ( a1->m_startupScriptFilename.m_data.m_short.sizex2 == 1 )
{
v3 = GameManager::sharedState();
GManager::save(v3);
v4 = LocalLevelManager::sharedState();
GManager::save(v4);
ftime(&v6);
v5 = (double)(v6.millitm + 1000 * (unsigned __int64)(v6.time & 0xFFFFF)) / 1000.0;
*(float *)&a1->m_startupScriptFilename.m_data.m_long.size = v5;
}
PlatformToolbox::gameDidSave();
}