aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins
diff options
context:
space:
mode:
authorD G Turner2018-10-18 23:40:35 +0100
committerD G Turner2018-10-18 23:40:35 +0100
commit4f077f2b5a747dc2794060bf486c79b6d7eb0030 (patch)
tree884083c0c558875aa230a4224ecb73c898321c55 /engines/hopkins
parent91732239991918b25633cd07d6c5ae834e599115 (diff)
downloadscummvm-rg350-4f077f2b5a747dc2794060bf486c79b6d7eb0030.tar.gz
scummvm-rg350-4f077f2b5a747dc2794060bf486c79b6d7eb0030.tar.bz2
scummvm-rg350-4f077f2b5a747dc2794060bf486c79b6d7eb0030.zip
HOPKINS: Add Graphics Screen Update Debugging Code.
This is mainly to aid investigation of bug Trac #6310.
Diffstat (limited to 'engines/hopkins')
-rw-r--r--engines/hopkins/graphics.cpp5
-rw-r--r--engines/hopkins/hopkins.cpp1
-rw-r--r--engines/hopkins/hopkins.h3
3 files changed, 8 insertions, 1 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 3cdf6add8f..86a25c5ea4 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -676,6 +676,7 @@ void GraphicsManager::updateScreen() {
// Update the screen
g_system->updateScreen();
+ debugC(1, kDebugGraphics, "updateScreen()");
}
void GraphicsManager::copyWinscanVbe3(const byte *srcData, byte *destSurface) {
@@ -1141,10 +1142,12 @@ void GraphicsManager::displayDirtyRects() {
}
void GraphicsManager::displayRefreshRects() {
+ debugC(1, kDebugGraphics, "displayRefreshRects() start");
Graphics::Surface *screenSurface = NULL;
if (_showDirtyRects) {
screenSurface = g_system->lockScreen();
g_system->copyRectToScreen(_screenBuffer, _screenLineSize, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
+ debugC(1, kDebugGraphics, "\tcopyRectToScreen(_screenBuffer, %d, %d, %d, %d, %d) - Full Blit", _screenLineSize, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
}
// Loop through copying over any specified rects to the screen
@@ -1153,6 +1156,7 @@ void GraphicsManager::displayRefreshRects() {
byte *srcP = _screenBuffer + _screenLineSize * r.top + (r.left * 2);
g_system->copyRectToScreen(srcP, _screenLineSize, r.left, r.top, r.width(), r.height());
+ debugC(1, kDebugGraphics, "\tcopyRectToScreen(_screenBuffer[%d][%d], %d, %d, %d, %d, %d) - Rect Blit", (r.left * 2), (_screenLineSize * r.top), _screenLineSize, r.left, r.top, r.width(), r.height());
if (_showDirtyRects)
screenSurface->frameRect(r, 0xffffff);
@@ -1162,6 +1166,7 @@ void GraphicsManager::displayRefreshRects() {
g_system->unlockScreen();
resetRefreshRects();
+ debugC(1, kDebugGraphics, "displayRefreshRects() end");
}
/**
diff --git a/engines/hopkins/hopkins.cpp b/engines/hopkins/hopkins.cpp
index dd64c0cc71..8f301fdc0f 100644
--- a/engines/hopkins/hopkins.cpp
+++ b/engines/hopkins/hopkins.cpp
@@ -38,6 +38,7 @@ namespace Hopkins {
HopkinsEngine::HopkinsEngine(OSystem *syst, const HopkinsGameDescription *gameDesc) : Engine(syst),
_gameDescription(gameDesc), _randomSource("Hopkins") {
DebugMan.addDebugChannel(kDebugPath, "Path", "Pathfinding debug level");
+ DebugMan.addDebugChannel(kDebugGraphics, "Graphics", "Graphics debug level");
_animMan = new AnimationManager(this);
_computer = new ComputerManager(this);
_dialog = new DialogsManager(this);
diff --git a/engines/hopkins/hopkins.h b/engines/hopkins/hopkins.h
index 3528a98d58..ee2592e405 100644
--- a/engines/hopkins/hopkins.h
+++ b/engines/hopkins/hopkins.h
@@ -63,7 +63,8 @@ namespace Hopkins {
#define SCREEN_HEIGHT 480
enum HopkinsDebugChannels {
- kDebugPath = 1 << 0
+ kDebugPath = 1 << 0,
+ kDebugGraphics = 1 << 1
};
/**