[Scummvm-cvs-logs] SF.net SVN: scummvm: [26842] scummvm/trunk/engines/agos

kirben at users.sourceforge.net kirben at users.sourceforge.net
Tue May 15 09:08:25 CEST 2007


Revision: 26842
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26842&view=rev
Author:   kirben
Date:     2007-05-15 00:08:24 -0700 (Tue, 15 May 2007)

Log Message:
-----------
Fix regressions in the introduction of Simon the Sorcerer 1 and in the DOS Floppy demo of Simon the Sorcerer 1.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/detection_tables.h
    scummvm/trunk/engines/agos/gfx.cpp

Modified: scummvm/trunk/engines/agos/detection_tables.h
===================================================================
--- scummvm/trunk/engines/agos/detection_tables.h	2007-05-14 21:52:06 UTC (rev 26841)
+++ scummvm/trunk/engines/agos/detection_tables.h	2007-05-15 07:08:24 UTC (rev 26842)
@@ -646,7 +646,7 @@
 
 		GType_SIMON1,
 		GID_SIMON1AMIGA,
-		GF_32COLOR | GF_CRUNCHED | GF_CRUNCHED_GAMEPC | GF_OLD_BUNDLE | GF_PLANAR | GF_DEMO
+		GF_32COLOR | GF_CRUNCHED | GF_CRUNCHED_GAMEPC | GF_OLD_BUNDLE | GF_PLANAR
 	},
 
 	// Simon the Sorcerer 1 - English Amiga AGA Floppy

Modified: scummvm/trunk/engines/agos/gfx.cpp
===================================================================
--- scummvm/trunk/engines/agos/gfx.cpp	2007-05-14 21:52:06 UTC (rev 26841)
+++ scummvm/trunk/engines/agos/gfx.cpp	2007-05-15 07:08:24 UTC (rev 26842)
@@ -646,6 +646,27 @@
 		setMoveRect(xoffs, yoffs, xmax, ymax);
 
 		_window4Flag = 1;
+	} else if (getGameType() == GType_SIMON1 && (getFeatures() & GF_DEMO)) {
+		// The DOS Floppy demo was based off Waxworks engine
+		if (_windowNum == 4 || (_windowNum >= 10 && _windowNum <= 27)) {
+			state->surf_addr = _window4BackScn;
+			state->surf_pitch = _videoWindows[18] * 16;
+
+			xoffs = ((vlut[0] - _videoWindows[16]) * 2 + state->x) * 8;
+			yoffs = (vlut[1] - _videoWindows[17] + state->y);
+
+			uint xmax = (xoffs + state->draw_width * 2);
+			uint ymax = (yoffs + state->draw_height);
+			setMoveRect(xoffs, yoffs, xmax, ymax);
+
+			_window4Flag = 1;
+		} else {
+			state->surf_addr = getFrontBuf();
+			state->surf_pitch = _screenWidth;
+
+			xoffs = (vlut[0] * 2 + state->x) * 8;
+			yoffs = vlut[1] + state->y;
+		}
 	} else if (getGameType() == GType_SIMON1) {
 		if (_windowNum == 3 || _windowNum == 4 || _windowNum >= 10) {
 			if (_window3Flag == 1) {
@@ -701,6 +722,13 @@
 	byte *dst;
 	uint h, i;
 
+	state->width = _screenWidth;
+	if (_window3Flag == 1) {
+		state->width = 0;
+		state->x_skip = 0;
+		state->y_skip = 0;
+	}
+
 	src = state->srcPtr + (_screenWidth * state->y_skip) + (state->x_skip * 8);
 	dst = state->surf_addr;
 
@@ -711,7 +739,7 @@
 		for (i = 0; i != state->draw_width; i++)
 			dst[i] = src[i] + state->paletteMod;
 		dst += state->surf_pitch;
-		src += _screenWidth;
+		src += state->width;
 	} while (--h);
 }
 
@@ -1263,6 +1291,8 @@
 
 		if (_window3Flag == 1) {
 			clearVideoBackGround(3, 0);
+			_lockWord &= ~0x20;
+			return;
 		}
 
 		uint xoffs = _videoWindows[updateWindow * 4 + 0] * 16;
@@ -1277,6 +1307,18 @@
 		if (getGameType() == GType_SIMON2) {
 			src = _window4BackScn + xoffs + yoffs * 320;
 			srcWidth = 320;
+		} else if (getGameType() == GType_SIMON1 && (getFeatures() & GF_DEMO)) {
+			// The DOS Floppy demo was based off Waxworks engine
+			if (updateWindow == 4 || updateWindow >= 10) {
+				src = _window4BackScn;
+				srcWidth = _videoWindows[18] * 16;
+			} else if (updateWindow == 3 || updateWindow == 9) {
+				src = getFrontBuf() + xoffs + yoffs * _screenWidth;
+				srcWidth = _screenWidth;
+			} else {
+				_lockWord &= ~0x20;
+				return;
+			}
 		} else if (getGameType() == GType_SIMON1) {
 			if (updateWindow == 4) {
 				src = _window4BackScn;


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