diff options
author | Strangerke | 2014-01-10 01:46:38 +0100 |
---|---|---|
committer | Strangerke | 2014-01-10 01:46:38 +0100 |
commit | b3c377aacd1fb493fc6ec8a6c4a08ded2db95af2 (patch) | |
tree | f4d6f6c3633726c84e45d9a9847aaf5306fcbc9f /engines/mortevielle/graphics.cpp | |
parent | 048e04a072a34b19cf4e8d7cb3c1b245e1afc969 (diff) | |
download | scummvm-rg350-b3c377aacd1fb493fc6ec8a6c4a08ded2db95af2.tar.gz scummvm-rg350-b3c377aacd1fb493fc6ec8a6c4a08ded2db95af2.tar.bz2 scummvm-rg350-b3c377aacd1fb493fc6ec8a6c4a08ded2db95af2.zip |
MORTEVIELLE: Get rid of setParent()
Diffstat (limited to 'engines/mortevielle/graphics.cpp')
-rw-r--r-- | engines/mortevielle/graphics.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/engines/mortevielle/graphics.cpp b/engines/mortevielle/graphics.cpp index 7a7e9265c5..18b0e7f1c1 100644 --- a/engines/mortevielle/graphics.cpp +++ b/engines/mortevielle/graphics.cpp @@ -881,6 +881,10 @@ GfxSurface::~GfxSurface() { * Screen surface *-------------------------------------------------------------------------*/ +ScreenSurface::ScreenSurface(MortevielleEngine *vm) { + _vm = vm; +} + /** * Called to populate the font data from the passed file */ @@ -1082,11 +1086,11 @@ void ScreenSurface::drawString(const Common::String &l, int command) { case 0: case 2: color = 15; - _vm->_screenSurface.fillRect(0, Common::Rect(pt.x, pt.y, x, pt.y + 7)); + _vm->_screenSurface->fillRect(0, Common::Rect(pt.x, pt.y, x, pt.y + 7)); break; case 1: case 3: - _vm->_screenSurface.fillRect(15, Common::Rect(pt.x, pt.y, x, pt.y + 7)); + _vm->_screenSurface->fillRect(15, Common::Rect(pt.x, pt.y, x, pt.y + 7)); break; case 5: color = 15; @@ -1099,7 +1103,7 @@ void ScreenSurface::drawString(const Common::String &l, int command) { pt.x += 1; pt.y += 1; for (x = 1; (x <= (int)l.size()) && (l[x - 1] != 0); ++x) { - _vm->_screenSurface.writeCharacter(Common::Point(pt.x, pt.y), l[x - 1], color); + _vm->_screenSurface->writeCharacter(Common::Point(pt.x, pt.y), l[x - 1], color); pt.x += charWidth; } _vm->_mouse->showMouse(); @@ -1133,7 +1137,7 @@ void ScreenSurface::drawLine(int x, int y, int xx, int yy, int coul) { else step = 1; do { - _vm->_screenSurface.setPixel(Common::Point(abs((int)(a * i + b)), i), coul); + _vm->_screenSurface->setPixel(Common::Point(abs((int)(a * i + b)), i), coul); i += step; } while (i != yy); } else { @@ -1145,7 +1149,7 @@ void ScreenSurface::drawLine(int x, int y, int xx, int yy, int coul) { else step = 1; do { - _vm->_screenSurface.setPixel(Common::Point(i, abs((int)(a * i + b))), coul); + _vm->_screenSurface->setPixel(Common::Point(i, abs((int)(a * i + b))), coul); i = i + step; } while (i != xx); } @@ -1156,12 +1160,7 @@ void ScreenSurface::drawLine(int x, int y, int xx, int yy, int coul) { * @remarks Originally called 'paint_rect' */ void ScreenSurface::drawRectangle(int x, int y, int dx, int dy) { - _vm->_screenSurface.fillRect(11, Common::Rect(x, y, x + dx, y + dy)); + _vm->_screenSurface->fillRect(11, Common::Rect(x, y, x + dx, y + dy)); } -void ScreenSurface::setParent(MortevielleEngine *vm) { - _vm = vm; -} - - } // End of namespace Mortevielle |