[Scummvm-git-logs] scummvm master -> 4f077f2b5a747dc2794060bf486c79b6d7eb0030

digitall dgturner at iee.org
Fri Oct 19 00:32:44 CEST 2018


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4f077f2b5a HOPKINS: Add Graphics Screen Update Debugging Code.


Commit: 4f077f2b5a747dc2794060bf486c79b6d7eb0030
    https://github.com/scummvm/scummvm/commit/4f077f2b5a747dc2794060bf486c79b6d7eb0030
Author: D G Turner (digitall at scummvm.org)
Date: 2018-10-18T23:40:35+01:00

Commit Message:
HOPKINS: Add Graphics Screen Update Debugging Code.

This is mainly to aid investigation of bug Trac #6310.

Changed paths:
    engines/hopkins/graphics.cpp
    engines/hopkins/hopkins.cpp
    engines/hopkins/hopkins.h


diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 3cdf6ad..86a25c5 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 dd64c0c..8f301fd 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 3528a98..ee2592e 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
 };
 
 /**





More information about the Scummvm-git-logs mailing list