aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2017-10-29 17:06:58 -0400
committerPaul Gilbert2017-10-29 17:06:58 -0400
commit91d79769cc2a0189ed106fb454e14135a995f8ee (patch)
tree3a88396dfb4c9c95e62f9dd1ecef9120ef23f5af /engines
parent8258bca063294205811ea1fd96a957d1edfaaa62 (diff)
downloadscummvm-rg350-91d79769cc2a0189ed106fb454e14135a995f8ee.tar.gz
scummvm-rg350-91d79769cc2a0189ed106fb454e14135a995f8ee.tar.bz2
scummvm-rg350-91d79769cc2a0189ed106fb454e14135a995f8ee.zip
XEEN: Enable starting game from startup menu
Diffstat (limited to 'engines')
-rw-r--r--engines/xeen/worldofxeen/worldofxeen.cpp4
-rw-r--r--engines/xeen/worldofxeen/worldofxeen.h2
-rw-r--r--engines/xeen/worldofxeen/worldofxeen_menu.cpp13
3 files changed, 15 insertions, 4 deletions
diff --git a/engines/xeen/worldofxeen/worldofxeen.cpp b/engines/xeen/worldofxeen/worldofxeen.cpp
index 93a0005088..0b19c607ff 100644
--- a/engines/xeen/worldofxeen/worldofxeen.cpp
+++ b/engines/xeen/worldofxeen/worldofxeen.cpp
@@ -38,6 +38,10 @@ WorldOfXeenEngine::WorldOfXeenEngine(OSystem *syst, const XeenGameDescription *g
void WorldOfXeenEngine::outerGameLoop() {
//_pendingAction = getGameID() == GType_DarkSide ? WOX_DARKSIDE_INTRO : WOX_CLOUDS_INTRO;
_pendingAction = WOX_MENU;
+ if (gDebugLevel >= 1)
+ // Skip main menu when starting in debug mode
+ _pendingAction = WOX_PLAY_GAME;
+
while (!shouldQuit() && _pendingAction != WOX_QUIT) {
switch (_pendingAction) {
case WOX_CLOUDS_INTRO:
diff --git a/engines/xeen/worldofxeen/worldofxeen.h b/engines/xeen/worldofxeen/worldofxeen.h
index 7dbb710430..0177e7cacf 100644
--- a/engines/xeen/worldofxeen/worldofxeen.h
+++ b/engines/xeen/worldofxeen/worldofxeen.h
@@ -61,6 +61,8 @@ public:
void setPendingAction(WOXGameAction action) { _pendingAction = action; }
};
+#define WOX_VM (*(::Xeen::WorldOfXeen::WorldOfXeenEngine *)g_vm)
+
} // End of namespace WorldOfXeen
} // End of namespace Xeen
diff --git a/engines/xeen/worldofxeen/worldofxeen_menu.cpp b/engines/xeen/worldofxeen/worldofxeen_menu.cpp
index ff73cab4bb..fb25ba1757 100644
--- a/engines/xeen/worldofxeen/worldofxeen_menu.cpp
+++ b/engines/xeen/worldofxeen/worldofxeen_menu.cpp
@@ -23,6 +23,7 @@
#include "common/scummsys.h"
#include "xeen/worldofxeen/worldofxeen_menu.h"
#include "xeen/resources.h"
+#include "xeen/worldofxeen/worldofxeen.h"
namespace Xeen {
namespace WorldOfXeen {
@@ -92,13 +93,17 @@ void WorldOfXeenMenu::execute() {
int key = toupper(_buttonValue);
_buttonValue = 0;
- if (key == 'C' || key == 'V') {
+ if (key == 27) {
+ // Hide the options menu
+ break;
+ } else if (key == 'C' || key == 'V') {
// Show credits
CreditsScreen::show(_vm);
break;
- } else if (key == 27) {
- // Hide the options menu
- break;
+ } else if (key == 'S') {
+ // Start new game
+ WOX_VM._pendingAction = WOX_PLAY_GAME;
+ return;
}
}
}