aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/insane/insane.h21
-rw-r--r--engines/scumm/insane/insane_iact.cpp76
-rw-r--r--engines/scumm/smush/smush_player.cpp21
3 files changed, 50 insertions, 68 deletions
diff --git a/engines/scumm/insane/insane.h b/engines/scumm/insane/insane.h
index 522636d519..1f0a65666a 100644
--- a/engines/scumm/insane/insane.h
+++ b/engines/scumm/insane/insane.h
@@ -64,7 +64,8 @@ class Insane {
void procPostRendering(byte *renderBitmap, int32 codecparam, int32 setupsan12,
int32 setupsan13, int32 curFrame, int32 maxFrame);
void procIACT(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags);
+ int32 setupsan13, Chunk &b, int32 size, int32 flags, int16 par1,
+ int16 par2, int16 par3, int16 par4);
void procSKIP(Chunk &b);
void escapeKeyHandler(void);
@@ -431,17 +432,23 @@ class Insane {
void ouchSoundEnemy(void);
bool weaponEnemyIsEffective(void);
void iactScene1(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags);
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 par1, int16 par2, int16 par3, int16 par4);
void iactScene3(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags);
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 command, int16 par1, int16, int16);
void iactScene4(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags);
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 par1, int16 par2, int16 par3, int16 par4);
void iactScene6(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags);
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 par1, int16 par2, int16 par3, int16 par4);
void iactScene17(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags);
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 par1, int16 par2, int16 par3, int16 par4);
void iactScene21(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags);
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 par1, int16 par2, int16 par3, int16 par4);
bool isBitSet(int n);
void setBit(int n);
void clearBit(int n);
diff --git a/engines/scumm/insane/insane_iact.cpp b/engines/scumm/insane/insane_iact.cpp
index dadb6d2572..879c4d4987 100644
--- a/engines/scumm/insane/insane_iact.cpp
+++ b/engines/scumm/insane/insane_iact.cpp
@@ -36,44 +36,39 @@
namespace Scumm {
void Insane::procIACT(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags) {
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 par1, int16 par2, int16 par3, int16 par4) {
if (_keyboardDisable)
return;
switch (_currSceneId) {
case 1:
- iactScene1(renderBitmap, codecparam, setupsan12, setupsan13, b, size, flags);
+ iactScene1(renderBitmap, codecparam, setupsan12, setupsan13, b, size, flags, par1, par2, par3, par4);
break;
case 3:
case 13:
- iactScene3(renderBitmap, codecparam, setupsan12, setupsan13, b, size, flags);
+ iactScene3(renderBitmap, codecparam, setupsan12, setupsan13, b, size, flags, par1, par2, par3, par4);
break;
case 4:
case 5:
- iactScene4(renderBitmap, codecparam, setupsan12, setupsan13, b, size, flags);
+ iactScene4(renderBitmap, codecparam, setupsan12, setupsan13, b, size, flags, par1, par2, par3, par4);
break;
case 6:
- iactScene6(renderBitmap, codecparam, setupsan12, setupsan13, b, size, flags);
+ iactScene6(renderBitmap, codecparam, setupsan12, setupsan13, b, size, flags, par1, par2, par3, par4);
break;
case 17:
- iactScene17(renderBitmap, codecparam, setupsan12, setupsan13, b, size, flags);
+ iactScene17(renderBitmap, codecparam, setupsan12, setupsan13, b, size, flags, par1, par2, par3, par4);
break;
case 21:
- iactScene21(renderBitmap, codecparam, setupsan12, setupsan13, b, size, flags);
+ iactScene21(renderBitmap, codecparam, setupsan12, setupsan13, b, size, flags, par1, par2, par3, par4);
break;
}
}
void Insane::iactScene1(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags) {
- _player->checkBlock(b, TYPE_IACT, 8);
-
- int16 par1, par2, par3, par4, par5, par6, par7, par9, par11, par13, tmp;
-
- par1 = b.getWord(); // cx
- par2 = b.getWord(); // dx
- par3 = b.getWord(); // si
- par4 = b.getWord(); // bx
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 par1, int16 par2, int16 par3, int16 par4) {
+ int16 par5, par6, par7, par9, par11, par13, tmp;
switch (par1) {
case 2: // PATCH
@@ -298,16 +293,11 @@ void Insane::removeEnemyFromMetList(int32 enemy1) {
}
void Insane::iactScene3(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags) {
- _player->checkBlock(b, TYPE_IACT, 8);
-
- int command, par1, par2, par3, tmp;
- command = b.getWord();
- par1 = b.getWord();
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 command, int16 par1, int16, int16) {
+ int par2, par3;
if (command == 6) {
if (par1 == 9) {
- tmp = b.getWord(); // ptr + 4
- tmp = b.getWord(); // ptr + 6
par2 = b.getWord(); // ptr + 8
par3 = b.getWord(); // ptr + 10
@@ -326,15 +316,9 @@ void Insane::iactScene3(byte *renderBitmap, int32 codecparam, int32 setupsan12,
}
void Insane::iactScene4(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags) {
- _player->checkBlock(b, TYPE_IACT, 8);
-
- int16 par1, par2, par3, par4, par5;
-
- par1 = b.getWord(); // edx
- par2 = b.getWord(); // bx
- par3 = b.getWord();
- par4 = b.getWord(); // cx
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 par1, int16 par2, int16 par3, int16 par4) {
+ int16 par5;
switch (par1) {
case 2:
@@ -408,15 +392,9 @@ void Insane::iactScene4(byte *renderBitmap, int32 codecparam, int32 setupsan12,
}
void Insane::iactScene6(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags) {
- _player->checkBlock(b, TYPE_IACT, 8);
-
- int16 par1, par2, par3, par4, par5;
-
- par1 = b.getWord();
- par2 = b.getWord(); // bx
- par3 = b.getWord();
- par4 = b.getWord();
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 par1, int16 par2, int16 par3, int16 par4) {
+ int16 par5;
switch (par1) {
case 7:
@@ -499,15 +477,8 @@ void Insane::iactScene6(byte *renderBitmap, int32 codecparam, int32 setupsan12,
}
void Insane::iactScene17(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags) {
- _player->checkBlock(b, TYPE_IACT, 8);
- int16 par1, par2, par3, par4;
-
- par1 = b.getWord(); // dx
- par2 = b.getWord(); // cx
- par3 = b.getWord(); // di
- par4 = b.getWord();
-
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 par1, int16 par2, int16 par3, int16 par4) {
switch (par1) {
case 2:
case 3:
@@ -552,7 +523,8 @@ void Insane::iactScene17(byte *renderBitmap, int32 codecparam, int32 setupsan12,
}
void Insane::iactScene21(byte *renderBitmap, int32 codecparam, int32 setupsan12,
- int32 setupsan13, Chunk &b, int32 size, int32 flags) {
+ int32 setupsan13, Chunk &b, int32 size, int32 flags,
+ int16 par1, int16 par2, int16 par3, int16 par4) {
// void implementation
}
diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp
index 7bdc70450d..6980274592 100644
--- a/engines/scumm/smush/smush_player.cpp
+++ b/engines/scumm/smush/smush_player.cpp
@@ -432,13 +432,22 @@ void SmushPlayer::handleFetch(Chunk &b) {
void SmushPlayer::handleIACT(Chunk &b) {
checkBlock(b, TYPE_IACT, 8);
- debugC(DEBUG_SMUSH, "SmushPlayer::handleImuseAction()");
+ debugC(DEBUG_SMUSH, "SmushPlayer::IACT()");
- /* int code = */ b.getWord();
+ int code = b.getWord();
int flags = b.getWord();
int unknown = b.getShort();
int track_flags = b.getWord();
+ if ((code != 8) && (flags != 46)) {
+ _vm->_insane->procIACT(_dst, 0, 0, 0, b, 0, 0, code, flags, unknown, track_flags);
+ return;
+ }
+
+ if (_compressedFileMode) {
+ return;
+ }
+
assert(flags == 46 && unknown == 0);
int track_id = b.getWord();
int index = b.getWord();
@@ -973,13 +982,7 @@ void SmushPlayer::handleFrame(Chunk &b) {
handleDeltaPalette(*sub);
break;
case TYPE_IACT:
- // FIXME: check parameters
- if (_insanity)
- _vm->_insane->procIACT(_dst, 0, 0, 0, *sub, 0, 0);
- else {
- if (!_compressedFileMode)
- handleIACT(*sub);
- }
+ handleIACT(*sub);
break;
case TYPE_STOR:
handleStore(*sub);