diff options
-rw-r--r-- | engines/voyeur/files.cpp | 8 | ||||
-rw-r--r-- | engines/voyeur/files.h | 4 | ||||
-rw-r--r-- | engines/voyeur/graphics.cpp | 22 | ||||
-rw-r--r-- | engines/voyeur/voyeur.cpp | 1 |
4 files changed, 24 insertions, 11 deletions
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp index 34098e42a1..5171d581ba 100644 --- a/engines/voyeur/files.cpp +++ b/engines/voyeur/files.cpp @@ -996,8 +996,8 @@ int ViewPortResource::drawText(const Common::String &msg) { int charWidth = fontData._charWidth[charValue]; _fontChar._bounds.setWidth(charWidth); - uint16 offset = READ_LE_UINT16(fontData._data1 + charValue * 2); - _fontChar._imgData = fontData._data2 + offset * 2; + uint16 offset = READ_LE_UINT16(fontData._charOffsets + charValue * 2); + _fontChar._imgData = fontData._charImages + offset * 2; gfxManager.sDrawPic(&_fontChar, this, Common::Point(xp, yp)); @@ -1109,8 +1109,8 @@ FontResource::FontResource(BoltFilesState &state, byte *src) { for (int i = 0; i < totalChars; ++i) _charWidth[i] = READ_LE_UINT16(src + 8 + 2 * i); - _data1 = src + 8 + totalChars * 2; - _data2 = _data1 + totalChars * 2; + _charOffsets = src + 8 + totalChars * 2; + _charImages = _charOffsets + totalChars * 2; } FontResource::~FontResource() { diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h index b66546cd0c..43836f5fa0 100644 --- a/engines/voyeur/files.h +++ b/engines/voyeur/files.h @@ -304,8 +304,8 @@ public: int _fontHeight; int _topPadding; int *_charWidth; - byte *_data1; - byte *_data2; + byte *_charOffsets; + byte *_charImages; FontResource(BoltFilesState &state, byte *src); virtual ~FontResource(); diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp index e220bbf652..2ee385f1f7 100644 --- a/engines/voyeur/graphics.cpp +++ b/engines/voyeur/graphics.cpp @@ -482,10 +482,24 @@ error("TODO: var22/var24/var2C not initialised before use?"); byte onOff = srcPic->_onOff; if (srcFlags & DISPFLAG_2) { - if (srcFlags & DISPFLAG_8) { - error("sDrawPic: TODO"); - } else { - error("sDrawPic: TODO"); + if (!(srcFlags & DISPFLAG_8)) { + srcP = srcImgData + srcOffset; + + if (destFlags & DISPFLAG_8) { + // loc_272C3 + error("TODO"); + } else { + destP = destImgData + screenOffset; + for (int yp = 0; yp < height1; ++yp) { + for (int xp = 0; xp < width2; ++xp, ++destP) { + if ((int8)*srcP++ < 0) + *destP = onOff; + } + + destP += widthDiff2; + srcP += widthDiff; + } + } } } else { // loc_27477 diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp index 080d40fc21..4c1d47d9fb 100644 --- a/engines/voyeur/voyeur.cpp +++ b/engines/voyeur/voyeur.cpp @@ -509,7 +509,6 @@ void VoyeurEngine::doOpening() { _eventsManager.pollEvents(); g_system->delayMillis(10); } - } void VoyeurEngine::playRL2Video(const Common::String &filename) { |