diff options
author | Paul Gilbert | 2018-02-26 18:24:24 -0500 |
---|---|---|
committer | Paul Gilbert | 2018-02-26 18:24:24 -0500 |
commit | 724c4e57add58362395ad6b6e79bcdaed1ff073b (patch) | |
tree | 4db154e5aa2f74c85ec18ecd9757308c616bc75b /engines/xeen/worldofxeen | |
parent | c759dc764b227d3784996761eded672d5a685ca3 (diff) | |
download | scummvm-rg350-724c4e57add58362395ad6b6e79bcdaed1ff073b.tar.gz scummvm-rg350-724c4e57add58362395ad6b6e79bcdaed1ff073b.tar.bz2 scummvm-rg350-724c4e57add58362395ad6b6e79bcdaed1ff073b.zip |
XEEN: Defer creating new game state until needed
This fixes a bug with the startup menu where, after finishing the
game, starting a new one would simply re-show the prior game
Diffstat (limited to 'engines/xeen/worldofxeen')
-rw-r--r-- | engines/xeen/worldofxeen/worldofxeen.cpp | 4 | ||||
-rw-r--r-- | engines/xeen/worldofxeen/worldofxeen_menu.cpp | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/engines/xeen/worldofxeen/worldofxeen.cpp b/engines/xeen/worldofxeen/worldofxeen.cpp index cb2c8c7ee3..54d3b482fc 100644 --- a/engines/xeen/worldofxeen/worldofxeen.cpp +++ b/engines/xeen/worldofxeen/worldofxeen.cpp @@ -45,8 +45,10 @@ void WorldOfXeenEngine::outerGameLoop() { while (!shouldQuit() && _pendingAction != WOX_QUIT) { // TODO: Remove this once proper startup menus are added for Clouds & Dark Side - if (g_vm->getGameID() != GType_WorldOfXeen) + if (g_vm->getGameID() != GType_WorldOfXeen) { + _saves->newGame(); _pendingAction = WOX_PLAY_GAME; + } WOXGameAction action = _pendingAction; _pendingAction = WOX_MENU; diff --git a/engines/xeen/worldofxeen/worldofxeen_menu.cpp b/engines/xeen/worldofxeen/worldofxeen_menu.cpp index ff2e9ac3e8..f43b00f027 100644 --- a/engines/xeen/worldofxeen/worldofxeen_menu.cpp +++ b/engines/xeen/worldofxeen/worldofxeen_menu.cpp @@ -109,7 +109,10 @@ void WorldOfXeenMenu::execute() { if (result == -1) break; + // Load a new game state and set the difficulty + _vm->_saves->newGame(); _vm->_party->_difficulty = (Difficulty)result; + WOX_VM._pendingAction = WOX_PLAY_GAME; closeWindow(); return; |