[Scummvm-cvs-logs] SF.net SVN: scummvm:[35262] scummvm/trunk/engines/saga

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Dec 6 15:38:04 CET 2008


Revision: 35262
          http://scummvm.svn.sourceforge.net/scummvm/?rev=35262&view=rev
Author:   thebluegr
Date:     2008-12-06 14:38:04 +0000 (Sat, 06 Dec 2008)

Log Message:
-----------
Fixed compilation when SAGA_DEBUG is defined

Modified Paths:
--------------
    scummvm/trunk/engines/saga/gfx.h
    scummvm/trunk/engines/saga/objectmap.cpp
    scummvm/trunk/engines/saga/objectmap.h
    scummvm/trunk/engines/saga/render.cpp

Modified: scummvm/trunk/engines/saga/gfx.h
===================================================================
--- scummvm/trunk/engines/saga/gfx.h	2008-12-06 14:37:09 UTC (rev 35261)
+++ scummvm/trunk/engines/saga/gfx.h	2008-12-06 14:38:04 UTC (rev 35262)
@@ -99,9 +99,7 @@
 struct Surface : Graphics::Surface {
 
 	void transitionDissolve(const byte *sourceBuffer, const Common::Rect &sourceRect, int flags, double percent);
-#ifdef SAGA_DEBUG
 	void drawPalette();
-#endif
 	void drawPolyLine(const Point *points, int count, int color);
 	void blit(const Common::Rect &destRect, const byte *sourceBuffer);
 

Modified: scummvm/trunk/engines/saga/objectmap.cpp
===================================================================
--- scummvm/trunk/engines/saga/objectmap.cpp	2008-12-06 14:37:09 UTC (rev 35261)
+++ scummvm/trunk/engines/saga/objectmap.cpp	2008-12-06 14:38:04 UTC (rev 35262)
@@ -149,6 +149,8 @@
 	Point *points;
 	Point specialPoint1;
 	Point specialPoint2;
+	Surface *backBuffer = vm->_gfx->getBackBuffer();
+
 	for (i = 0; i < _clickAreasCount; i++) {
 		clickArea = &_clickAreas[i];
 		pointsCount = clickArea->pointsCount;
@@ -166,11 +168,11 @@
 
 		if (pointsCount == 2) {
 			// 2 points represent a box
-			ds->drawFrame(points[0], points[1], color);
+			backBuffer->drawFrame(points[0], points[1], color);
 		} else {
 			if (pointsCount > 2) {
 				// Otherwise draw a polyline
-				ds->drawPolyLine(points, pointsCount, color);
+				backBuffer->drawPolyLine(points, pointsCount, color);
 			}
 		}
 		if (vm->_scene->getFlags() & kSceneFlagISO) {
@@ -184,7 +186,7 @@
 		specialPoint1.y--;
 		specialPoint2.x++;
 		specialPoint2.y++;
-		ds->drawFrame(specialPoint1, specialPoint2, color);
+		backBuffer->drawFrame(specialPoint1, specialPoint2, color);
 	}
 }
 #endif

Modified: scummvm/trunk/engines/saga/objectmap.h
===================================================================
--- scummvm/trunk/engines/saga/objectmap.h	2008-12-06 14:37:09 UTC (rev 35261)
+++ scummvm/trunk/engines/saga/objectmap.h	2008-12-06 14:38:04 UTC (rev 35262)
@@ -76,9 +76,7 @@
 		return objectIndexToId(kGameObjectStepZone, _index);
 	}
 	bool getSpecialPoint(Point &specialPoint) const;
-#ifdef SAGA_DEBUG
-	void draw(SagaEngine *vm, int color);
-#endif
+	void draw(SagaEngine *vm, int color);	// for debugging
 	bool hitTest(const Point &testPoint);
 
 private:
@@ -105,10 +103,7 @@
 	}
 	void load(const byte *resourcePointer, size_t resourceLength);
 	void freeMem(void);
-
-#ifdef SAGA_DEBUG
-	void draw(Surface *drawSurface, const Point& testPoint, int color, int color2);
-#endif
+	void draw(const Point& testPoint, int color, int color2);	// for debugging
 	int hitTest(const Point& testPoint);
 	HitZone *getHitZone(int16 index) {
 		if ((index < 0) || (index >= _hitZoneListCount)) {

Modified: scummvm/trunk/engines/saga/render.cpp
===================================================================
--- scummvm/trunk/engines/saga/render.cpp	2008-12-06 14:37:09 UTC (rev 35261)
+++ scummvm/trunk/engines/saga/render.cpp	2008-12-06 14:38:04 UTC (rev 35262)
@@ -115,9 +115,9 @@
 #ifdef SAGA_DEBUG
 			if (getFlags() & RF_OBJECTMAP_TEST) {
 				if (_vm->_scene->_objectMap)
-					_vm->_scene->_objectMap->draw(backBufferSurface, mousePoint, kITEColorBrightWhite, kITEColorBlack);
+					_vm->_scene->_objectMap->draw(mousePoint, kITEColorBrightWhite, kITEColorBlack);
 				if (_vm->_scene->_actionMap)
-					_vm->_scene->_actionMap->draw(backBufferSurface, mousePoint, kITEColorRed, kITEColorBlack);
+					_vm->_scene->_actionMap->draw(mousePoint, kITEColorRed, kITEColorBlack);
 			}
 #endif
 
@@ -168,7 +168,7 @@
 		textPoint.x = backBufferSurface->w - _vm->_font->getStringWidth(kKnownFontSmall, txtBuffer, 0, kFontOutline);
 		textPoint.y = 2;
 
-		_vm->_font->textDraw(kKnownFontSmall, backBufferSurface, txtBuffer, textPoint, kITEColorBrightWhite, kITEColorBlack, kFontOutline);
+		_vm->_font->textDraw(kKnownFontSmall, txtBuffer, textPoint, kITEColorBrightWhite, kITEColorBlack, kFontOutline);
 	}
 #endif
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list