From 363246d2c873bd7be2f28b26e5ea7045ab9c0328 Mon Sep 17 00:00:00 2001 From: Christian Semmler Date: Tue, 4 Jun 2024 10:16:49 -0400 Subject: [PATCH] Minor improvements in ISLE.EXE --- ISLE/isleapp.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index dc087d57..9b2a6512 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -164,16 +164,10 @@ void IsleApp::Close() TransitionManager()->SetWaitIndicator(NULL); Lego()->StopTimer(); - MxLong lVar8; - do { - lVar8 = Streamer()->Close(NULL); - } while (lVar8 == 0); - - while (Lego()) { - if (Lego()->DoesEntityExist(ds)) { - break; - } + while (Streamer()->Close(NULL) == SUCCESS) { + } + while (Lego() && !Lego()->DoesEntityExist(ds)) { Timer()->GetRealTime(); TickleManager()->Tickle(); } @@ -404,9 +398,7 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return DefWindowProcA(hWnd, uMsg, wParam, lParam); case WM_CLOSE: if (!g_closed && g_isle) { - if (g_isle) { - delete g_isle; - } + delete g_isle; g_isle = NULL; g_closed = TRUE; return 0; @@ -646,8 +638,8 @@ MxResult IsleApp::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine) } GameState()->SetSavePath(m_savePath); - GameState()->SerializePlayersInfo(1); - GameState()->SerializeScoreHistory(1); + GameState()->SerializePlayersInfo(LegoStorage::c_read); + GameState()->SerializeScoreHistory(LegoStorage::c_read); int iVar10; switch (m_islandQuality) {