diff options
Diffstat (limited to 'engines/voyeur/files.cpp')
-rw-r--r-- | engines/voyeur/files.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp index 4841ff7173..63551ce6b9 100644 --- a/engines/voyeur/files.cpp +++ b/engines/voyeur/files.cpp @@ -486,8 +486,8 @@ void BVoyBoltFile::initViewPortList() { _state._curMemberPtr->_viewPortListResource = res = new ViewPortListResource( _state, _state._curMemberPtr->_data); - _state._vm->_graphicsManager._viewPortListPtr = res; - _state._vm->_graphicsManager._vPort = &res->_entries[0]; + _state._vm->_graphicsManager->_viewPortListPtr = res; + _state._vm->_graphicsManager->_vPort = &res->_entries[0]; } void BVoyBoltFile::initFontInfo() { @@ -754,24 +754,24 @@ DisplayResource::DisplayResource(VoyeurEngine *vm) { void DisplayResource::sFillBox(int width, int height) { assert(_vm); - bool saveBack = _vm->_graphicsManager._saveBack; - _vm->_graphicsManager._saveBack = false; + bool saveBack = _vm->_graphicsManager->_saveBack; + _vm->_graphicsManager->_saveBack = false; PictureResource pr; pr._flags = 1; pr._select = 0xff; pr._pick = 0; - pr._onOff = _vm->_graphicsManager._drawPtr->_penColor; + pr._onOff = _vm->_graphicsManager->_drawPtr->_penColor; pr._bounds = Common::Rect(0, 0, width, height); - _vm->_graphicsManager.sDrawPic(&pr, this, _vm->_graphicsManager._drawPtr->_pos); - _vm->_graphicsManager._saveBack = saveBack; + _vm->_graphicsManager->sDrawPic(&pr, this, _vm->_graphicsManager->_drawPtr->_pos); + _vm->_graphicsManager->_saveBack = saveBack; } bool DisplayResource::clipRect(Common::Rect &rect) { Common::Rect clippingRect; - if (_vm->_graphicsManager._clipPtr) { - clippingRect = *_vm->_graphicsManager._clipPtr; + if (_vm->_graphicsManager->_clipPtr) { + clippingRect = *_vm->_graphicsManager->_clipPtr; } else if (_flags & DISPFLAG_VIEWPORT) { clippingRect = ((ViewPortResource *)this)->_clipRect; } else { @@ -806,11 +806,11 @@ bool DisplayResource::clipRect(Common::Rect &rect) { } int DisplayResource::drawText(const Common::String &msg) { - GraphicsManager &gfxManager = _vm->_graphicsManager; + GraphicsManager &gfxManager = *_vm->_graphicsManager; assert(gfxManager._fontPtr); assert(gfxManager._fontPtr->_curFont); FontInfoResource &fontInfo = *gfxManager._fontPtr; - PictureResource &fontChar = *_vm->_graphicsManager._fontChar; + PictureResource &fontChar = *_vm->_graphicsManager->_fontChar; FontResource &fontData = *fontInfo._curFont; int xShadows[9] = { 0, 1, 1, 1, 0, -1, -1, -1, 0 }; int yShadows[9] = { 0, 1, 0, -1, -1, -1, 0, 1, 1 }; @@ -995,7 +995,7 @@ int DisplayResource::textWidth(const Common::String &msg) { return 0; const char *msgP = msg.c_str(); - FontResource &fontData = *_vm->_graphicsManager._fontPtr->_curFont; + FontResource &fontData = *_vm->_graphicsManager->_fontPtr->_curFont; int minChar = fontData._minChar; int maxChar = fontData._maxChar; int padding = fontData._padding; @@ -1081,9 +1081,9 @@ PictureResource::PictureResource(BoltFilesState &state, const byte *src): mode = 226; } - if (mode != state._vm->_graphicsManager._SVGAMode) { - state._vm->_graphicsManager._SVGAMode = mode; - state._vm->_graphicsManager.clearPalette(); + if (mode != state._vm->_graphicsManager->_SVGAMode) { + state._vm->_graphicsManager->_SVGAMode = mode; + state._vm->_graphicsManager->clearPalette(); } int screenOffset = READ_LE_UINT32(&src[18]) & 0xffff; @@ -1092,12 +1092,12 @@ PictureResource::PictureResource(BoltFilesState &state, const byte *src): if (_flags & PICFLAG_CLEAR_SCREEN) { // Clear screen picture. That's right. This game actually has a picture // resource flag to clear the screen! Bizarre. - Graphics::Surface &s = state._vm->_graphicsManager._screenSurface; + Graphics::Surface &s = state._vm->_graphicsManager->_screenSurface; s.fillRect(Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT), 0); } else { // Direct screen loading picture. In this case, the raw data of the resource // is directly decompressed into the screen surface. Again, bizarre. - byte *pDest = (byte *)state._vm->_graphicsManager._screenSurface.getPixels(); + byte *pDest = (byte *)state._vm->_graphicsManager->_screenSurface.getPixels(); state.decompress(pDest, SCREEN_WIDTH * SCREEN_HEIGHT, state._curMemberPtr->_mode); } } else { @@ -1320,11 +1320,11 @@ void ViewPortResource::setupViewPort(PictureResource *page, Common::Rect *clippi _restoreFn = restoreFn; if (setupFn) - (_state._vm->_graphicsManager.*setupFn)(this); + (_state._vm->_graphicsManager->*setupFn)(this); } void ViewPortResource::setupViewPort() { - setupViewPort(_state._vm->_graphicsManager._backgroundPage, NULL, + setupViewPort(_state._vm->_graphicsManager->_backgroundPage, NULL, &GraphicsManager::setupMCGASaveRect, &GraphicsManager::addRectOptSaveRect, &GraphicsManager::restoreMCGASaveRect); } @@ -1340,7 +1340,7 @@ void ViewPortResource::addSaveRect(int pageIndex, const Common::Rect &r) { if (clipRect(rect)) { if (_addFn) { - (_state._vm->_graphicsManager.*_addFn)(this, pageIndex, rect); + (_state._vm->_graphicsManager->*_addFn)(this, pageIndex, rect); } else if (_rectListCount[pageIndex] != -1) { _rectListPtr[pageIndex]->push_back(rect); } @@ -1348,26 +1348,26 @@ void ViewPortResource::addSaveRect(int pageIndex, const Common::Rect &r) { } void ViewPortResource::fillPic(byte onOff) { - _state._vm->_graphicsManager.fillPic(this, onOff); + _state._vm->_graphicsManager->fillPic(this, onOff); } void ViewPortResource::drawIfaceTime() { // Hour display - _state._vm->_graphicsManager.drawANumber(*_state._vm->_graphicsManager._vPort, + _state._vm->_graphicsManager->drawANumber(*_state._vm->_graphicsManager->_vPort, (_state._vm->_gameHour / 10) == 0 ? 10 : _state._vm->_gameHour / 10, Common::Point(161, 25)); - _state._vm->_graphicsManager.drawANumber(*_state._vm->_graphicsManager._vPort, + _state._vm->_graphicsManager->drawANumber(*_state._vm->_graphicsManager->_vPort, _state._vm->_gameHour % 10, Common::Point(172, 25)); // Minute display - _state._vm->_graphicsManager.drawANumber(*_state._vm->_graphicsManager._vPort, + _state._vm->_graphicsManager->drawANumber(*_state._vm->_graphicsManager->_vPort, _state._vm->_gameMinute / 10, Common::Point(190, 25)); - _state._vm->_graphicsManager.drawANumber(*_state._vm->_graphicsManager._vPort, + _state._vm->_graphicsManager->drawANumber(*_state._vm->_graphicsManager->_vPort, _state._vm->_gameMinute % 10, Common::Point(201, 25)); // AM/PM indicator PictureResource *pic = _state._vm->_bVoy->boltEntry(_state._vm->_voy->_isAM ? 272 : 273)._picResource; - _state._vm->_graphicsManager.sDrawPic(pic, *_state._vm->_graphicsManager._vPort, + _state._vm->_graphicsManager->sDrawPic(pic, *_state._vm->_graphicsManager->_vPort, Common::Point(215, 27)); } @@ -1375,9 +1375,9 @@ void ViewPortResource::drawPicPerm(PictureResource *pic, const Common::Point &pt Common::Rect bounds = pic->_bounds; bounds.translate(pt.x, pt.y); - bool saveBack = _state._vm->_graphicsManager._saveBack; - _state._vm->_graphicsManager._saveBack = false; - _state._vm->_graphicsManager.sDrawPic(pic, this, pt); + bool saveBack = _state._vm->_graphicsManager->_saveBack; + _state._vm->_graphicsManager->_saveBack = false; + _state._vm->_graphicsManager->sDrawPic(pic, this, pt); clipRect(bounds); for (int pageIndex = 0; pageIndex < _pageCount; ++pageIndex) { @@ -1386,7 +1386,7 @@ void ViewPortResource::drawPicPerm(PictureResource *pic, const Common::Point &pt } } - _state._vm->_graphicsManager._saveBack = saveBack; + _state._vm->_graphicsManager->_saveBack = saveBack; } /*------------------------------------------------------------------------*/ @@ -1519,7 +1519,7 @@ CMapResource::CMapResource(BoltFilesState &state, const byte *src): _vm(state._v _entries = new byte[count * 3]; Common::copy(src + 6, src + 6 + 3 * count, _entries); - int palIndex = state._vm->_graphicsManager._viewPortListPtr->_palIndex; + int palIndex = state._vm->_graphicsManager->_viewPortListPtr->_palIndex; if (_end > palIndex) _end = palIndex; if (_start > palIndex) |