diff options
-rw-r--r-- | engines/voyeur/events.cpp | 2 | ||||
-rw-r--r-- | engines/voyeur/files.cpp | 2 | ||||
-rw-r--r-- | engines/voyeur/files_threads.cpp | 4 | ||||
-rw-r--r-- | engines/voyeur/graphics.cpp | 21 | ||||
-rw-r--r-- | engines/voyeur/graphics.h | 19 |
5 files changed, 10 insertions, 38 deletions
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp index 51096956c0..cff394797b 100644 --- a/engines/voyeur/events.cpp +++ b/engines/voyeur/events.cpp @@ -90,7 +90,7 @@ void EventsManager::startMainClockInt() { _mainIntNode._intFunc = &EventsManager::mainVoyeurIntFunc; _mainIntNode._flags = 0; _mainIntNode._curTime = 0; - _mainIntNode._timeReset = _vm->_graphicsManager._palFlag ? 50 : 60; + _mainIntNode._timeReset = 60; } void EventsManager::mainVoyeurIntFunc() { diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp index f2bb72fe8d..240f6451dc 100644 --- a/engines/voyeur/files.cpp +++ b/engines/voyeur/files.cpp @@ -832,7 +832,7 @@ int DisplayResource::drawText(const Common::String &msg) { ViewPortResource *viewPort = !(_flags & DISPFLAG_VIEWPORT) ? NULL : (ViewPortResource *)this; - if (gfxManager._drawTextPermFlag || (fontInfo._fontFlags & DISPFLAG_1) || fontInfo._justify || + if ((fontInfo._fontFlags & DISPFLAG_1) || fontInfo._justify || (gfxManager._saveBack && fontInfo._fontSaveBack && (_flags & DISPFLAG_VIEWPORT))) { msgWidth = viewPort->textWidth(msg); yp = pos.y; diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp index 1ac2af97c8..918f8338cf 100644 --- a/engines/voyeur/files_threads.cpp +++ b/engines/voyeur/files_threads.cpp @@ -1238,7 +1238,7 @@ void ThreadResource::doRoom() { _vm->flipPageAndWait(); - vm._graphicsManager.fadeUpICF1(0); + vm._graphicsManager.fadeUpICF1(); voy._eventFlags &= EVTFLAG_RECORDING; vm._eventsManager.showCursor(); } @@ -1595,7 +1595,7 @@ void ThreadResource::freeTheApt() { _vm->_graphicsManager.fadeDownICF1(5); _vm->flipPageAndWaitForFade(); - _vm->_graphicsManager.fadeUpICF1(0); + _vm->_graphicsManager.fadeUpICF1(); if (_vm->_currentVocId != -1) { _vm->_soundManager.stopVOCPlay(); diff --git a/engines/voyeur/graphics.cpp b/engines/voyeur/graphics.cpp index 26a1efcb46..be633f53fa 100644 --- a/engines/voyeur/graphics.cpp +++ b/engines/voyeur/graphics.cpp @@ -31,25 +31,17 @@ namespace Voyeur { /*------------------------------------------------------------------------*/ -DrawInfo::DrawInfo(int penColor, const Common::Point &pos, int flags) { +DrawInfo::DrawInfo(int penColor, const Common::Point &pos) { _penColor = penColor; _pos = pos; - _flags = flags; } /*------------------------------------------------------------------------*/ -GraphicsManager::GraphicsManager(): _defaultDrawInfo(1, Common::Point(), 0), _drawPtr(&_defaultDrawInfo) { - _SVGAPage = 0; +GraphicsManager::GraphicsManager(): _defaultDrawInfo(1, Common::Point()), _drawPtr(&_defaultDrawInfo) { _SVGAMode = 0; - _SVGAReset = 0; - _screenOffset = 0; _planeSelect = 0; - _sImageShift = 3; - _palFlag = false; - _MCGAMode = false; _saveBack = true; - _drawTextPermFlag = false; _clipPtr = NULL; _viewPortListPtr = NULL; _backgroundPage = NULL; @@ -71,8 +63,6 @@ GraphicsManager::~GraphicsManager() { } void GraphicsManager::setupMCGASaveRect(ViewPortResource *viewPort) { - _MCGAMode = true; - if (viewPort->_activePage) { viewPort->_activePage->_flags |= 1; Common::Rect *clipRect = _clipPtr; @@ -252,10 +242,9 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des } if (srcFlags & DISPFLAG_1000) { - srcImgData = srcPic->_imgData + (var4C << 14) + _screenOffset; + srcImgData = srcPic->_imgData + (var4C << 14); for (uint idx = 0; idx < srcPic->_maskData; ++idx) { if (var4C < 4) { - EMSMapPageHandle(srcPic->_planeSize, srcPic->_imgData[idx], var4C); ++var4C; } } @@ -263,10 +252,9 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des srcImgData = srcPic->_imgData; } if (destFlags & DISPFLAG_1000) { - destImgData = destPic->_imgData + (var4C << 14) + _screenOffset; + destImgData = destPic->_imgData + (var4C << 14); for (uint idx = 0; idx < srcPic->_maskData; ++idx) { if (var4C < 4) { - EMSMapPageHandle(destPic->_planeSize, destPic->_imgData[idx], var4C); ++var4C; } } @@ -274,7 +262,6 @@ void GraphicsManager::sDrawPic(DisplayResource *srcDisplay, DisplayResource *des destImgData = destPic->_imgData; } - _SVGAPage = _SVGAReset; if (srcPic->_select != 0xff) return; diff --git a/engines/voyeur/graphics.h b/engines/voyeur/graphics.h index 59bc29bd25..57d72228c5 100644 --- a/engines/voyeur/graphics.h +++ b/engines/voyeur/graphics.h @@ -50,9 +50,8 @@ class DrawInfo { public: int _penColor; Common::Point _pos; - int _flags; public: - DrawInfo(int penColor, const Common::Point &pos, int flags); + DrawInfo(int penColor, const Common::Point &pos); }; typedef void (GraphicsManager::*GraphicMethodPtr)(); @@ -63,32 +62,21 @@ typedef void (GraphicsManager::*ViewPortRestorePtr)(ViewPortResource *); class GraphicsManager { public: VoyeurEngine *_vm; - bool _palFlag; byte _VGAColors[PALETTE_SIZE]; - Common::Array<byte *> _colorChain; PictureResource *_backgroundPage; - int _SVGAPage; int _SVGAMode; - int _SVGAReset; ViewPortListResource *_viewPortListPtr; ViewPortResource **_vPort; - bool _MCGAMode; bool _saveBack; Common::Rect *_clipPtr; - int _screenOffset; uint _planeSelect; - int _sImageShift; Graphics::Surface _screenSurface; CMapResource *_backColors; FontInfoResource *_fontPtr; PictureResource *_fontChar; DrawInfo *_drawPtr; DrawInfo _defaultDrawInfo; - bool _drawTextPermFlag; private: - static void fadeIntFunc(); - static void vDoCycleInt(); - void restoreBack(Common::Array<Common::Rect> &rectList, int rectListCount, PictureResource *srcPic, PictureResource *destPic); public: @@ -116,7 +104,7 @@ public: void setColors(int start, int count, const byte *pal); void screenReset(); void fadeDownICF1(int steps); - void fadeUpICF1(int steps); + void fadeUpICF1(int steps = 0); void fadeDownICF(int steps); void drawDot(); @@ -124,9 +112,6 @@ public: * Synchronizes the game data */ void synchronize(Common::Serializer &s); - - // Methods in the original that are stubbed in ScummVM - void EMSMapPageHandle(int v1, int v2, int v3) {} }; } // End of namespace Voyeur |