From 72f1fb0bed17106fa4d3b437699bc1bc9db62192 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 16 Jun 2012 02:37:55 +0200 Subject: TOLTECS: Get rid of casts on OSystem::copyRectToScreen calls. --- engines/toltecs/menu.cpp | 6 +++--- engines/toltecs/render.cpp | 4 ++-- engines/toltecs/toltecs.cpp | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/toltecs/menu.cpp b/engines/toltecs/menu.cpp index 172ec0a565..415f19ca31 100644 --- a/engines/toltecs/menu.cpp +++ b/engines/toltecs/menu.cpp @@ -81,7 +81,7 @@ int MenuSystem::run() { // Restore original background memcpy(_vm->_screen->_frontScreen, backgroundOrig.getBasePtr(0,0), 640 * 400); - _vm->_system->copyRectToScreen((const byte *)_vm->_screen->_frontScreen, 640, 0, 0, 640, 400); + _vm->_system->copyRectToScreen(_vm->_screen->_frontScreen, 640, 0, 0, 640, 400); _vm->_system->updateScreen(); // Cleanup @@ -103,8 +103,8 @@ void MenuSystem::update() { handleEvents(); if (_needRedraw) { - //_vm->_system->copyRectToScreen((const byte *)_vm->_screen->_frontScreen + 39 * 640 + 60, 640, 60, 39, 520, 247); - _vm->_system->copyRectToScreen((const byte *)_vm->_screen->_frontScreen, 640, 0, 0, 640, 400); + //_vm->_system->copyRectToScreen(_vm->_screen->_frontScreen + 39 * 640 + 60, 640, 60, 39, 520, 247); + _vm->_system->copyRectToScreen(_vm->_screen->_frontScreen, 640, 0, 0, 640, 400); //debug("redraw"); _needRedraw = false; } diff --git a/engines/toltecs/render.cpp b/engines/toltecs/render.cpp index de5e77fb50..3f5356493e 100644 --- a/engines/toltecs/render.cpp +++ b/engines/toltecs/render.cpp @@ -193,7 +193,7 @@ void RenderQueue::update() { if (doFullRefresh) { clear(); - _vm->_system->copyRectToScreen((const byte *)_vm->_screen->_frontScreen, 640, 0, 0, 640, _vm->_cameraHeight); + _vm->_system->copyRectToScreen(_vm->_screen->_frontScreen, 640, 0, 0, 640, _vm->_cameraHeight); } else { updateDirtyRects(); } @@ -301,7 +301,7 @@ void RenderQueue::updateDirtyRects() { int n_rects = 0; Common::Rect *rects = _updateUta->getRectangles(&n_rects, 0, 0, 639, _vm->_cameraHeight - 1); for (int i = 0; i < n_rects; i++) { - _vm->_system->copyRectToScreen((const byte *)_vm->_screen->_frontScreen + rects[i].left + rects[i].top * 640, + _vm->_system->copyRectToScreen(_vm->_screen->_frontScreen + rects[i].left + rects[i].top * 640, 640, rects[i].left, rects[i].top, rects[i].width(), rects[i].height()); } delete[] rects; diff --git a/engines/toltecs/toltecs.cpp b/engines/toltecs/toltecs.cpp index d403e0499b..6d6c37dffd 100644 --- a/engines/toltecs/toltecs.cpp +++ b/engines/toltecs/toltecs.cpp @@ -300,7 +300,7 @@ void ToltecsEngine::drawScreen() { if (_screen->_guiRefresh && _guiHeight > 0 && _cameraHeight > 0) { // Update the GUI when needed and it's visible - _system->copyRectToScreen((const byte *)_screen->_frontScreen + _cameraHeight * 640, + _system->copyRectToScreen(_screen->_frontScreen + _cameraHeight * 640, 640, 0, _cameraHeight, 640, _guiHeight); _screen->_guiRefresh = false; } -- cgit v1.2.3