mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-10 21:03:31 +00:00
MOHAWK: Pass rects by const reference in Riven's graphics manager
This commit is contained in:
parent
3900597996
commit
aa32c5e584
@ -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();
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user