aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTravis Howell2006-03-12 00:53:30 +0000
committerTravis Howell2006-03-12 00:53:30 +0000
commitf9797f3ac39008d571e8744c38e1eb1d39aec198 (patch)
tree07939ff293905c91baa2bc0cf0eadf7abd304f02 /engines
parent5bd5cef6cf80dff1db3399a3fa90078629874cab (diff)
downloadscummvm-rg350-f9797f3ac39008d571e8744c38e1eb1d39aec198.tar.gz
scummvm-rg350-f9797f3ac39008d571e8744c38e1eb1d39aec198.tar.bz2
scummvm-rg350-f9797f3ac39008d571e8744c38e1eb1d39aec198.zip
Correct mistake in md5 tables for Simon the Sorcerer 2 (DOS Floppy)
svn-id: r21219
Diffstat (limited to 'engines')
-rw-r--r--engines/scumm/he/script_v100he.cpp2
-rw-r--r--engines/scumm/he/script_v72he.cpp4
-rw-r--r--engines/scumm/he/sound_he.cpp11
-rw-r--r--engines/scumm/he/sprite_he.cpp4
-rw-r--r--engines/scumm/script.cpp51
-rw-r--r--engines/scumm/scumm.h2
-rw-r--r--engines/scumm/sound.cpp6
-rw-r--r--engines/scumm/string.cpp5
-rw-r--r--engines/simon/game.cpp4
9 files changed, 81 insertions, 8 deletions
diff --git a/engines/scumm/he/script_v100he.cpp b/engines/scumm/he/script_v100he.cpp
index 7f38ef5423..807203fd1c 100644
--- a/engines/scumm/he/script_v100he.cpp
+++ b/engines/scumm/he/script_v100he.cpp
@@ -2640,9 +2640,11 @@ void ScummEngine_v100he::o100_getSpriteInfo() {
byte subOp = fetchScriptByte();
+ printf("o100_getSpriteInfo: subOp %d\n", subOp);
switch (subOp) {
case 3:
spriteId = pop();
+ printf("spriteId is %d\n", spriteId);
if (spriteId)
push(_sprite->getSpriteFlagAutoAnim(spriteId));
else
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index 3639c1c85a..7ed98988d7 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -621,6 +621,8 @@ void ScummEngine_v72he::decodeScriptString(byte *dst, bool scriptString) {
len = resStrLen(string) + 1;
}
+ printf("String %s\n", string);
+
// Decode string
num = 0;
val = 0;
@@ -1423,6 +1425,8 @@ void ScummEngine_v72he::o72_findObject() {
int y = pop();
int x = pop();
int r = findObject(x, y, 0, 0);
+
+ printf("o72_findObject: result is %d\n", r);
push(r);
}
diff --git a/engines/scumm/he/sound_he.cpp b/engines/scumm/he/sound_he.cpp
index 07c7202009..e22ae699b2 100644
--- a/engines/scumm/he/sound_he.cpp
+++ b/engines/scumm/he/sound_he.cpp
@@ -46,6 +46,11 @@
namespace Scumm {
void Sound::stopSoundChannel(int chan) {
+ if (_heChannel[chan].sound == 1) {
+ _vm->_haveMsg = 3;
+ _vm->_talkDelay = 0;
+ }
+
_vm->_mixer->stopHandle(_heSoundChannels[chan]);
_heChannel[chan].sound = 0;
@@ -92,7 +97,7 @@ int Sound::isSoundCodeUsed(int sound) {
chan = i;
}
- if (chan != -1) {
+ if (_vm->_mixer->isSoundHandleActive(_heSoundChannels[chan]) && chan != -1) {
return _heChannel[chan].sbngBlock;
} else {
return 0;
@@ -106,7 +111,7 @@ int Sound::getSoundPos(int sound) {
chan = i;
}
- if (chan != -1) {
+ if (_vm->_mixer->isSoundHandleActive(_heSoundChannels[chan]) && chan != -1) {
int time = _vm->getHETimer(chan + 4) * 11025 / 1000;
return time;
} else {
@@ -127,7 +132,7 @@ int Sound::getSoundVar(int sound, int var) {
chan = i;
}
- if (chan != -1) {
+ if (_vm->_mixer->isSoundHandleActive(_heSoundChannels[chan]) && chan != -1) {
debug(5, "getSoundVar: sound %d var %d result %d", sound, var, _heChannel[chan].soundVars[var]);
return _heChannel[chan].soundVars[var];
} else {
diff --git a/engines/scumm/he/sprite_he.cpp b/engines/scumm/he/sprite_he.cpp
index 8f17a89215..37d7d59e23 100644
--- a/engines/scumm/he/sprite_he.cpp
+++ b/engines/scumm/he/sprite_he.cpp
@@ -925,8 +925,8 @@ void Sprite::setGroupBounds(int spriteGroupId, int x1, int y1, int x2, int y2) {
_spriteGroups[spriteGroupId].flags |= kSGFClipBox;
_spriteGroups[spriteGroupId].bbox.left = x1;
_spriteGroups[spriteGroupId].bbox.top = y1;
- _spriteGroups[spriteGroupId].bbox.right = x2;
- _spriteGroups[spriteGroupId].bbox.bottom = y2;
+ _spriteGroups[spriteGroupId].bbox.right = x2 + 1;
+ _spriteGroups[spriteGroupId].bbox.bottom = y2 + 1;
redrawSpriteGroup(spriteGroupId);
}
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index d50b1120b4..45dad41365 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -516,6 +516,16 @@ int ScummEngine::fetchScriptDWordSigned() {
int ScummEngine::readVar(uint var) {
int a;
+ // Putt Zoo
+ if (var == 450)
+ printf("Found HolyMoley\n");
+
+ if (_game.features & GF_16BIT_COLOR && var == 89) {
+ error("Reading the video color depth");
+ }
+
+
+
debugC(DEBUG_VARS, "readvar(%d)", var);
if ((var & 0x2000) && (_game.version <= 5)) {
@@ -598,6 +608,47 @@ int ScummEngine::readVar(uint var) {
void ScummEngine::writeVar(uint var, int value) {
debugC(DEBUG_VARS, "writeVar(%d, %d)", var, value);
+ // Used as mini game loads in spyfox2
+ if (_game.heversion >= 99 && var == 126) {
+ warning("Video method was set to %d", value);
+ }
+
+ // Used when chase loads level
+ if (_game.heversion >= 90 && var == 121) {
+ warning("Resource unknown set to %d", value);
+ }
+
+
+
+
+ if (_game.heversion >= 72 && var == 40 && value != 0) {
+ printf("Set script VAR40 to %d\n", value);
+ }
+
+ if (_game.heversion >= 80 && var == 90 && value != 0) {
+ printf("Set msg VAR90 to %s\n", getStringAddress(90));
+ }
+
+ if (_game.heversion >= 80 && var == 93) {
+ error("Set the default background color to %d", value);
+ }
+
+ if (_game.heversion >= 80 && var == 94) {
+ error("Set the default actor color to %d", value);
+ }
+
+ if (_game.heversion >= 80 && var == 87) {
+ error("Sound Script was set to %d", value);
+ }
+
+ if (_game.heversion >= 100 && var == 138) {
+ error("Main Script 2 was set to %d", value);
+ }
+
+ if (_game.heversion >= 100 && var == 139) {
+ error("Sprite bit was set to %d", value);
+ }
+
if (!(var & 0xF000)) {
checkRange(_numVariables - 1, 0, var, "Variable %d out of range(w)");
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index 38203f6f79..b59a3f4bef 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -929,6 +929,7 @@ public:
int _sentenceNum;
SentenceTab _sentence[NUM_SENTENCE];
StringTab _string[6];
+ byte _haveMsg;
int16 _talkDelay;
int _NES_lastTalkingActor;
int _NES_talkColor;
@@ -1153,7 +1154,6 @@ protected:
byte *_palManipPalette;
byte *_palManipIntermediatePal;
- byte _haveMsg;
bool _haveActorSpeechMsg;
bool _useTalkAnims;
uint16 _defaultTalkDelay;
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index 361e13f15e..55dbbe8281 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -856,6 +856,12 @@ void Sound::stopSound(int sound) {
_soundQue2[i].flags = 0;
}
}
+
+ if (_vm->_game.heversion >= 70 && sound == 1) {
+ _vm->_haveMsg = 3;
+ _vm->_talkDelay = 0;
+ }
+
}
void Sound::stopAllSounds() {
diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp
index b2eb1eee75..07013025e6 100644
--- a/engines/scumm/string.cpp
+++ b/engines/scumm/string.cpp
@@ -411,6 +411,11 @@ void ScummEngine::CHARSET_1() {
}
#endif
+ if (_game.heversion >= 70 && _haveMsg == 3) {
+ stopTalk();
+ return;
+ }
+
if (!_haveMsg)
return;
diff --git a/engines/simon/game.cpp b/engines/simon/game.cpp
index 3f3785a5e8..551fe8e003 100644
--- a/engines/simon/game.cpp
+++ b/engines/simon/game.cpp
@@ -315,13 +315,13 @@ static GameMD5 gameMD5[] = {
{ GID_SIMON2DOS_RU, "e229f84d46fa83f99b4a7115679f3fb6", "stripped.txt", false},
{ GID_SIMON2DOS_RU, "2082f8d02075e590300478853a91ffd9", "tbllist", false},
- { GID_SIMON2DOS2, "eb8bde3685842a8fd38f60bc476ef8e9", "game32", false },
+ { GID_SIMON2DOS2, "604d04315935e77624bd356ac926e068", "game32", false },
{ GID_SIMON2DOS2, "72096a62d36e6034ea9fecc13b2dbdab", "icon.dat", false},
{ GID_SIMON2DOS2, "aa6840420899a31874204f90bb214108", "simon2.gme", false},
{ GID_SIMON2DOS2, "e229f84d46fa83f99b4a7115679f3fb6", "stripped.txt", false},
{ GID_SIMON2DOS2, "2082f8d02075e590300478853a91ffd9", "tbllist", false},
- { GID_SIMON2DOS2_RU, "7edfc633dd50f8caa719c478443db70b", "game32", false },
+ { GID_SIMON2DOS2_RU, "eb8bde3685842a8fd38f60bc476ef8e9", "game32", false },
{ GID_SIMON2DOS2_RU, "72096a62d36e6034ea9fecc13b2dbdab", "icon.dat", false},
{ GID_SIMON2DOS2_RU, "aa6840420899a31874204f90bb214108", "simon2.gme", false},
{ GID_SIMON2DOS2_RU, "e229f84d46fa83f99b4a7115679f3fb6", "stripped.txt", false},