diff options
author | Max Horn | 2003-07-07 22:33:07 +0000 |
---|---|---|
committer | Max Horn | 2003-07-07 22:33:07 +0000 |
commit | 58486149a9e5beafc0b56e3f6c48d8a8bf3c7c78 (patch) | |
tree | 3dcac734ee3e28eeb77ece098c2053151f583cc2 | |
parent | b5a42396e7d0807c41f6ae6475b40ac67177d775 (diff) | |
download | scummvm-rg350-58486149a9e5beafc0b56e3f6c48d8a8bf3c7c78.tar.gz scummvm-rg350-58486149a9e5beafc0b56e3f6c48d8a8bf3c7c78.tar.bz2 scummvm-rg350-58486149a9e5beafc0b56e3f6c48d8a8bf3c7c78.zip |
fix for bug #766119: help screen: '.' is listed incorrectly
svn-id: r8848
-rw-r--r-- | scumm/dialogs.cpp | 5 | ||||
-rw-r--r-- | scumm/dialogs.h | 2 | ||||
-rw-r--r-- | scumm/help.cpp | 7 | ||||
-rw-r--r-- | scumm/help.h | 2 |
4 files changed, 7 insertions, 9 deletions
diff --git a/scumm/dialogs.cpp b/scumm/dialogs.cpp index d21defda32..19890f29d8 100644 --- a/scumm/dialogs.cpp +++ b/scumm/dialogs.cpp @@ -602,8 +602,7 @@ HelpDialog::HelpDialog(NewGui *gui, Scumm *scumm) : ScummDialog(gui, scumm, 15, 10, 290, 184) { _page = 1; - _gameId = scumm->_gameId; - _numPages = ScummHelp::numPages(_gameId); + _numPages = ScummHelp::numPages(scumm->_gameId); _prevButton = addPushButton(10, 160, "Previous", kPrevCmd, 'P'); _nextButton = addPushButton(90, 160, "Next", kNextCmd, 'N'); @@ -622,7 +621,7 @@ HelpDialog::HelpDialog(NewGui *gui, Scumm *scumm) void HelpDialog::displayKeyBindings() { String titleStr, *keyStr, *dscStr; - ScummHelp::updateStrings(_gameId, _page, titleStr, keyStr, dscStr); + ScummHelp::updateStrings(_scumm->_gameId, _scumm->_version, _page, titleStr, keyStr, dscStr); _title->setLabel(titleStr); for (int i = 0; i < HELP_NUM_LINES; i++) { diff --git a/scumm/dialogs.h b/scumm/dialogs.h index 573fbbaba2..d863ec7f41 100644 --- a/scumm/dialogs.h +++ b/scumm/dialogs.h @@ -104,8 +104,6 @@ protected: int _page; int _numPages; - byte _gameId; - void displayKeyBindings(); }; diff --git a/scumm/help.cpp b/scumm/help.cpp index 3f78953303..2df5ba9a47 100644 --- a/scumm/help.cpp +++ b/scumm/help.cpp @@ -55,11 +55,11 @@ int ScummHelp::numPages(byte gameId) { } } -#define ADD_BIND(k,d) key[i] = k; dsc[i] = d; i++; +#define ADD_BIND(k,d) do { key[i] = k; dsc[i] = d; i++; } while(0) #define ADD_TEXT(d) ADD_BIND("",d) #define ADD_LINE ADD_BIND("","") -void ScummHelp::updateStrings(byte gameId, int page, String &title, +void ScummHelp::updateStrings(byte gameId, byte version, int page, String &title, String *&key, String *&dsc) { key = new String[HELP_NUM_LINES]; dsc = new String[HELP_NUM_LINES]; @@ -68,7 +68,8 @@ void ScummHelp::updateStrings(byte gameId, int page, String &title, case 1: title = "Common keyboard commands:"; ADD_BIND("F5", "Save / Load dialog"); - ADD_BIND(".", "Skip line of text"); + if (version >= 5) + ADD_BIND(".", "Skip line of text"); ADD_BIND("Esc", "Skip cutscene"); ADD_BIND("Space", "Pause game"); ADD_BIND("Ctrl 0-9", "Load game state 1-10"); diff --git a/scumm/help.h b/scumm/help.h index c4383ca31a..945739e5cf 100644 --- a/scumm/help.h +++ b/scumm/help.h @@ -30,7 +30,7 @@ protected: public: static int numPages(byte gameId); - static void updateStrings(byte gameId, int page, String &title, + static void updateStrings(byte gameId, byte version, int page, String &title, String *&key, String *&dsc); }; |