[Scummvm-cvs-logs] scummvm master -> bade0e45b0ca0b550019a9bd3cea92a186300dcf

Strangerke Strangerke at scummvm.org
Wed Jan 1 16:30:44 CET 2014


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:
bade0e45b0 TSAGE: R2R Demo - Fix some incomplete tests on GF_DEMO


Commit: bade0e45b0ca0b550019a9bd3cea92a186300dcf
    https://github.com/scummvm/scummvm/commit/bade0e45b0ca0b550019a9bd3cea92a186300dcf
Author: Strangerke (strangerke at scummvm.org)
Date: 2014-01-01T07:30:02-08:00

Commit Message:
TSAGE: R2R Demo - Fix some incomplete tests on GF_DEMO

Changed paths:
    engines/tsage/events.cpp
    engines/tsage/globals.cpp
    engines/tsage/graphics.cpp



diff --git a/engines/tsage/events.cpp b/engines/tsage/events.cpp
index 6baa654..0ba6038 100644
--- a/engines/tsage/events.cpp
+++ b/engines/tsage/events.cpp
@@ -156,7 +156,7 @@ void EventsClass::setCursor(CursorType cursorType) {
 		// No cursor
 		g_globals->setFlag(122);
 
-		if ((g_vm->getFeatures() & GF_DEMO) || (g_vm->getGameID() != GType_Ringworld))  {
+		if ((g_vm->getGameID() != GType_Ringworld) || ((g_vm->getGameID() == GType_Ringworld) && (g_vm->getFeatures() & GF_DEMO)))  {
 			CursorMan.showMouse(false);
 			return;
 		}
diff --git a/engines/tsage/globals.cpp b/engines/tsage/globals.cpp
index 50d4b4e..9b1b0f1 100644
--- a/engines/tsage/globals.cpp
+++ b/engines/tsage/globals.cpp
@@ -64,17 +64,39 @@ Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface
 	_stripNum = 0;
 	_gfxEdgeAdjust = 3;
 
-	if (g_vm->getFeatures() & GF_DEMO) {
-		_gfxFontNumber = 0;
-		_gfxColors.background = 6;
-		_gfxColors.foreground = 0;
-		_fontColors.background = 255;
-		_fontColors.foreground = 6;
-		_dialogCenter.y = 80;
-		// Workaround in order to use later version of the engine
-		_color1 = _gfxColors.foreground;
-		_color2 = _gfxColors.foreground;
-		_color3 = _gfxColors.foreground;
+	if (g_vm->getGameID() == GType_Ringworld) {
+		if (g_vm->getFeatures() & GF_DEMO) {
+			_gfxFontNumber = 0;
+			_gfxColors.background = 6;
+			_gfxColors.foreground = 0;
+			_fontColors.background = 255;
+			_fontColors.foreground = 6;
+			_dialogCenter.y = 80;
+			// Workaround in order to use later version of the engine
+			_color1 = _gfxColors.foreground;
+			_color2 = _gfxColors.foreground;
+			_color3 = _gfxColors.foreground;
+		} else if (g_vm->getFeatures() & GF_CD) {
+			_gfxFontNumber = 50;
+			_gfxColors.background = 53;
+			_gfxColors.foreground = 0;
+			_fontColors.background = 51;
+			_fontColors.foreground = 54;
+			_color1 = 18;
+			_color2 = 18;
+			_color3 = 18;
+		} else {
+		// Floppy version
+			_gfxFontNumber = 50;
+			_gfxColors.background = 53;
+			_gfxColors.foreground = 18;
+			_fontColors.background = 51;
+			_fontColors.foreground = 54;
+			// Workaround in order to use later version of the engine
+			_color1 = _gfxColors.foreground;
+			_color2 = _gfxColors.foreground;
+			_color3 = _gfxColors.foreground;
+		}
 	} else if (g_vm->getGameID() == GType_BlueForce) {
 		// Blue Force
 		_gfxFontNumber = 0;
@@ -94,26 +116,6 @@ Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface
 		_color2 = 15;
 		_color3 = 4;
 		_dialogCenter.y = 100;
-	} else if ((g_vm->getGameID() == GType_Ringworld) &&  (g_vm->getFeatures() & GF_CD)) {
-		_gfxFontNumber = 50;
-		_gfxColors.background = 53;
-		_gfxColors.foreground = 0;
-		_fontColors.background = 51;
-		_fontColors.foreground = 54;
-		_color1 = 18;
-		_color2 = 18;
-		_color3 = 18;
-	} else {
-		// Ringworld
-		_gfxFontNumber = 50;
-		_gfxColors.background = 53;
-		_gfxColors.foreground = 18;
-		_fontColors.background = 51;
-		_fontColors.foreground = 54;
-		// Workaround in order to use later version of the engine
-		_color1 = _gfxColors.foreground;
-		_color2 = _gfxColors.foreground;
-		_color3 = _gfxColors.foreground;
 	}
 	_screenSurface.setScreenSurface();
 	_gfxManagers.push_back(&_gfxManagerInstance);
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index fa3ed33..97857ac 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -1390,7 +1390,10 @@ void GfxManager::copyFrom(GfxSurface &src, const Rect &srcBounds, const Rect &de
 
 
 GfxFont::GfxFont() {
-	_fontNumber = (g_vm->getFeatures() & GF_DEMO) ? 0 : 50;
+	if ((g_vm->getGameID() == GType_Ringworld) && (g_vm->getFeatures() & GF_DEMO))
+		_fontNumber = 0;
+	else
+		_fontNumber = 50;
 	_numChars = 0;
 	_bpp = 0;
 	_fontData = NULL;






More information about the Scummvm-git-logs mailing list