[Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.58,1.59 dialogs.h,1.18,1.19 help.cpp,1.3,1.4 help.h,1.1,1.2
Max Horn
fingolfin at users.sourceforge.net
Mon Jul 7 15:34:02 CEST 2003
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv21438
Modified Files:
dialogs.cpp dialogs.h help.cpp help.h
Log Message:
fix for bug #766119: help screen: '.' is listed incorrectly
Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- dialogs.cpp 5 Jul 2003 11:25:12 -0000 1.58
+++ dialogs.cpp 7 Jul 2003 22:33:07 -0000 1.59
@@ -602,8 +602,7 @@
: 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 @@
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++) {
Index: dialogs.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- dialogs.h 14 Jun 2003 21:18:14 -0000 1.18
+++ dialogs.h 7 Jul 2003 22:33:07 -0000 1.19
@@ -104,8 +104,6 @@
int _page;
int _numPages;
- byte _gameId;
-
void displayKeyBindings();
};
Index: help.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/help.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- help.cpp 15 Jun 2003 11:32:14 -0000 1.3
+++ help.cpp 7 Jul 2003 22:33:07 -0000 1.4
@@ -55,11 +55,11 @@
}
}
-#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 @@
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");
Index: help.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/help.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- help.h 14 Jun 2003 21:18:14 -0000 1.1
+++ help.h 7 Jul 2003 22:33:07 -0000 1.2
@@ -30,7 +30,7 @@
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);
};
More information about the Scummvm-git-logs
mailing list