diff options
author | Bastien Bouclet | 2017-02-12 16:57:26 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2017-07-03 08:50:10 +0200 |
commit | aa32c5e5848a92e2b3cb6b08257046767ef1b514 (patch) | |
tree | 0436725d557b7902b3cd34dd4f3957880cd02e5f /engines | |
parent | 3900597996000ecb28f1c2cb366c8faf59495734 (diff) | |
download | scummvm-rg350-aa32c5e5848a92e2b3cb6b08257046767ef1b514.tar.gz scummvm-rg350-aa32c5e5848a92e2b3cb6b08257046767ef1b514.tar.bz2 scummvm-rg350-aa32c5e5848a92e2b3cb6b08257046767ef1b514.zip |
MOHAWK: Pass rects by const reference in Riven's graphics manager
Diffstat (limited to 'engines')
-rw-r--r-- | engines/mohawk/riven_graphics.cpp | 8 | ||||
-rw-r--r-- | engines/mohawk/riven_graphics.h | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/mohawk/riven_graphics.cpp b/engines/mohawk/riven_graphics.cpp index 240144b5ca..a07cb79fa8 100644 --- a/engines/mohawk/riven_graphics.cpp +++ b/engines/mohawk/riven_graphics.cpp @@ -323,7 +323,7 @@ void RivenGraphics::copyImageToScreen(uint16 image, uint32 left, uint32 top, uin applyScreenUpdate(); } -void RivenGraphics::updateScreen(Common::Rect updateRect) { +void RivenGraphics::updateScreen(const Common::Rect &updateRect) { if (_dirtyScreen) { // Copy to screen if there's no transition. Otherwise transition. ;) if (_scheduledTransition == kRivenTransitionNone @@ -544,7 +544,7 @@ void RivenGraphics::drawExtrasImageToScreen(uint16 id, const Common::Rect &rect) delete mhkSurface; } -void RivenGraphics::drawRect(Common::Rect rect, bool active) { +void RivenGraphics::drawRect(const Common::Rect &rect, bool active) { // Useful with debugging. Shows where hotspots are on the screen and whether or not they're active. Graphics::Surface *screen = _vm->_system->lockScreen(); @@ -556,7 +556,7 @@ void RivenGraphics::drawRect(Common::Rect rect, bool active) { _vm->_system->unlockScreen(); } -void RivenGraphics::drawImageRect(uint16 id, Common::Rect srcRect, Common::Rect dstRect) { +void RivenGraphics::drawImageRect(uint16 id, const Common::Rect &srcRect, const Common::Rect &dstRect) { // Draw tBMP id from srcRect to dstRect Graphics::Surface *surface = findImage(id)->getSurface(); @@ -568,7 +568,7 @@ void RivenGraphics::drawImageRect(uint16 id, Common::Rect srcRect, Common::Rect _dirtyScreen = true; } -void RivenGraphics::drawExtrasImage(uint16 id, Common::Rect dstRect) { +void RivenGraphics::drawExtrasImage(uint16 id, const Common::Rect &dstRect) { MohawkSurface *mhkSurface = _bitmapDecoder->decodeImage(_vm->getExtrasResource(ID_TBMP, id)); mhkSurface->convertToTrueColor(); Graphics::Surface *surface = mhkSurface->getSurface(); diff --git a/engines/mohawk/riven_graphics.h b/engines/mohawk/riven_graphics.h index 565a51d08e..36225dab28 100644 --- a/engines/mohawk/riven_graphics.h +++ b/engines/mohawk/riven_graphics.h @@ -61,10 +61,10 @@ public: void applyScreenUpdate(bool force = false); void copyImageToScreen(uint16 image, uint32 left, uint32 top, uint32 right, uint32 bottom); - void updateScreen(Common::Rect updateRect = Common::Rect(0, 0, 608, 392)); - void drawRect(Common::Rect rect, bool active); - void drawImageRect(uint16 id, Common::Rect srcRect, Common::Rect dstRect); - void drawExtrasImage(uint16 id, Common::Rect dstRect); + void updateScreen(const Common::Rect &updateRect = Common::Rect(0, 0, 608, 392)); + void drawRect(const Common::Rect &rect, bool active); + void drawImageRect(uint16 id, const Common::Rect &srcRect, const Common::Rect &dstRect); + void drawExtrasImage(uint16 id, const Common::Rect &dstRect); void drawExtrasImageToScreen(uint16 id, const Common::Rect &rect); Graphics::Surface *getEffectScreen(); |