diff options
author | Johannes Schickel | 2016-03-21 03:10:35 +0100 |
---|---|---|
committer | Johannes Schickel | 2016-03-21 16:25:15 +0100 |
commit | 453b77d386369ebb4c8687ab252fc0e49384cdc3 (patch) | |
tree | 54d21170bbc5c4d5b5f94a92aa19da05a9c63d06 /engines/sherlock/scalpel | |
parent | fc17d9750f08102bd13b6b7a5c5bb340b0a913bc (diff) | |
download | scummvm-rg350-453b77d386369ebb4c8687ab252fc0e49384cdc3.tar.gz scummvm-rg350-453b77d386369ebb4c8687ab252fc0e49384cdc3.tar.bz2 scummvm-rg350-453b77d386369ebb4c8687ab252fc0e49384cdc3.zip |
SHERLOCK: Make Screen::_backBuffer an object instead of pointer.
Diffstat (limited to 'engines/sherlock/scalpel')
-rw-r--r-- | engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp | 4 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel_screen.cpp | 32 |
2 files changed, 18 insertions, 18 deletions
diff --git a/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp b/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp index f848394864..f8112d8add 100644 --- a/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp +++ b/engines/sherlock/scalpel/3do/scalpel_3do_screen.cpp @@ -117,7 +117,7 @@ void Scalpel3DOScreen::fillRect(const Common::Rect &r, uint color) { void Scalpel3DOScreen::fadeIntoScreen3DO(int speed) { Events &events = *_vm->_events; uint16 *currentScreenBasePtr = (uint16 *)getPixels(); - uint16 *targetScreenBasePtr = (uint16 *)_backBuffer->getPixels(); + uint16 *targetScreenBasePtr = (uint16 *)_backBuffer.getPixels(); uint16 currentScreenPixel = 0; uint16 targetScreenPixel = 0; @@ -211,7 +211,7 @@ void Scalpel3DOScreen::fadeIntoScreen3DO(int speed) { void Scalpel3DOScreen::blitFrom3DOcolorLimit(uint16 limitColor) { uint16 *currentScreenPtr = (uint16 *)getPixels(); - uint16 *targetScreenPtr = (uint16 *)_backBuffer->getPixels(); + uint16 *targetScreenPtr = (uint16 *)_backBuffer.getPixels(); uint16 currentScreenPixel = 0; uint16 screenWidth = SHERLOCK_SCREEN_WIDTH; diff --git a/engines/sherlock/scalpel/scalpel_screen.cpp b/engines/sherlock/scalpel/scalpel_screen.cpp index 37e5294c02..ba78f487b6 100644 --- a/engines/sherlock/scalpel/scalpel_screen.cpp +++ b/engines/sherlock/scalpel/scalpel_screen.cpp @@ -35,7 +35,7 @@ ScalpelScreen::ScalpelScreen(SherlockEngine *vm) : Screen(vm) { void ScalpelScreen::makeButton(const Common::Rect &bounds, int textX, const Common::String &buttonText, bool textContainsHotkey) { - Surface &bb = *_backBuffer; + Surface &bb = _backBuffer; bb.fillRect(Common::Rect(bounds.left, bounds.top, bounds.right, bounds.top + 1), BUTTON_TOP); bb.fillRect(Common::Rect(bounds.left, bounds.top, bounds.left + 1, bounds.bottom), BUTTON_TOP); bb.fillRect(Common::Rect(bounds.right - 1, bounds.top, bounds.right, bounds.bottom), BUTTON_BOTTOM); @@ -105,24 +105,24 @@ void ScalpelScreen::buttonPrint(const Common::Point &pt, uint color, bool slamIt } void ScalpelScreen::makePanel(const Common::Rect &r) { - _backBuffer->fillRect(r, BUTTON_MIDDLE); - _backBuffer->hLine(r.left, r.top, r.right - 2, BUTTON_TOP); - _backBuffer->hLine(r.left + 1, r.top + 1, r.right - 3, BUTTON_TOP); - _backBuffer->vLine(r.left, r.top, r.bottom - 1, BUTTON_TOP); - _backBuffer->vLine(r.left + 1, r.top + 1, r.bottom - 2, BUTTON_TOP); - - _backBuffer->vLine(r.right - 1, r.top, r.bottom - 1, BUTTON_BOTTOM); - _backBuffer->vLine(r.right - 2, r.top + 1, r.bottom - 2, BUTTON_BOTTOM); - _backBuffer->hLine(r.left, r.bottom - 1, r.right - 1, BUTTON_BOTTOM); - _backBuffer->hLine(r.left + 1, r.bottom - 2, r.right - 1, BUTTON_BOTTOM); + _backBuffer.fillRect(r, BUTTON_MIDDLE); + _backBuffer.hLine(r.left, r.top, r.right - 2, BUTTON_TOP); + _backBuffer.hLine(r.left + 1, r.top + 1, r.right - 3, BUTTON_TOP); + _backBuffer.vLine(r.left, r.top, r.bottom - 1, BUTTON_TOP); + _backBuffer.vLine(r.left + 1, r.top + 1, r.bottom - 2, BUTTON_TOP); + + _backBuffer.vLine(r.right - 1, r.top, r.bottom - 1, BUTTON_BOTTOM); + _backBuffer.vLine(r.right - 2, r.top + 1, r.bottom - 2, BUTTON_BOTTOM); + _backBuffer.hLine(r.left, r.bottom - 1, r.right - 1, BUTTON_BOTTOM); + _backBuffer.hLine(r.left + 1, r.bottom - 2, r.right - 1, BUTTON_BOTTOM); } void ScalpelScreen::makeField(const Common::Rect &r) { - _backBuffer->fillRect(r, BUTTON_MIDDLE); - _backBuffer->hLine(r.left, r.top, r.right - 1, BUTTON_BOTTOM); - _backBuffer->hLine(r.left + 1, r.bottom - 1, r.right - 1, BUTTON_TOP); - _backBuffer->vLine(r.left, r.top + 1, r.bottom - 1, BUTTON_BOTTOM); - _backBuffer->vLine(r.right - 1, r.top + 1, r.bottom - 2, BUTTON_TOP); + _backBuffer.fillRect(r, BUTTON_MIDDLE); + _backBuffer.hLine(r.left, r.top, r.right - 1, BUTTON_BOTTOM); + _backBuffer.hLine(r.left + 1, r.bottom - 1, r.right - 1, BUTTON_TOP); + _backBuffer.vLine(r.left, r.top + 1, r.bottom - 1, BUTTON_BOTTOM); + _backBuffer.vLine(r.right - 1, r.top + 1, r.bottom - 2, BUTTON_TOP); } } // End of namespace Scalpel |