//
// AppDelegate::trySaveGame from 0x3077a0 to 0x307858 (184 bytes)
//
// 0 xrefs:
//
// 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 AppDelegate::trySaveGame(AppDelegate *a1, bool a2)
{
GameManager *v3; // r0
LocalLevelManager *v4; // r0
float v5; // s14
int v6; // [sp+4h] [bp-10h] BYREF
int v7; // [sp+8h] [bp-Ch]
if ( a2 )
*(_DWORD *)&a1->m_loadingFinished = 0;
if ( *(float *)&a1->m_loadingFinished == 0.0
|| (clock_gettime(0, (struct timespec *)&v6),
(double)v6 + (double)v7 / 1000000000.0 - *(float *)&a1->m_loadingFinished >= 10.0) )
{
if ( a1->m_glViewSetup )
{
v3 = GameManager::sharedState();
GManager::save(v3);
v4 = LocalLevelManager::sharedState();
GManager::save(v4);
clock_gettime(0, (struct timespec *)&v6);
v5 = (double)v6 + (double)v7 / 1000000000.0;
*(float *)&a1->m_loadingFinished = v5;
}
PlatformToolbox::gameDidSave();
}
}