[Scummvm-cvs-logs] SF.net SVN: scummvm: [21219] scummvm/trunk/engines/simon

kirben at users.sourceforge.net kirben at users.sourceforge.net
Sat Mar 11 16:54:01 CET 2006


Revision: 21219
Author:   kirben
Date:     2006-03-11 16:53:30 -0800 (Sat, 11 Mar 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=21219&view=rev

Log Message:
-----------
Correct mistake in md5 tables for Simon the Sorcerer 2 (DOS Floppy)

Modified Paths:
--------------
    scummvm/trunk/engines/scumm/he/script_v100he.cpp
    scummvm/trunk/engines/scumm/he/script_v72he.cpp
    scummvm/trunk/engines/scumm/he/sound_he.cpp
    scummvm/trunk/engines/scumm/he/sprite_he.cpp
    scummvm/trunk/engines/scumm/script.cpp
    scummvm/trunk/engines/scumm/scumm.h
    scummvm/trunk/engines/scumm/sound.cpp
    scummvm/trunk/engines/scumm/string.cpp
    scummvm/trunk/engines/simon/game.cpp
Modified: scummvm/trunk/engines/scumm/he/script_v100he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v100he.cpp	2006-03-11 23:26:53 UTC (rev 21218)
+++ scummvm/trunk/engines/scumm/he/script_v100he.cpp	2006-03-12 00:53:30 UTC (rev 21219)
@@ -2640,9 +2640,11 @@
 
 	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

Modified: scummvm/trunk/engines/scumm/he/script_v72he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/script_v72he.cpp	2006-03-11 23:26:53 UTC (rev 21218)
+++ scummvm/trunk/engines/scumm/he/script_v72he.cpp	2006-03-12 00:53:30 UTC (rev 21219)
@@ -621,6 +621,8 @@
 		len = resStrLen(string) + 1;
 	}
 
+	printf("String %s\n", string);
+
 	// Decode string
 	num = 0;
 	val = 0;
@@ -1423,6 +1425,8 @@
 	int y = pop();
 	int x = pop();
 	int r = findObject(x, y, 0, 0);
+
+	printf("o72_findObject: result is %d\n", r);
 	push(r);
 }
 

Modified: scummvm/trunk/engines/scumm/he/sound_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/sound_he.cpp	2006-03-11 23:26:53 UTC (rev 21218)
+++ scummvm/trunk/engines/scumm/he/sound_he.cpp	2006-03-12 00:53:30 UTC (rev 21219)
@@ -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 @@
 			chan = i;
 	}
 
-	if (chan != -1) {
+	if (_vm->_mixer->isSoundHandleActive(_heSoundChannels[chan]) && chan != -1) {
 		return _heChannel[chan].sbngBlock;
 	} else {
 		return 0;
@@ -106,7 +111,7 @@
 			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 @@
 			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 {

Modified: scummvm/trunk/engines/scumm/he/sprite_he.cpp
===================================================================
--- scummvm/trunk/engines/scumm/he/sprite_he.cpp	2006-03-11 23:26:53 UTC (rev 21218)
+++ scummvm/trunk/engines/scumm/he/sprite_he.cpp	2006-03-12 00:53:30 UTC (rev 21219)
@@ -925,8 +925,8 @@
 	_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);
 }

Modified: scummvm/trunk/engines/scumm/script.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script.cpp	2006-03-11 23:26:53 UTC (rev 21218)
+++ scummvm/trunk/engines/scumm/script.cpp	2006-03-12 00:53:30 UTC (rev 21219)
@@ -516,6 +516,16 @@
 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 @@
 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)");
 

Modified: scummvm/trunk/engines/scumm/scumm.h
===================================================================
--- scummvm/trunk/engines/scumm/scumm.h	2006-03-11 23:26:53 UTC (rev 21218)
+++ scummvm/trunk/engines/scumm/scumm.h	2006-03-12 00:53:30 UTC (rev 21219)
@@ -929,6 +929,7 @@
 	int _sentenceNum;
 	SentenceTab _sentence[NUM_SENTENCE];
 	StringTab _string[6];
+	byte _haveMsg;
 	int16 _talkDelay;
 	int _NES_lastTalkingActor;
 	int _NES_talkColor;
@@ -1153,7 +1154,6 @@
 	byte *_palManipPalette;
 	byte *_palManipIntermediatePal;
 
-	byte _haveMsg;
 	bool _haveActorSpeechMsg;
 	bool _useTalkAnims;
 	uint16 _defaultTalkDelay;

Modified: scummvm/trunk/engines/scumm/sound.cpp
===================================================================
--- scummvm/trunk/engines/scumm/sound.cpp	2006-03-11 23:26:53 UTC (rev 21218)
+++ scummvm/trunk/engines/scumm/sound.cpp	2006-03-12 00:53:30 UTC (rev 21219)
@@ -856,6 +856,12 @@
 			_soundQue2[i].flags = 0;
 		}
 	}
+
+	if (_vm->_game.heversion >= 70 && sound == 1) {
+		_vm->_haveMsg = 3;
+		_vm->_talkDelay = 0;
+	}
+
 }
 
 void Sound::stopAllSounds() {

Modified: scummvm/trunk/engines/scumm/string.cpp
===================================================================
--- scummvm/trunk/engines/scumm/string.cpp	2006-03-11 23:26:53 UTC (rev 21218)
+++ scummvm/trunk/engines/scumm/string.cpp	2006-03-12 00:53:30 UTC (rev 21219)
@@ -411,6 +411,11 @@
 	}
 #endif
 
+	if (_game.heversion >= 70 && _haveMsg == 3) {
+		stopTalk();
+		return;
+	}
+
 	if (!_haveMsg)
 		return;
 

Modified: scummvm/trunk/engines/simon/game.cpp
===================================================================
--- scummvm/trunk/engines/simon/game.cpp	2006-03-11 23:26:53 UTC (rev 21218)
+++ scummvm/trunk/engines/simon/game.cpp	2006-03-12 00:53:30 UTC (rev 21219)
@@ -315,13 +315,13 @@
 	{ 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},


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the Scummvm-git-logs mailing list