diff options
author | Arnaud Boutonné | 2011-01-18 09:16:52 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2011-01-18 09:16:52 +0000 |
commit | 4413754ad2b51fd07c97223f0790695c1f2d2235 (patch) | |
tree | 35940892bc13bcae570291dd1dbeab302ac507d0 /engines/hugo/hugo.cpp | |
parent | 839926ef10f4352bb360431cd34bbae4ec3b35bc (diff) | |
download | scummvm-rg350-4413754ad2b51fd07c97223f0790695c1f2d2235.tar.gz scummvm-rg350-4413754ad2b51fd07c97223f0790695c1f2d2235.tar.bz2 scummvm-rg350-4413754ad2b51fd07c97223f0790695c1f2d2235.zip |
HUGO: Improve mouse support in H3 DOS version
- Fix description of Penelope lying (when using mouse)
- Use H3 Win logic in order to handle horizon
- Add a workaround for a data bug in scenery1.dat, fixing the
pathfinding bug in Crash screen
svn-id: r55292
Diffstat (limited to 'engines/hugo/hugo.cpp')
-rw-r--r-- | engines/hugo/hugo.cpp | 22 |
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. */ |