Correct mistake in md5 tables for Simon the Sorcerer 2 (DOS Floppy)

svn-id: r21219
This commit is contained in:
Travis Howell 2006-03-12 00:53:30 +00:00
parent 5bd5cef6cf
commit f9797f3ac3
9 changed files with 81 additions and 8 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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 {

View File

@ -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);
}

View File

@ -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)");

View File

@ -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;

View File

@ -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() {

View File

@ -411,6 +411,11 @@ void ScummEngine::CHARSET_1() {
}
#endif
if (_game.heversion >= 70 && _haveMsg == 3) {
stopTalk();
return;
}
if (!_haveMsg)
return;

View File

@ -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},