[Scummvm-cvs-logs] scummvm master -> 6959ee22e4451bca5d15141028777e4d63377401
Strangerke
arnaud.boutonne at gmail.com
Mon Apr 25 14:29:06 CEST 2011
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:
6959ee22e4 HUGO: Fix bug #3292400 : Overlapping help windows when using the menu bar
Commit: 6959ee22e4451bca5d15141028777e4d63377401
https://github.com/scummvm/scummvm/commit/6959ee22e4451bca5d15141028777e4d63377401
Author: strangerke (arnaud.boutonne at gmail.com)
Date: 2011-04-25T05:28:19-07:00
Commit Message:
HUGO: Fix bug #3292400 : Overlapping help windows when using the menu bar
Changed paths:
engines/hugo/dialogs.cpp
engines/hugo/hugo.cpp
engines/hugo/hugo.h
engines/hugo/parser.cpp
diff --git a/engines/hugo/dialogs.cpp b/engines/hugo/dialogs.cpp
index 096cea8..50fcfa2 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 32247be..7a42ca2 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 0a8325f..b2d241f 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 9cfdd1a..19cd4a3 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;
More information about the Scummvm-git-logs
mailing list