aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/hugo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hugo/hugo.cpp')
-rw-r--r--engines/hugo/hugo.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp
index 78ac233b8d..f3eb3aa46c 100644
--- a/engines/hugo/hugo.cpp
+++ b/engines/hugo/hugo.cpp
@@ -1054,6 +1054,10 @@ void HugoEngine::readScreenFiles(int screenNum) {
_file->readOverlay(screenNum, _boundary, BOUNDARY); // Boundary file
_file->readOverlay(screenNum, _overlay, OVERLAY); // Overlay file
_file->readOverlay(screenNum, _ovlBase, OVLBASE); // Overlay base file
+
+ if ((screenNum == 0) && (_gameVariant == 5)) // H3 Dos
+ clearScreenBoundary(50, 311, 152);
+
}
/**
@@ -1172,6 +1176,24 @@ void HugoEngine::clearBoundary(int x1, int x2, int y) {
}
/**
+* Clear a horizontal line segment in the screen boundary file
+* Used to fix some data issues
+*/
+void HugoEngine::clearScreenBoundary(int x1, int x2, int y) {
+ debugC(5, kDebugEngine, "clearScreenBoundary(%d, %d, %d)", x1, x2, y);
+
+ for (int i = x1 >> 3; i <= x2 >> 3; i++) { // For each byte in line
+ byte *b = &_boundary[y * XBYTES + i]; // get boundary byte
+ if (i == x2 >> 3) // Adjust right end
+ *b &= ~(0xff << ((i << 3) + 7 - x2));
+ else if (i == x1 >> 3) // Adjust left end
+ *b &= ~(0xff >> (x1 - (i << 3)));
+ else
+ *b = 0;
+ }
+}
+
+/**
* Search background command list for this screen for supplied object.
* Return first associated verb (not "look") or 0 if none found.
*/