Mercurial > mm7
diff Engine/Engine.cpp @ 2555:67d837007a4c
ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows & d3d deinit crashes fixed
author | a.parshin |
---|---|
date | Thu, 14 May 2015 10:34:40 +0200 |
parents | f2a8ed07e921 |
children | b8a56afc6ba1 |
line wrap: on
line diff
--- a/Engine/Engine.cpp Wed May 13 11:31:58 2015 +0200 +++ b/Engine/Engine.cpp Thu May 14 10:34:40 2015 +0200 @@ -2094,8 +2094,6 @@ //----- (00464479) -------------------------------------------------------- void ResetCursor_Palettes_LODs_Level_Audio_SFT_Windows() { - int v0; // esi@9 - if (pMouse) pMouse->SetCursorBitmap("MICON1"); @@ -2113,13 +2111,15 @@ pSoundList->_4A9D79(0); uCurrentlyLoadedLevelType = LEVEL_null; pSpriteFrameTable->ResetSomeSpriteFlags(); - v0 = uNumVisibleWindows; pParty->armageddon_timer = 0; - while (v0 > 0) + + while (uNumVisibleWindows > 0) { - pWindowList[pVisibleWindowsIdxs[v0--] - 1]->Release(); - delete pWindowList[pVisibleWindowsIdxs[v0--] - 1]; - pWindowList[pVisibleWindowsIdxs[v0--] - 1] = nullptr; + pWindowList[pVisibleWindowsIdxs[uNumVisibleWindows] - 1]->Release(); + delete pWindowList[pVisibleWindowsIdxs[uNumVisibleWindows] - 1]; + pWindowList[pVisibleWindowsIdxs[uNumVisibleWindows] - 1] = nullptr; + + uNumVisibleWindows--; } }