aboutsummaryrefslogtreecommitdiff
path: root/engines/agi
diff options
context:
space:
mode:
Diffstat (limited to 'engines/agi')
-rw-r--r--engines/agi/agi.h1
-rw-r--r--engines/agi/detection_tables.h6
-rw-r--r--engines/agi/sprite.cpp15
-rw-r--r--engines/agi/text.cpp8
4 files changed, 18 insertions, 12 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 4037faeb4a..d82bc58c76 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 cb12eafb02..a6fb0c9aee 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 cec0895073..8d13be3f68 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 9ac416e70e..838dc739c9 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)) {