# HG changeset patch # User a.parshin # Date 1432065656 -7200 # Node ID 65c97624c0475f5721b8e4850985f302d5b5ceaf # Parent b8a56afc6ba17cb9a77f26ef036b8bb7e2022453 Saving & loading works from both main menu and game diff -r b8a56afc6ba1 -r 65c97624c047 Engine/Engine.cpp --- a/Engine/Engine.cpp Sun May 17 22:42:13 2015 +0600 +++ b/Engine/Engine.cpp Tue May 19 22:00:56 2015 +0200 @@ -1825,6 +1825,11 @@ else if (GetCurrentMenuID() == MENU_SAVELOAD) { MainMenuLoad_Loop(); + if (GetCurrentMenuID() == MENU_LoadingProcInMainMenu) + { + uGameState = GAME_STATE_PLAYING; + Game_Loop(); + } break; } else if (GetCurrentMenuID() == MENU_NEWGAME) diff -r b8a56afc6ba1 -r 65c97624c047 Engine/SaveLoad.cpp --- a/Engine/SaveLoad.cpp Sun May 17 22:42:13 2015 +0600 +++ b/Engine/SaveLoad.cpp Tue May 19 22:00:56 2015 +0200 @@ -179,11 +179,11 @@ } } - if (pGUIWindow_CurrentMenu) + /*if (pGUIWindow_CurrentMenu) { pGUIWindow_CurrentMenu->Release(); pGUIWindow_CurrentMenu = nullptr; - } + }*/ current_screen_type = SCREEN_GAME; viewparams->bRedrawGameUI = true; diff -r b8a56afc6ba1 -r 65c97624c047 Game/Game.cpp --- a/Game/Game.cpp Sun May 17 22:42:13 2015 +0600 +++ b/Game/Game.cpp Tue May 19 22:00:56 2015 +0200 @@ -2755,7 +2755,11 @@ uGameState = GAME_STATE_PLAYING; continue; } - if ((signed int)uGameState <= GAME_STATE_5 || uGameState == GAME_STATE_GAME_QUITTING_TO_MAIN_MENU)//GAME_STATE_NEWGAME_OUT_GAMEMENU, GAME_STATE_LOADING_GAME + //if ((signed int)uGameState <= GAME_STATE_5 || uGameState == GAME_STATE_GAME_QUITTING_TO_MAIN_MENU)//GAME_STATE_NEWGAME_OUT_GAMEMENU, GAME_STATE_LOADING_GAME + if (uGameState == GAME_STATE_LOADING_GAME + || uGameState == GAME_STATE_NEWGAME_OUT_GAMEMENU + || uGameState == GAME_STATE_5 + || uGameState == GAME_STATE_GAME_QUITTING_TO_MAIN_MENU) { game_finished = true; continue;