[Scummvm-cvs-logs] scummvm master -> 62c8d825608c8aa4b4e0b52629e6b34adb26111d

bluegr md5 at scummvm.org
Mon Sep 26 02:57:26 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
62c8d82560 AGI: Fixed the actual cause of bug #3295652, and partially fixed bug #3080415


Commit: 62c8d825608c8aa4b4e0b52629e6b34adb26111d
    https://github.com/scummvm/scummvm/commit/62c8d825608c8aa4b4e0b52629e6b34adb26111d
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2011-09-25T17:50:58-07:00

Commit Message:
AGI: Fixed the actual cause of bug #3295652, and partially fixed bug #3080415

Changed paths:
    engines/agi/agi.h
    engines/agi/detection_tables.h
    engines/agi/sprite.cpp
    engines/agi/text.cpp



diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 4037fae..d82bc58 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -124,7 +124,6 @@ enum AgiGameID {
 	GID_XMASCARD,
 	GID_FANMADE,
 	GID_GETOUTTASQ,	// Fanmade
-	GID_SQ0,				// Fanmade
 	GID_MICKEY,			// PreAGI
 	GID_WINNIE,			// PreAGI
 	GID_TROLL				// PreAGI
diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h
index cb12eaf..a6fb0c9 100644
--- a/engines/agi/detection_tables.h
+++ b/engines/agi/detection_tables.h
@@ -814,9 +814,9 @@ static const AGIGameDescription gameDescriptions[] = {
 	FANMADE("Snowboarding Demo (v1.0)", "24bb8f29f1eddb5c0a099705267c86e4"),
 	FANMADE("Solar System Tour", "b5a3d0f392dfd76a6aa63f3d5f578403"),
 	FANMADE("Sorceror's Appraisal", "fe62615557b3cb7b08dd60c9d35efef1"),
-	GAME("sq0", "v1.03", "d2fd6f7404e86182458494e64375e590", 0x2917, GID_SQ0),
-	GAME("sq0", "v1.04", "2ad9d1a4624a98571ee77dcc83f231b6", 0x2917, GID_SQ0),
-	GAME_PS("sq0", "", "e1a8e4efcce86e1efcaa14633b9eb986", 762, 0x2440, GID_SQ0, Common::kPlatformCoCo3),
+	GAME("sq0", "v1.03", "d2fd6f7404e86182458494e64375e590", 0x2917, GID_FANMADE),
+	GAME("sq0", "v1.04", "2ad9d1a4624a98571ee77dcc83f231b6", 0x2917, GID_FANMADE),
+	GAME_PS("sq0", "", "e1a8e4efcce86e1efcaa14633b9eb986", 762, 0x2440, GID_FANMADE, Common::kPlatformCoCo3),
 	GAME("sqx", "v10.0 Feb 05", "c992ae2f8ab18360404efdf16fa9edd1", 0x2917, GID_FANMADE),
 	GAME("sqx", "v10.0 Jul 18", "812edec45cefad559d190ffde2f9c910", 0x2917, GID_FANMADE),
 	GAME_PS("sqx", "", "f0a59044475a5fa37c055d8c3eb4d1a7", 768, 0x2440, GID_FANMADE, Common::kPlatformCoCo3),
diff --git a/engines/agi/sprite.cpp b/engines/agi/sprite.cpp
index cec0895..8d13be3 100644
--- a/engines/agi/sprite.cpp
+++ b/engines/agi/sprite.cpp
@@ -702,6 +702,21 @@ void SpritesMgr::commitBlock(int x1, int y1, int x2, int y2, bool immediate) {
 	y1 = CLIP(y1, 0, _HEIGHT - 1);
 	y2 = CLIP(y2, 0, _HEIGHT - 1);
 
+	// Check if a window is active, and clip the block commited to exclude the
+	// window's contents. Fixes bug #3295652, and partially fixes bug #3080415.
+	AgiBlock &window = _vm->_game.window;
+	if (window.active) {
+		if (y1 < window.y2 && y2 > window.y2 && (x1 < window.x2 || x2 > window.x1)) {
+			// The top of the block covers the bottom of the window
+			y1 = window.y2;
+		}
+
+		if (y1 < window.y1 && y2 > window.y1 && (x1 < window.x2 || x2 > window.x1)) {
+			// The bottom of the block covers the top of the window
+			y2 = window.y1;
+		}
+	}
+
 	debugC(7, kDebugLevelSprites, "commitBlock(%d, %d, %d, %d)", x1, y1, x2, y2);
 
 	w = x2 - x1 + 1;
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index 9ac416e..838dc73 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -437,14 +437,6 @@ int AgiEngine::print(const char *p, int lin, int col, int len) {
 
 	debugC(4, kDebugLevelText, "print(): lin = %d, col = %d, len = %d", lin, col, len);
 
-	// WORKAROUND for SQ0, room 28: when the tree is talking, non-blocking
-	// text boxes are shown and the tree's animation is shown underneath.
-	// The text boxes are drawn too low, and the tree's animation is painted
-	// over them. We cheat here and move the text boxex one line above to
-	// avoid getting them overdrawn. Fixes bug #3295652.
-	if (getGameID() == GID_SQ0 && getvar(0) == 28 && lin == 6)
-		lin = 5;
-
 	blitTextbox(p, lin, col, len);
 
 	if (getflag(fOutputMode)) {






More information about the Scummvm-git-logs mailing list