aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/he/intern_he.h2
-rw-r--r--engines/scumm/he/script_v100he.cpp23
-rw-r--r--engines/scumm/he/script_v90he.cpp2
-rw-r--r--engines/scumm/scumm.cpp2
4 files changed, 16 insertions, 13 deletions
diff --git a/engines/scumm/he/intern_he.h b/engines/scumm/he/intern_he.h
index df62c59dd8..06e6b249f6 100644
--- a/engines/scumm/he/intern_he.h
+++ b/engines/scumm/he/intern_he.h
@@ -440,7 +440,7 @@ protected:
byte filename[260];
int32 status;
int32 flags;
- int32 unk2;
+ int32 number;
int32 wizResNum;
};
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp
index 7d56138247..1ee46a20b3 100644
--- a/engines/scumm/he/script_v100he.cpp
+++ b/engines/scumm/he/script_v100he.cpp
@@ -2236,40 +2236,43 @@ void ScummEngine_v100he::o100_videoOps() {
byte subOp = fetchScriptByte();
switch (subOp) {
- case 0:
+ case 0: // SO_INIT
memset(_videoParams.filename, 0, sizeof(_videoParams.filename));
_videoParams.status = 0;
_videoParams.flags = 0;
- _videoParams.unk2 = pop();
+ _videoParams.number = pop();
_videoParams.wizResNum = 0;
+
+ if (_videoParams.number != 1 && _videoParams.number != -1)
+ warning("o100_videoOps: number: %d", _videoParams.number);
break;
- case 19:
+ case 19: // SO_CLOSE
_videoParams.status = 19;
break;
- case 40:
+ case 40: // SO_IMAGE
_videoParams.wizResNum = pop();
if (_videoParams.wizResNum)
_videoParams.flags |= 2;
break;
- case 47:
+ case 47: // SO_LOAD
copyScriptString(_videoParams.filename, sizeof(_videoParams.filename));
_videoParams.status = 47;
break;
- case 67:
+ case 67: // SO_SET_FLAGS
_videoParams.flags |= pop();
break;
- case 92:
- if (_videoParams.status == 47) {
+ case 92: // SO_END
+ if (_videoParams.status == 47) { // SO_LOAD
// Start video
if (_videoParams.flags == 0)
_videoParams.flags = 4;
- if (_videoParams.flags == 2) {
+ if (_videoParams.flags & 2) {
VAR(119) = _moviePlay->load(convertFilePath(_videoParams.filename), _videoParams.flags, _videoParams.wizResNum);
} else {
VAR(119) = _moviePlay->load(convertFilePath(_videoParams.filename), _videoParams.flags);
}
- } else if (_videoParams.status == 19) {
+ } else if (_videoParams.status == 19) { // SO_CLOSE
// Stop video
_moviePlay->close();
}
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index f2d92bc2ca..f63973e3f1 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -1412,7 +1412,7 @@ void ScummEngine_v90he::o90_videoOps() {
memset(_videoParams.filename, 0, sizeof(_videoParams.filename));
_videoParams.status = 0;
_videoParams.flags = 0;
- _videoParams.unk2 = pop();
+ _videoParams.number = pop();
_videoParams.wizResNum = 0;
break;
case 14:
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 40f636c18f..1f8a85b8c3 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -882,7 +882,7 @@ ScummEngine_v90he::ScummEngine_v90he(OSystem *syst, const DetectorResult &dr)
memset(_videoParams.filename, 0, sizeof(_videoParams.filename));
_videoParams.status = 0;
_videoParams.flags = 0;
- _videoParams.unk2 = 0;
+ _videoParams.number = 0;
_videoParams.wizResNum = 0;
VAR_NUM_SPRITE_GROUPS = 0xFF;