aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/intern.h11
-rw-r--r--scumm/script_v6.cpp8
-rw-r--r--scumm/scumm.h2
-rw-r--r--scumm/scummvm.cpp5
-rw-r--r--scumm/vars.cpp19
5 files changed, 20 insertions, 25 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 29a5d86065..efd5aaf06e 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -49,8 +49,8 @@ protected:
virtual const char *getOpcodeDesc(byte i);
virtual void setupScummVars();
-
virtual void decodeParseString();
+
int getWordVararg(int *ptr);
void saveVars();
void loadVars();
@@ -208,7 +208,6 @@ protected:
virtual const char *getOpcodeDesc(byte i);
virtual void setupScummVars();
-
virtual void decodeParseString();
virtual int getVar();
@@ -331,6 +330,8 @@ protected:
public:
ScummEngine_v6(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs) : ScummEngine(detector, syst, gs) {
VAR_VIDEONAME = 0xFF;
+ VAR_RANDOM_NR = 0xFF;
+ VAR_STRING2DRAW = 0xFF;
VAR_TIMEDATE_YEAR = 0xFF;
VAR_TIMEDATE_MONTH = 0xFF;
@@ -346,11 +347,10 @@ protected:
virtual const char *getOpcodeDesc(byte i);
virtual void setupScummVars();
+ virtual void decodeParseString(int a, int b);
virtual void palManipulateInit(int resID, int start, int end, int time);
- virtual void decodeParseString(int a, int b);
-
int getStackList(int *args, uint maxnum);
int popRoomAndObj(int *room);
void shuffleArray(int num, int minIdx, int maxIdx);
@@ -531,6 +531,8 @@ protected:
void o6_readINI();
byte VAR_VIDEONAME;
+ byte VAR_RANDOM_NR;
+ byte VAR_STRING2DRAW;
byte VAR_TIMEDATE_YEAR;
byte VAR_TIMEDATE_MONTH;
@@ -572,7 +574,6 @@ protected:
virtual const char *getOpcodeDesc(byte i);
virtual void setupScummVars();
-
virtual void decodeParseString(int m, int n);
virtual uint fetchScriptWord();
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp
index 7d1495cc51..545b5a2921 100644
--- a/scumm/script_v6.cpp
+++ b/scumm/script_v6.cpp
@@ -1190,8 +1190,8 @@ void ScummEngine_v6::o6_loadRoomWithEgo() {
void ScummEngine_v6::o6_getRandomNumber() {
int rnd;
rnd = _rnd.getRandomNumber(pop());
- if (VAR_V6_RANDOM_NR != 0xFF)
- VAR(VAR_V6_RANDOM_NR) = rnd;
+ if (VAR_RANDOM_NR != 0xFF)
+ VAR(VAR_RANDOM_NR) = rnd;
push(rnd);
}
@@ -1199,8 +1199,8 @@ void ScummEngine_v6::o6_getRandomNumberRange() {
int max = pop();
int min = pop();
int rnd = _rnd.getRandomNumberRng(min, max);
- if (VAR_V6_RANDOM_NR != 0xFF)
- VAR(VAR_V6_RANDOM_NR) = rnd;
+ if (VAR_RANDOM_NR != 0xFF)
+ VAR(VAR_RANDOM_NR) = rnd;
push(rnd);
}
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 88863deb02..1c214d0aff 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -1008,7 +1008,6 @@ protected:
bool _demoMode;
bool _confirmExit;
-public:
Insane *_insane;
public:
@@ -1173,7 +1172,6 @@ public:
byte VAR_USERPUT;
byte VAR_SOUNDRESULT;
byte VAR_TALKSTOP_KEY;
- byte VAR_59;
byte VAR_NOSUBTITLES;
byte VAR_SOUNDPARAM;
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 13cbcae998..a60e41a46e 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -551,7 +551,6 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
VAR_USERPUT = 0xFF;
VAR_SOUNDRESULT = 0xFF;
VAR_TALKSTOP_KEY = 0xFF;
- VAR_59 = 0xFF;
VAR_NOSUBTITLES = 0xFF;
VAR_SOUNDPARAM = 0xFF;
@@ -570,9 +569,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
VAR_V6_SCREEN_WIDTH = 0xFF;
VAR_V6_SCREEN_HEIGHT = 0xFF;
VAR_V6_EMSSPACE = 0xFF;
- VAR_V6_RANDOM_NR = 0xFF;
- VAR_STRING2DRAW = 0xFF;
VAR_CAMERA_POS_Y = 0xFF;
VAR_CAMERA_MIN_Y = 0xFF;
@@ -1225,7 +1222,7 @@ void ScummEngine::initScummVars() {
if (_version >= 6 && VAR_V6_EMSSPACE != 0xFF)
VAR(VAR_V6_EMSSPACE) = 10000;
- VAR(VAR_59) = 3;
+ VAR(59) = 3; // FIXME: What is this good for?
}
if ((_features & GF_MACINTOSH) && (_version == 3)) {
diff --git a/scumm/vars.cpp b/scumm/vars.cpp
index ab2880c897..4fab7884de 100644
--- a/scumm/vars.cpp
+++ b/scumm/vars.cpp
@@ -81,7 +81,6 @@ void ScummEngine::setupScummVars() {
VAR_USERPUT = 53;
VAR_SOUNDRESULT = 56;
VAR_TALKSTOP_KEY = 57;
- VAR_59 = 59;
VAR_NOSUBTITLES = 60; // for loomcd
VAR_SOUNDPARAM = 64;
@@ -151,7 +150,7 @@ void ScummEngine_v6::setupScummVars() {
VAR_V6_SCREEN_WIDTH = 41;
VAR_V6_SCREEN_HEIGHT = 54;
VAR_V6_EMSSPACE = 76;
- VAR_V6_RANDOM_NR = 118;
+ VAR_RANDOM_NR = 118;
VAR_V6_SOUNDMODE = 9;
@@ -187,7 +186,7 @@ void ScummEngine_v7::setupScummVars() {
VAR_PERFORMANCE_2 = 27;
VAR_GAME_LOADED = 29;
VAR_V6_EMSSPACE = 32;
- VAR_V6_RANDOM_NR = 34;
+ VAR_RANDOM_NR = 34;
VAR_NEW_ROOM = 35;
VAR_WALKTO_OBJ = 36;
@@ -303,6 +302,13 @@ void ScummEngine_v8::setupScummVars() {
VAR_MAINMENU_KEY = 65;
VAR_TALKSTOP_KEY = 67;
+ VAR_CUSTOMSCALETABLE = 111;
+
+ VAR_TIMER_NEXT = 112;
+ VAR_TMR_1 = 113;
+ VAR_TMR_2 = 114;
+ VAR_TMR_3 = 115;
+
VAR_CAMERA_MIN_X = 116;
VAR_CAMERA_MAX_X = 117;
VAR_CAMERA_MIN_Y = 118;
@@ -314,13 +320,6 @@ void ScummEngine_v8::setupScummVars() {
VAR_CAMERA_THRESHOLD_X = 124;
VAR_CAMERA_THRESHOLD_Y = 125;
- VAR_CUSTOMSCALETABLE = 111;
-
- VAR_TIMER_NEXT = 112;
- VAR_TMR_1 = 113;
- VAR_TMR_2 = 114;
- VAR_TMR_3 = 115;
-
VAR_EGO = 126;
VAR_DEBUGMODE = 130;