aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorMax Horn2009-04-19 00:59:50 +0000
committerMax Horn2009-04-19 00:59:50 +0000
commit9655fa831e74bbce015a8d7c03790df78c9d911a (patch)
tree78dab4f49562072823830e5ca1bf6455148f42ab /engines/scumm
parent56a31019b7fad58454061e05ec8209d60714597f (diff)
downloadscummvm-rg350-9655fa831e74bbce015a8d7c03790df78c9d911a.tar.gz
scummvm-rg350-9655fa831e74bbce015a8d7c03790df78c9d911a.tar.bz2
scummvm-rg350-9655fa831e74bbce015a8d7c03790df78c9d911a.zip
SCUMM: Turned PARAM_1,2,3 into an enum; minor tweaks
svn-id: r40008
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/script_v0.cpp8
-rw-r--r--engines/scumm/script_v2.cpp8
-rw-r--r--engines/scumm/script_v5.cpp14
-rw-r--r--engines/scumm/scumm_v5.h6
4 files changed, 8 insertions, 28 deletions
diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp
index fcd2556905..f43d3ae26b 100644
--- a/engines/scumm/script_v0.cpp
+++ b/engines/scumm/script_v0.cpp
@@ -359,10 +359,6 @@ void ScummEngine_v0::setupOpcodes() {
#define SENTENCE_SCRIPT 2
-#define PARAM_1 0x80
-#define PARAM_2 0x40
-#define PARAM_3 0x20
-
int ScummEngine_v0::getVarOrDirectWord(byte mask) {
return getVarOrDirectByte(mask);
}
@@ -1037,8 +1033,4 @@ void ScummEngine_v0::resetSentence() {
_activeVerb = 13;
}
-#undef PARAM_1
-#undef PARAM_2
-#undef PARAM_3
-
} // End of namespace Scumm
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 57d79438b6..fcb3878eb4 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -361,10 +361,6 @@ void ScummEngine_v2::setupOpcodes() {
#define SENTENCE_SCRIPT 2
-#define PARAM_1 0x80
-#define PARAM_2 0x40
-#define PARAM_3 0x20
-
int ScummEngine_v2::getVar() {
return readVar(fetchScriptByte());
}
@@ -1626,8 +1622,4 @@ void ScummEngine_v2::runInventoryScript(int i) {
redrawV2Inventory();
}
-#undef PARAM_1
-#undef PARAM_2
-#undef PARAM_3
-
} // End of namespace Scumm
diff --git a/engines/scumm/script_v5.cpp b/engines/scumm/script_v5.cpp
index ce4ef3dbe8..7e805c0c63 100644
--- a/engines/scumm/script_v5.cpp
+++ b/engines/scumm/script_v5.cpp
@@ -362,10 +362,6 @@ void ScummEngine_v5::setupOpcodes() {
OPCODE(0xff, o5_drawBox);
}
-#define PARAM_1 0x80
-#define PARAM_2 0x40
-#define PARAM_3 0x20
-
int ScummEngine_v5::getVar() {
return readVar(fetchScriptWord());
}
@@ -2294,7 +2290,7 @@ void ScummEngine_v5::o5_setVarRange() {
_resultVarNumber++;
} while (--a);
- // Macintosh verison of indy3ega used different interface, so adjust values.
+ // Macintosh version of indy3ega used different interface, so adjust values.
if (_game.id == GID_INDY3 && _game.platform == Common::kPlatformMacintosh) {
VAR(68) = 0;
VAR(69) = 0;
@@ -2745,9 +2741,7 @@ void ScummEngine_v5::o5_wait() {
if (_sentenceNum) {
if (_sentence[_sentenceNum - 1].freezeCount && !isScriptInUse(VAR(VAR_SENTENCE_SCRIPT)))
return;
- break;
- }
- if (!isScriptInUse(VAR(VAR_SENTENCE_SCRIPT)))
+ } else if (!isScriptInUse(VAR(VAR_SENTENCE_SCRIPT)))
return;
break;
default:
@@ -3082,8 +3076,4 @@ void ScummEngine_v5::o5_pickupObjectOld() {
runInventoryScript(1);
}
-#undef PARAM_1
-#undef PARAM_2
-#undef PARAM_3
-
} // End of namespace Scumm
diff --git a/engines/scumm/scumm_v5.h b/engines/scumm/scumm_v5.h
index 71f5ae22c1..57b8244136 100644
--- a/engines/scumm/scumm_v5.h
+++ b/engines/scumm/scumm_v5.h
@@ -44,6 +44,12 @@ protected:
char _saveLoadVarsFilename[256];
+ enum {
+ PARAM_1 = 0x80,
+ PARAM_2 = 0x40,
+ PARAM_3 = 0x20
+ };
+
public:
ScummEngine_v5(OSystem *syst, const DetectorResult &dr);