aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/intern.h11
-rw-r--r--scumm/script_v6.cpp2
-rw-r--r--scumm/scumm.h8
-rw-r--r--scumm/vars.cpp11
4 files changed, 20 insertions, 12 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 23f47d887e..fb280d1ede 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -207,6 +207,8 @@ protected:
virtual void executeOpcode(int i);
virtual const char *getOpcodeDesc(int i);
+ virtual void setupScummVars();
+
int popRoomAndObj(int *room);
virtual void decodeParseString(int a, int b);
@@ -372,6 +374,15 @@ protected:
void o6_findAllObjects();
void o6_pickVarRandom();
void o6_getDateTime();
+
+ byte VAR_VIDEONAME;
+
+ byte VAR_TIMEDATE_YEAR;
+ byte VAR_TIMEDATE_MONTH;
+ byte VAR_TIMEDATE_DAY;
+ byte VAR_TIMEDATE_HOUR;
+ byte VAR_TIMEDATE_MINUTE;
+ byte VAR_TIMEDATE_SECOND;
};
class Scumm_v7 : public Scumm_v6
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 8039c1515b..f71fcbbd24 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -2979,7 +2979,7 @@ void Scumm_v6::o6_getDateTime()
_vars[VAR_TIMEDATE_MINUTE] = t->tm_min;
if (_features & GF_AFTER_V8)
- _vars[VAR_TIMEDATE_SECOND] = t->tm_sec;
+ _vars[VAR_TIMEDATE_SECOND] = t->tm_sec;
}
void Scumm_v6::decodeParseString(int m, int n)
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 27e20cb11d..eeb8c7b208 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -1106,15 +1106,7 @@ public:
byte VAR_CHARSET_MASK;
byte VAR_CUSTOMSCALETABLE;
- byte VAR_VIDEONAME;
byte VAR_V6_SOUNDMODE;
-
- byte VAR_TIMEDATE_YEAR;
- byte VAR_TIMEDATE_MONTH;
- byte VAR_TIMEDATE_DAY;
- byte VAR_TIMEDATE_HOUR;
- byte VAR_TIMEDATE_MINUTE;
- byte VAR_TIMEDATE_SECOND;
};
// This is a constant lookup table of reverse bit masks
diff --git a/scumm/vars.cpp b/scumm/vars.cpp
index 839f134bd0..31c8950b56 100644
--- a/scumm/vars.cpp
+++ b/scumm/vars.cpp
@@ -108,17 +108,22 @@ void Scumm::setupScummVars()
VAR_V6_SCREEN_HEIGHT = 54;
VAR_V6_EMSSPACE = 76;
VAR_V6_RANDOM_NR = 118;
+
+ VAR_V6_SOUNDMODE = 9;
+}
+
+void Scumm_v6::setupScummVars()
+{
+ // Many vars are the same as in V5 games, so just call the inherited method first
+ Scumm::setupScummVars();
VAR_TIMEDATE_YEAR = 119;
VAR_TIMEDATE_MONTH = 129;
VAR_TIMEDATE_DAY = 128;
VAR_TIMEDATE_HOUR = 125;
VAR_TIMEDATE_MINUTE = 126;
-
- VAR_V6_SOUNDMODE = 9;
}
-
void Scumm_v7::setupScummVars()
{
VAR_MOUSE_X = 1;