[Scummvm-cvs-logs] scummvm master -> 1f509f13b238789499a869e5a0946b26f53c630b

Strangerke Strangerke at scummvm.org
Sun May 12 18:46:12 CEST 2013


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:
1f509f13b2 HOPKINS: Use different colors for displaying hotspot zones


Commit: 1f509f13b238789499a869e5a0946b26f53c630b
    https://github.com/scummvm/scummvm/commit/1f509f13b238789499a869e5a0946b26f53c630b
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-05-12T09:44:52-07:00

Commit Message:
HOPKINS: Use different colors for displaying hotspot zones

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



diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index aa71b2c..636bdb4 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -1176,7 +1176,7 @@ void GraphicsManager::displayZones() {
 				_vm->_objectsMan->_bob[bobId]._oldX + _vm->_objectsMan->_bob[bobId]._oldWidth,
 				_vm->_objectsMan->_bob[bobId]._oldY + _vm->_objectsMan->_bob[bobId]._oldHeight);
 				
-			displayDebugRect(screenSurface, r);
+			displayDebugRect(screenSurface, r, 0xff0000);
 		}
 	}
 
@@ -1185,14 +1185,14 @@ void GraphicsManager::displayZones() {
 			Common::Rect r(_vm->_linesMan->_squareZone[squareZoneId]._left, _vm->_linesMan->_squareZone[squareZoneId]._top,
 				_vm->_linesMan->_squareZone[squareZoneId]._right, _vm->_linesMan->_squareZone[squareZoneId]._bottom);
 
-			displayDebugRect(screenSurface, r);
+			displayDebugRect(screenSurface, r, 0x00ff00);
 		}
 	}
 
 	g_system->unlockScreen();
 }
 
-void GraphicsManager::displayDebugRect(Graphics::Surface *surface, const Common::Rect &srcRect) {
+void GraphicsManager::displayDebugRect(Graphics::Surface *surface, const Common::Rect &srcRect, uint32 color) {
 	Common::Rect r = srcRect;
 
 	// Move for scrolling offset and adjust to crop on-screen
@@ -1204,7 +1204,7 @@ void GraphicsManager::displayDebugRect(Graphics::Surface *surface, const Common:
 				
 	// If there's an on-screen portion, display it
 	if (r.isValidRect())
-		surface->frameRect(r, 0xffffff);
+		surface->frameRect(r, color);
 }
 
 /**
diff --git a/engines/hopkins/graphics.h b/engines/hopkins/graphics.h
index 142de12..2cdc430 100644
--- a/engines/hopkins/graphics.h
+++ b/engines/hopkins/graphics.h
@@ -124,7 +124,7 @@ public:
 public:
 	GraphicsManager(HopkinsEngine *vm);
 	~GraphicsManager();
-
+	
 	void clearPalette();
 	void clearScreen();
 	void clearVesaScreen();
@@ -137,7 +137,7 @@ public:
 	void displayDirtyRects();
 	void displayRefreshRects();
 	void displayZones();
-	void displayDebugRect(Graphics::Surface *surface, const Common::Rect &srcRect);
+	void displayDebugRect(Graphics::Surface *surface, const Common::Rect &srcRect, uint32 color = 0xffffff);
 	void copySurface(const byte *surface, int x1, int y1, int width, int height, byte *destSurface, int destX, int destY);
 	void loadImage(const Common::String &file);
 	void loadVgaImage(const Common::String &file);






More information about the Scummvm-git-logs mailing list