aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2016-09-24 22:35:08 -0400
committerPaul Gilbert2016-09-24 22:35:08 -0400
commitcce771c0e1c018edc6c047322f58614425192ee6 (patch)
tree9204f7e9613dda64f2965917527d42acd1c92522
parentf77367c42bc699fd51dbde775f09073ca6658a7d (diff)
downloadscummvm-rg350-cce771c0e1c018edc6c047322f58614425192ee6.tar.gz
scummvm-rg350-cce771c0e1c018edc6c047322f58614425192ee6.tar.bz2
scummvm-rg350-cce771c0e1c018edc6c047322f58614425192ee6.zip
XEEN: Display main menu on startup
-rw-r--r--engines/xeen/worldofxeen/worldofxeen.cpp8
-rw-r--r--engines/xeen/worldofxeen/worldofxeen_menu.cpp7
2 files changed, 8 insertions, 7 deletions
diff --git a/engines/xeen/worldofxeen/worldofxeen.cpp b/engines/xeen/worldofxeen/worldofxeen.cpp
index 19ca2f2bb1..f4d8fdbc94 100644
--- a/engines/xeen/worldofxeen/worldofxeen.cpp
+++ b/engines/xeen/worldofxeen/worldofxeen.cpp
@@ -23,6 +23,7 @@
#include "xeen/worldofxeen/worldofxeen.h"
#include "xeen/worldofxeen/darkside_cutscenes.h"
#include "xeen/worldofxeen/clouds_cutscenes.h"
+#include "xeen/worldofxeen/worldofxeen_menu.h"
#include "xeen/sound.h"
namespace Xeen {
@@ -35,8 +36,8 @@ WorldOfXeenEngine::WorldOfXeenEngine(OSystem *syst, const XeenGameDescription *g
}
void WorldOfXeenEngine::outerGameLoop() {
- _pendingAction = getGameID() == GType_DarkSide ? WOX_DARKSIDE_INTRO : WOX_CLOUDS_INTRO;
-
+ //_pendingAction = getGameID() == GType_DarkSide ? WOX_DARKSIDE_INTRO : WOX_CLOUDS_INTRO;
+ _pendingAction = WOX_MENU;
while (!shouldQuit() && _pendingAction != WOX_QUIT) {
switch (_pendingAction) {
case WOX_CLOUDS_INTRO:
@@ -66,8 +67,7 @@ void WorldOfXeenEngine::outerGameLoop() {
return;
case WOX_MENU:
- // TODO
- _pendingAction = WOX_PLAY_GAME;
+ WorldOfXeenMenu::show(this);
break;
case WOX_PLAY_GAME:
diff --git a/engines/xeen/worldofxeen/worldofxeen_menu.cpp b/engines/xeen/worldofxeen/worldofxeen_menu.cpp
index 3b8f9651b2..d3f273784b 100644
--- a/engines/xeen/worldofxeen/worldofxeen_menu.cpp
+++ b/engines/xeen/worldofxeen/worldofxeen_menu.cpp
@@ -66,10 +66,11 @@ void WorldOfXeenMenu::execute() {
bool firstTime = true, doFade = true;
while (!_vm->shouldQuit()) {
setBackground(doFade);
- events.setCursor(0);
if (firstTime) {
firstTime = false;
+ events.setCursor(0);
+ events.showCursor();
warning("TODO: Read existing save file");
}
@@ -219,11 +220,11 @@ void WorldOptionsMenu::showContents(SpriteResource &title1, bool waitFlag) {
screen._windows[GAME_WINDOW].writeString(Res.OPTIONS_TITLE);
drawButtons(&screen._windows[0]);
+ screen.update();
if (waitFlag) {
- screen._windows[0].update();
-
while (!_vm->shouldQuit() && !_buttonValue && events.timeElapsed() < 3) {
+ events.pollEventsAndWait();
checkEvents(_vm);
}
}