aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstrangerke2011-04-25 14:28:19 +0200
committerstrangerke2011-04-25 14:28:19 +0200
commit6959ee22e4451bca5d15141028777e4d63377401 (patch)
tree8fd99c80b362bec6d889b790e3ef9b3599205474
parentaaff18cd3853011c3504e3b96ad69c92d2488de1 (diff)
downloadscummvm-rg350-6959ee22e4451bca5d15141028777e4d63377401.tar.gz
scummvm-rg350-6959ee22e4451bca5d15141028777e4d63377401.tar.bz2
scummvm-rg350-6959ee22e4451bca5d15141028777e4d63377401.zip
HUGO: Fix bug #3292400 : Overlapping help windows when using the menu bar
-rw-r--r--engines/hugo/dialogs.cpp3
-rw-r--r--engines/hugo/hugo.cpp10
-rw-r--r--engines/hugo/hugo.h3
-rw-r--r--engines/hugo/parser.cpp2
4 files changed, 11 insertions, 7 deletions
diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp
index 096cea8a72..50fcfa27db 100644
--- a/engines/hugo/dialogs.cpp
+++ b/engines/hugo/dialogs.cpp
@@ -165,7 +165,8 @@ void TopMenu::handleCommand(GUI::CommandSender *sender, uint32 command, uint32 d
switch (command) {
case kCmdWhat:
close();
- _vm->_file->instructions();
+ _vm->getGameStatus().helpFl = true;
+
break;
case kCmdMusic:
_vm->_sound->toggleMusic();
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 32247be2da..7a42ca2ebe 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -298,6 +298,10 @@ Common::Error HugoEngine::run() {
break;
}
}
+ if (_status.helpFl) {
+ _status.helpFl = false;
+ _file->instructions();
+ }
_mouse->mouseHandler(); // Mouse activity - adds to display list
_screen->displayList(kDisplayDisplay); // Blit the display list to screen
@@ -323,9 +327,6 @@ void HugoEngine::initMachine() {
*/
void HugoEngine::runMachine() {
status_t &gameStatus = getGameStatus();
- // Don't process if we're in a textbox
- if (gameStatus.textBoxFl)
- return;
// Don't process if gameover
if (gameStatus.gameOverFl)
@@ -531,13 +532,13 @@ void HugoEngine::initStatus() {
debugC(1, kDebugEngine, "initStatus");
_status.storyModeFl = false; // Not in story mode
_status.gameOverFl = false; // Hero not knobbled yet
- _status.textBoxFl = false; // Not processing a text box
_status.lookFl = false; // Toolbar "look" button
_status.recallFl = false; // Toolbar "recall" button
_status.newScreenFl = false; // Screen not just loaded
_status.godModeFl = false; // No special cheats allowed
_status.doQuitFl = false;
_status.skipIntroFl = false;
+ _status.helpFl = false;
// Initialize every start of new game
_status.tick = 0; // Tick count
@@ -554,6 +555,7 @@ void HugoEngine::initStatus() {
// _status.screenWidth = 0; // Desktop screen width
// _status.saveTick = 0; // Time of last save
// _status.saveSlot = 0; // Slot to save/restore game
+// _status.textBoxFl = false; // Not processing a text box
}
/**
diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h
index 0a8325f439..b2d241f241 100644
--- a/engines/hugo/hugo.h
+++ b/engines/hugo/hugo.h
@@ -176,13 +176,13 @@ struct HugoGameDescription;
struct status_t { // Game status (not saved)
bool storyModeFl; // Game is telling story - no commands
bool gameOverFl; // Game is over - hero knobbled
- bool textBoxFl; // Game is (halted) in text box
bool lookFl; // Toolbar "look" button pressed
bool recallFl; // Toolbar "recall" button pressed
bool newScreenFl; // New screen just loaded in dib_a
bool godModeFl; // Allow DEBUG features in live version
bool doQuitFl;
bool skipIntroFl;
+ bool helpFl;
uint32 tick; // Current time in ticks
vstate_t viewState; // View state machine
int16 song; // Current song
@@ -194,6 +194,7 @@ struct status_t { // Game status (not saved)
// bool helpFl; // Calling WinHelp (don't disable music)
// bool mmtimeFl; // Multimedia timer supported
// bool demoFl; // Game is in demo mode
+// bool textBoxFl; // Game is (halted) in text box
// int16 screenWidth; // Desktop screen width
// int16 saveSlot; // Current slot to save/restore game
// int16 cx, cy; // Cursor position (dib coords)
diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp
index 9cfdd1a41d..19cd4a333c 100644
--- a/engines/hugo/parser.cpp
+++ b/engines/hugo/parser.cpp
@@ -340,7 +340,7 @@ void Parser::keyHandler(Common::Event event) {
break;
case Common::KEYCODE_F1: // User Help (DOS)
if (_checkDoubleF1Fl)
- _vm->_file->instructions();
+ gameStatus.helpFl = true;
else
_vm->_screen->userHelp();
_checkDoubleF1Fl = !_checkDoubleF1Fl;