diff options
author | Strangerke | 2014-02-27 08:15:29 +0100 |
---|---|---|
committer | Strangerke | 2014-02-27 08:15:29 +0100 |
commit | e44690dae93605aaf466d335ef6dc4c64f2b132a (patch) | |
tree | 0908ebe671ae70a76924e1459d4c4e83d8d4fb2c /engines/voyeur/events.cpp | |
parent | 6dd0a81fdfa1b39a77d845a970606d2a00004ffe (diff) | |
download | scummvm-rg350-e44690dae93605aaf466d335ef6dc4c64f2b132a.tar.gz scummvm-rg350-e44690dae93605aaf466d335ef6dc4c64f2b132a.tar.bz2 scummvm-rg350-e44690dae93605aaf466d335ef6dc4c64f2b132a.zip |
VOYEUR: Remove setVm from GraphicsManager
Diffstat (limited to 'engines/voyeur/events.cpp')
-rw-r--r-- | engines/voyeur/events.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp index 0e948d8dc3..13fadd3ced 100644 --- a/engines/voyeur/events.cpp +++ b/engines/voyeur/events.cpp @@ -109,18 +109,18 @@ void EventsManager::mainVoyeurIntFunc() { } void EventsManager::sWaitFlip() { - Common::Array<ViewPortResource *> &viewPorts = _vm->_graphicsManager._viewPortListPtr->_entries; + Common::Array<ViewPortResource *> &viewPorts = _vm->_graphicsManager->_viewPortListPtr->_entries; for (uint idx = 0; idx < viewPorts.size(); ++idx) { ViewPortResource &viewPort = *viewPorts[idx]; - if (_vm->_graphicsManager._saveBack && (viewPort._flags & DISPFLAG_40)) { - Common::Rect *clipPtr = _vm->_graphicsManager._clipPtr; - _vm->_graphicsManager._clipPtr = &viewPort._clipRect; + if (_vm->_graphicsManager->_saveBack && (viewPort._flags & DISPFLAG_40)) { + Common::Rect *clipPtr = _vm->_graphicsManager->_clipPtr; + _vm->_graphicsManager->_clipPtr = &viewPort._clipRect; if (viewPort._restoreFn) - (_vm->_graphicsManager.*viewPort._restoreFn)(&viewPort); + (_vm->_graphicsManager->*viewPort._restoreFn)(&viewPort); - _vm->_graphicsManager._clipPtr = clipPtr; + _vm->_graphicsManager->_clipPtr = clipPtr; viewPort._rectListCount[viewPort._pageIndex] = 0; viewPort._rectListPtr[viewPort._pageIndex]->clear(); viewPort._flags &= ~DISPFLAG_40; @@ -156,7 +156,7 @@ void EventsManager::checkForNextFrameCounter() { showMousePosition(); // Display the frame - g_system->copyRectToScreen((byte *)_vm->_graphicsManager._screenSurface.getPixels(), + g_system->copyRectToScreen((byte *)_vm->_graphicsManager->_screenSurface.getPixels(), SCREEN_WIDTH, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); g_system->updateScreen(); @@ -176,9 +176,9 @@ void EventsManager::showMousePosition() { mousePos += Common::String::format(" - (%d,%d)", pt.x, pt.y); } - _vm->_graphicsManager._screenSurface.fillRect( + _vm->_graphicsManager->_screenSurface.fillRect( Common::Rect(0, 0, 110, font.getFontHeight()), 0); - font.drawString(&_vm->_graphicsManager._screenSurface, mousePos, + font.drawString(&_vm->_graphicsManager->_screenSurface, mousePos, 0, 0, 110, 63); } @@ -301,11 +301,11 @@ void EventsManager::startFade(CMapResource *cMap) { if (cMap->_steps > 0) { _fadeStatus = cMap->_fadeStatus | 1; - byte *vgaP = &_vm->_graphicsManager._VGAColors[_fadeFirstCol * 3]; + byte *vgaP = &_vm->_graphicsManager->_VGAColors[_fadeFirstCol * 3]; int mapIndex = 0; for (int idx = _fadeFirstCol; idx <= _fadeLastCol; ++idx, vgaP += 3) { - ViewPortPalEntry &palEntry = _vm->_graphicsManager._viewPortListPtr->_palette[idx]; + ViewPortPalEntry &palEntry = _vm->_graphicsManager->_viewPortListPtr->_palette[idx]; palEntry._rEntry = vgaP[0] << 8; int rDiff = (cMap->_entries[mapIndex * 3] << 8) - palEntry._rEntry; palEntry._rChange = rDiff / cMap->_steps; @@ -327,7 +327,7 @@ void EventsManager::startFade(CMapResource *cMap) { _intPtr._skipFading = true; _fadeIntNode._flags &= ~1; } else { - byte *vgaP = &_vm->_graphicsManager._VGAColors[_fadeFirstCol * 3]; + byte *vgaP = &_vm->_graphicsManager->_VGAColors[_fadeFirstCol * 3]; int mapIndex = 0; for (int idx = _fadeFirstCol; idx <= _fadeLastCol; ++idx, vgaP += 3) { @@ -373,8 +373,8 @@ void EventsManager::vDoFadeInt() { } for (int i = _fadeFirstCol; i <= _fadeLastCol; ++i) { - ViewPortPalEntry &palEntry = _vm->_graphicsManager._viewPortListPtr->_palette[i]; - byte *vgaP = &_vm->_graphicsManager._VGAColors[palEntry._palIndex * 3]; + ViewPortPalEntry &palEntry = _vm->_graphicsManager->_viewPortListPtr->_palette[i]; + byte *vgaP = &_vm->_graphicsManager->_VGAColors[palEntry._palIndex * 3]; palEntry._rEntry += palEntry._rChange; palEntry._gEntry += palEntry._gChange; @@ -397,7 +397,7 @@ void EventsManager::vDoCycleInt() { for (int idx = 3; idx >= 0; --idx) { if (_cyclePtr->_type[idx] && --_cycleTime[idx] <= 0) { byte *pSrc = _cycleNext[idx]; - byte *pPal = _vm->_graphicsManager._VGAColors; + byte *pPal = _vm->_graphicsManager->_VGAColors; if (_cyclePtr->_type[idx] != 1) { // New palette data being specified - loop to set entries @@ -523,7 +523,7 @@ void EventsManager::setCursor(PictureResource *pic) { cursor._bounds = pic->_bounds; cursor._flags = DISPFLAG_CURSOR; - _vm->_graphicsManager.sDrawPic(pic, &cursor, Common::Point()); + _vm->_graphicsManager->sDrawPic(pic, &cursor, Common::Point()); } void EventsManager::setCursor(byte *cursorData, int width, int height) { @@ -533,16 +533,16 @@ void EventsManager::setCursor(byte *cursorData, int width, int height) { void EventsManager::setCursorColor(int idx, int mode) { switch (mode) { case 0: - _vm->_graphicsManager.setColor(idx, 90, 90, 232); + _vm->_graphicsManager->setColor(idx, 90, 90, 232); break; case 1: - _vm->_graphicsManager.setColor(idx, 232, 90, 90); + _vm->_graphicsManager->setColor(idx, 232, 90, 90); break; case 2: - _vm->_graphicsManager.setColor(idx, 90, 232, 90); + _vm->_graphicsManager->setColor(idx, 90, 232, 90); break; case 3: - _vm->_graphicsManager.setColor(idx, 90, 232, 232); + _vm->_graphicsManager->setColor(idx, 90, 232, 232); break; default: break; @@ -566,12 +566,12 @@ void EventsManager::getMouseInfo() { if (_cursorBlinked) { _cursorBlinked = false; - _vm->_graphicsManager.setOneColor(128, 220, 20, 20); - _vm->_graphicsManager.setColor(128, 220, 20, 20); + _vm->_graphicsManager->setOneColor(128, 220, 20, 20); + _vm->_graphicsManager->setColor(128, 220, 20, 20); } else { _cursorBlinked = true; - _vm->_graphicsManager.setOneColor(128, 220, 220, 220); - _vm->_graphicsManager.setColor(128, 220, 220, 220); + _vm->_graphicsManager->setOneColor(128, 220, 220, 220); + _vm->_graphicsManager->setColor(128, 220, 220, 220); } } } @@ -587,11 +587,11 @@ void EventsManager::getMouseInfo() { void EventsManager::startCursorBlink() { if (_vm->_voy->_eventFlags & EVTFLAG_RECORDING) { - _vm->_graphicsManager.setOneColor(128, 55, 5, 5); - _vm->_graphicsManager.setColor(128, 220, 20, 20); + _vm->_graphicsManager->setOneColor(128, 55, 5, 5); + _vm->_graphicsManager->setColor(128, 220, 20, 20); _intPtr._hasPalette = true; - _vm->_graphicsManager.drawDot(); + _vm->_graphicsManager->drawDot(); //copySection(); } } |