aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_stacks/aspit.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2018-06-19 19:38:07 +0200
committerBastien Bouclet2018-06-29 13:31:54 +0200
commitd848ebe85a2954263219ae64fd5183129dc74df6 (patch)
tree8f859cb1d609ba633d0e6620cd86f024eda69d10 /engines/mohawk/riven_stacks/aspit.cpp
parent2f9c9a2c324b27e21f4bb249cc1a89c46f1e353c (diff)
downloadscummvm-rg350-d848ebe85a2954263219ae64fd5183129dc74df6.tar.gz
scummvm-rg350-d848ebe85a2954263219ae64fd5183129dc74df6.tar.bz2
scummvm-rg350-d848ebe85a2954263219ae64fd5183129dc74df6.zip
MOHAWK: RIVEN: Fix loading and resuming from the main menu
Diffstat (limited to 'engines/mohawk/riven_stacks/aspit.cpp')
-rw-r--r--engines/mohawk/riven_stacks/aspit.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/engines/mohawk/riven_stacks/aspit.cpp b/engines/mohawk/riven_stacks/aspit.cpp
index 9c8ffc2ddd..b72ba01fe0 100644
--- a/engines/mohawk/riven_stacks/aspit.cpp
+++ b/engines/mohawk/riven_stacks/aspit.cpp
@@ -127,16 +127,17 @@ void ASpit::xastartupbtnhide(const ArgumentArray &args) {
struct MenuItem {
uint16 blstId;
+ bool requiresStartedGame;
};
MenuItem items[] = {
- { 22 },
- { 16 },
- { 23 },
- { 24 },
- { 25 },
- { 26 },
- { 27 }
+ { 22, false }, // Setup
+ { 16, false }, // New game
+ { 23, false }, // Load game
+ { 24, true }, // Save game
+ { 25, true }, // Resume
+ { 26, false }, // Options
+ { 27, false } // Quit
};
for (uint i = 0; i < ARRAYSIZE(items); i++) {
@@ -147,12 +148,20 @@ void ASpit::xastartupbtnhide(const ArgumentArray &args) {
continue;
}
+ bool enabled = !items[i].requiresStartedGame || _vm->isGameStarted();
+ hotspot->enable(enabled);
+
Common::Rect hotspotRect = hotspot->getRect();
Graphics::Surface surface;
surface.create(hotspotRect.width(), hotspotRect.height(), _vm->_gfx->getBackScreen()->format);
- uint32 textColor = surface.format.RGBToColor(164, 164, 164);
+ uint32 textColor;
+ if (enabled) {
+ textColor = surface.format.RGBToColor(164, 164, 164);
+ } else {
+ textColor = surface.format.RGBToColor(96, 96, 96);
+ }
Common::U32String str = Common::convertUtf8ToUtf32(menuItems[lang].items[i]);
@@ -374,12 +383,11 @@ void ASpit::xarestoregame(const ArgumentArray &args) {
}
void ASpit::xaSaveGame(const ArgumentArray &args) {
- // Launch the load game dialog
_vm->runSaveDialog();
}
void ASpit::xaResumeGame(const ArgumentArray &args) {
-
+ _vm->resumeFromMainMenu();
}
void ASpit::xaOptions(const ArgumentArray &args) {