[Scummvm-git-logs] scummvm master -> 91d79769cc2a0189ed106fb454e14135a995f8ee
dreammaster
dreammaster at scummvm.org
Sun Oct 29 22:07:07 CET 2017
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:
91d79769cc XEEN: Enable starting game from startup menu
Commit: 91d79769cc2a0189ed106fb454e14135a995f8ee
https://github.com/scummvm/scummvm/commit/91d79769cc2a0189ed106fb454e14135a995f8ee
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-10-29T17:06:58-04:00
Commit Message:
XEEN: Enable starting game from startup menu
Changed paths:
engines/xeen/worldofxeen/worldofxeen.cpp
engines/xeen/worldofxeen/worldofxeen.h
engines/xeen/worldofxeen/worldofxeen_menu.cpp
diff --git a/engines/xeen/worldofxeen/worldofxeen.cpp b/engines/xeen/worldofxeen/worldofxeen.cpp
index 93a0005..0b19c60 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 7dbb710..0177e7c 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 ff73cab..fb25ba1 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;
}
}
}
More information about the Scummvm-git-logs
mailing list