aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2013-03-02 20:57:42 -0500
committerPaul Gilbert2013-03-02 20:57:42 -0500
commit9d8eb97840072ee2c55dabdaf07c05b4db086eea (patch)
tree0bc8eff4170c1f0d68be18fc848008d671dd6602
parent95aca78bcdc42a2765220c2fbd990539168b15b5 (diff)
downloadscummvm-rg350-9d8eb97840072ee2c55dabdaf07c05b4db086eea.tar.gz
scummvm-rg350-9d8eb97840072ee2c55dabdaf07c05b4db086eea.tar.bz2
scummvm-rg350-9d8eb97840072ee2c55dabdaf07c05b4db086eea.zip
HOPKINS: Hooked up display code for refresh rects
-rw-r--r--engines/hopkins/graphics.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 75280c48d7..c7b6904335 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -162,6 +162,8 @@ void GraphicsManager::unlockScreen() {
void GraphicsManager::clearScreen() {
assert(_videoPtr);
Common::fill(_videoPtr, _videoPtr + WinScan * _screenHeight, 0);
+ if (!_isPhysicalPtr)
+ addRefreshRect(Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
}
/**
@@ -1179,15 +1181,14 @@ void GraphicsManager::displayDirtyRects() {
}
void GraphicsManager::displayRefreshRects() {
- if (_refreshRects.size() == 0)
- return;
-/*
+ // Loop through copying over any specified rects to the screen
for (uint idx = 0; idx < _refreshRects.size(); ++idx) {
const Common::Rect &r = _refreshRects[idx];
- g_system->copyRectToScreen(_screenBuffer, WinScan,)
+ byte *srcP = _screenBuffer + WinScan * r.top + (r.left * 2);
+ g_system->copyRectToScreen(srcP, WinScan, r.left, r.top, r.width(), r.height());
}
-*/
+
resetRefreshRects();
}