aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2012-02-23 07:43:16 +0100
committerStrangerke2012-04-06 08:21:49 +0200
commitf4a8434d8f59b7df60c5f4c10f598940be4e266a (patch)
treee476faecb8f2d735ea9b324dc00cbb632ed8da64
parentc6f90f2d2732553de6e71ba86edc6c335aa8ee46 (diff)
downloadscummvm-rg350-f4a8434d8f59b7df60c5f4c10f598940be4e266a.tar.gz
scummvm-rg350-f4a8434d8f59b7df60c5f4c10f598940be4e266a.tar.bz2
scummvm-rg350-f4a8434d8f59b7df60c5f4c10f598940be4e266a.zip
MORTEVIELLE: Fix a bug in decodeAlertDetails
-rw-r--r--engines/mortevielle/dialogs.cpp8
-rw-r--r--engines/mortevielle/dialogs.h2
2 files changed, 6 insertions, 4 deletions
diff --git a/engines/mortevielle/dialogs.cpp b/engines/mortevielle/dialogs.cpp
index c58f6b3309..b332c7e94c 100644
--- a/engines/mortevielle/dialogs.cpp
+++ b/engines/mortevielle/dialogs.cpp
@@ -190,17 +190,19 @@ int Alert::show(const Common::String &msg, int n) {
* Alert function - Decode Alert Details
* @remarks Originally called 'decod'
*/
-void Alert::decodeAlertDetails(Common::String s, int &nbc, int &lineNumb, int &col, Common::String &c, Common::String &cs) {
+void Alert::decodeAlertDetails(Common::String s, int &choiceNumb, int &lineNumb, int &col, Common::String &c, Common::String &cs) {
int i, k;
bool v;
//val(s[2], nbc, i);
- nbc = atoi(s.c_str() + 1);
+ choiceNumb = atoi(s.c_str() + 1);
i = 0;
c = "";
lineNumb = 0;
- i = 5;
+
+ // Originally set to 5, decreased to 4 because strings are 0 based, and not 1 based as in Pascal
+ i = 4;
k = 0;
v = true;
col = 0;
diff --git a/engines/mortevielle/dialogs.h b/engines/mortevielle/dialogs.h
index a8c0cb7cf7..c4d4ab266f 100644
--- a/engines/mortevielle/dialogs.h
+++ b/engines/mortevielle/dialogs.h
@@ -34,7 +34,7 @@ namespace Mortevielle {
class Alert {
private:
- static void decodeAlertDetails(Common::String s, int &nbc, int &nbl, int &col, Common::String &c, Common::String &cs);
+ static void decodeAlertDetails(Common::String s, int &choiceNumb, int &lineNumb, int &col, Common::String &c, Common::String &cs);
static void setPosition(int ji, int coldep, int esp);
static void drawAlertBox(int lidep, int nli, int tx);
static void setButtonText(Common::String c, int coldep, int nbcase, Common::String *str, int esp);