[Scummvm-git-logs] scummvm master -> fbe489e66902304b188ec8b42e4963696d487bdf

dreammaster dreammaster at scummvm.org
Sun Mar 4 04:15:54 CET 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fbe489e669 XEEN: Fix loading saves from main menus and launcher


Commit: fbe489e66902304b188ec8b42e4963696d487bdf
    https://github.com/scummvm/scummvm/commit/fbe489e66902304b188ec8b42e4963696d487bdf
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2018-03-03T22:15:50-05:00

Commit Message:
XEEN: Fix loading saves from main menus and launcher

Changed paths:
    engines/xeen/module.mk
    engines/xeen/swordsofxeen/swordsofxeen_menu.cpp
    engines/xeen/worldofxeen/worldofxeen_menu.cpp
    engines/xeen/xeen.cpp


diff --git a/engines/xeen/module.mk b/engines/xeen/module.mk
index 1b3fbcb..fcd99a8 100644
--- a/engines/xeen/module.mk
+++ b/engines/xeen/module.mk
@@ -8,7 +8,7 @@ MODULE_OBJS := \
 	worldofxeen/worldofxeen.o \
 	worldofxeen/worldofxeen_resources.o \
 	swordsofxeen/swordsofxeen.o \
-	swordsofxeen/swordsofxeen_menu.h \
+	swordsofxeen/swordsofxeen_menu.o \
 	character.o \
 	combat.o \
 	cutscenes.o \
diff --git a/engines/xeen/swordsofxeen/swordsofxeen_menu.cpp b/engines/xeen/swordsofxeen/swordsofxeen_menu.cpp
index f0ddccd..ce424b9 100644
--- a/engines/xeen/swordsofxeen/swordsofxeen_menu.cpp
+++ b/engines/xeen/swordsofxeen/swordsofxeen_menu.cpp
@@ -84,6 +84,7 @@ void MainMenu::execute() {
 				}
 				break;
 			case Common::KEYCODE_l:
+				_vm->_saves->newGame();
 				if (_vm->_saves->loadGame())
 					_vm->_gameMode = GMODE_PLAY_GAME;
 				break;
diff --git a/engines/xeen/worldofxeen/worldofxeen_menu.cpp b/engines/xeen/worldofxeen/worldofxeen_menu.cpp
index 42a5588..7f5e7f3 100644
--- a/engines/xeen/worldofxeen/worldofxeen_menu.cpp
+++ b/engines/xeen/worldofxeen/worldofxeen_menu.cpp
@@ -94,7 +94,7 @@ void WorldOfXeenMenu::execute() {
 			int key = toupper(_buttonValue);
 			_buttonValue = 0;
 
-			if (key == 27) {
+			if (key == Common::KEYCODE_ESCAPE) {
 				// Hide the options menu
 				closeWindow();
 				break;
@@ -115,6 +115,12 @@ void WorldOfXeenMenu::execute() {
 				_vm->_gameMode = GMODE_PLAY_GAME;
 				closeWindow();
 				return;
+			} else if (key == 'L') {
+				_vm->_saves->newGame();
+				if (_vm->_saves->loadGame()) {
+					_vm->_gameMode = GMODE_PLAY_GAME;
+					break;
+				}
 			}
 		}
 	}
diff --git a/engines/xeen/xeen.cpp b/engines/xeen/xeen.cpp
index 13c831b..21db8b2 100644
--- a/engines/xeen/xeen.cpp
+++ b/engines/xeen/xeen.cpp
@@ -203,6 +203,7 @@ void XeenEngine::play() {
 	}
 
 	if (_loadSaveSlot >= 0) {
+		_saves->newGame();
 		_saves->loadGameState(_loadSaveSlot);
 		_loadSaveSlot = -1;
 	} else {





More information about the Scummvm-git-logs mailing list