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

somaen einarjohants at gmail.com
Tue Jan 22 23:13:27 CET 2013


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

Summary:
ff1e91226d WINTERMUTE: Allow users to enable the FPS-counter in the GUI, and disable MT32-settings.
d52ad7e0eb WINTERMUTE: Use prefix-operators on iterators.


Commit: ff1e91226d22209beb80c6e87666fd9cbbeef33d
    https://github.com/scummvm/scummvm/commit/ff1e91226d22209beb80c6e87666fd9cbbeef33d
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2013-01-22T13:05:20-08:00

Commit Message:
WINTERMUTE: Allow users to enable the FPS-counter in the GUI, and disable MT32-settings.

Changed paths:
    engines/wintermute/detection.cpp
    engines/wintermute/detection_tables.h
    engines/wintermute/wintermute.cpp



diff --git a/engines/wintermute/detection.cpp b/engines/wintermute/detection.cpp
index 04f7f3b..1bf2c76 100644
--- a/engines/wintermute/detection.cpp
+++ b/engines/wintermute/detection.cpp
@@ -28,6 +28,7 @@
 #include "common/error.h"
 #include "common/fs.h"
 #include "common/util.h"
+#include "common/translation.h"
 
 #include "engines/metaengine.h"
 
@@ -49,6 +50,20 @@ static ADGameDescription s_fallbackDesc = {
 	ADGF_UNSTABLE,
 	GUIO0()
 };
+
+static const ADExtraGuiOptionsMap gameGuiOptions[] = {
+	{
+		GAMEOPTION_SHOW_FPS,
+		{
+			_s("Show FPS-counter"),
+			_s("Show the current number of frames per second in the upper left corner"),
+			"show_fps",
+			false
+		}
+	},
+	AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
 static char s_fallbackGameIdBuf[256];
 
 static const char *directoryGlobs[] = {
@@ -58,8 +73,9 @@ static const char *directoryGlobs[] = {
 
 class WintermuteMetaEngine : public AdvancedMetaEngine {
 public:
-	WintermuteMetaEngine() : AdvancedMetaEngine(Wintermute::gameDescriptions, sizeof(ADGameDescription), Wintermute::wintermuteGames) {
+	WintermuteMetaEngine() : AdvancedMetaEngine(Wintermute::gameDescriptions, sizeof(ADGameDescription), Wintermute::wintermuteGames, gameGuiOptions) {
 		_singleid = "wintermute";
+		_guioptions = GUIO2(GUIO_NOMIDI, GAMEOPTION_SHOW_FPS);
 		_maxScanDepth = 2;
 		_directoryGlobs = directoryGlobs;
 	}
diff --git a/engines/wintermute/detection_tables.h b/engines/wintermute/detection_tables.h
index 0c84310..6b6dec6 100644
--- a/engines/wintermute/detection_tables.h
+++ b/engines/wintermute/detection_tables.h
@@ -22,6 +22,8 @@
 
 namespace Wintermute {
 
+#define GAMEOPTION_SHOW_FPS GUIO_GAMEOPTIONS1
+
 static const PlainGameDescriptor wintermuteGames[] = {
 	{"5ld",             "Five Lethal Demons"},
 	{"5ma",             "Five Magical Amulets"},
diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index d2b761a..bf8b1bb 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -55,6 +55,7 @@ WintermuteEngine::WintermuteEngine(OSystem *syst, const ADGameDescription *desc)
 	// Put your engine in a sane state, but do nothing big yet;
 	// in particular, do not load data from files; rather, if you
 	// need to do such things, do them from init().
+	ConfMan.registerDefault("show_fps","false");
 
 	// Do not initialize graphics here
 


Commit: d52ad7e0ebb290984b2907793aa183d236f81e53
    https://github.com/scummvm/scummvm/commit/d52ad7e0ebb290984b2907793aa183d236f81e53
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2013-01-22T14:00:47-08:00

Commit Message:
WINTERMUTE: Use prefix-operators on iterators.

Changed paths:
    engines/wintermute/base/gfx/osystem/base_render_osystem.cpp



diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
index 6a27f8d..8c902cf 100644
--- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
+++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp
@@ -294,7 +294,7 @@ void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::S
 					drawFromSurface(compareTicket);
 				} else {
 					drawFromTicket(compareTicket);
-					_lastAddedTicket++;
+					++_lastAddedTicket;
 				}
 				return;
 			}
@@ -305,7 +305,7 @@ void BaseRenderOSystem::drawSurface(BaseSurfaceOSystem *owner, const Graphics::S
 	if (!_disableDirtyRects) {
 		drawFromTicket(ticket);
 		drawFromSurface(ticket);
-		_lastAddedTicket++;
+		++_lastAddedTicket;
 	} else {
 		ticket->_wantsDraw = true;
 		_renderQueue.push_back(ticket);






More information about the Scummvm-git-logs mailing list