[Scummvm-cvs-logs] CVS: scummvm/bs2 anims.cpp,1.34,1.35 function.cpp,1.28,1.29 maketext.cpp,1.24,1.25 resman.cpp,1.56,1.57 sound.cpp,1.28,1.29 sword2.cpp,1.65,1.66 sword2.h,1.25,1.26

Max Horn fingolfin at users.sourceforge.net
Tue Oct 28 09:08:20 CET 2003


Update of /cvsroot/scummvm/scummvm/bs2
In directory sc8-pr-cvs1:/tmp/cvs-serv20245/bs2

Modified Files:
	anims.cpp function.cpp maketext.cpp resman.cpp sound.cpp 
	sword2.cpp sword2.h 
Log Message:
cleanup: removed version/id from GameSettings

Index: anims.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/anims.cpp,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- anims.cpp	26 Oct 2003 15:42:48 -0000	1.34
+++ anims.cpp	28 Oct 2003 17:07:22 -0000	1.35
@@ -754,7 +754,7 @@
 
 	MoviePlayer player; 
 
-	if (sequenceTextLines && g_sword2->_gameId == GID_SWORD2)
+	if (sequenceTextLines && !(g_sword2->_features & GF_DEMO))
 		rv = player.play(filename, sequenceSpeechArray, leadOut);
 	else
 		rv = player.play(filename, NULL, leadOut);

Index: function.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/function.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- function.cpp	26 Oct 2003 15:42:49 -0000	1.28
+++ function.cpp	28 Oct 2003 17:07:22 -0000	1.29
@@ -455,7 +455,7 @@
 	// FIXME: This probably isn't the correct way of shutting down ScummVM
 	// Anyway, I don't know if we ever call this from the demo.
 
-	if (g_sword2->_gameId == GID_SWORD2_DEMO) {
+	if (g_sword2->_features & GF_DEMO) {
 		Close_game();		// close engine systems down
 		exit(0);		// quit the game
 	}

Index: maketext.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/maketext.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- maketext.cpp	26 Oct 2003 15:42:49 -0000	1.24
+++ maketext.cpp	28 Oct 2003 17:07:23 -0000	1.25
@@ -590,7 +590,7 @@
 
 	// Get the text line - skip the 2 chars containing the wavId
 
-	if (g_sword2->_gameId == GID_SWORD2_DEMO)
+	if (g_sword2->_features & GF_DEMO)
 		textLine = FetchTextLine(textFile, 451) + 2;
 	else
 		textLine = FetchTextLine(textFile, 54) + 2;

Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/resman.cpp,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- resman.cpp	26 Oct 2003 15:42:49 -0000	1.56
+++ resman.cpp	28 Oct 2003 17:07:23 -0000	1.57
@@ -1222,7 +1222,7 @@
 
 	// don't ask for CD's in the playable demo downloaded from our
 	// web-site!
-	if (g_sword2->_gameId == GID_SWORD2_DEMO)
+	if (g_sword2->_features & GF_DEMO)
 		return;
 
 #ifdef _PCGUIDE

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sound.cpp,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- sound.cpp	26 Oct 2003 15:42:49 -0000	1.28
+++ sound.cpp	28 Oct 2003 17:07:23 -0000	1.29
@@ -368,7 +368,7 @@
 
 	// add the appropriate file extension & play it
 
-	if (g_sword2->_gameId == GID_SWORD2_DEMO) {
+	if (g_sword2->_features & GF_DEMO) {
 		// The demo I found didn't come with any music file, but you
 		// could use the music from the first CD of the complete game,
 		// I suppose...

Index: sword2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sword2.cpp,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -d -r1.65 -r1.66
--- sword2.cpp	26 Oct 2003 19:16:59 -0000	1.65
+++ sword2.cpp	28 Oct 2003 17:07:23 -0000	1.66
@@ -57,10 +57,10 @@
 
 static const GameSettings sword2_settings[] = {
 	/* Broken Sword 2 */
-	{"sword2", "Broken Sword II", GID_SWORD2, 99, MDT_ADLIB | MDT_NATIVE, GF_DEFAULT_TO_1X_SCALER, "players.clu" },
-	{"sword2alt", "Broken Sword II (alt)", GID_SWORD2, 99, MDT_ADLIB | MDT_NATIVE, GF_DEFAULT_TO_1X_SCALER, "r2ctlns.ocx" },
-	{"sword2demo", "Broken Sword II (Demo)", GID_SWORD2_DEMO, 99, MDT_ADLIB | MDT_NATIVE, GF_DEFAULT_TO_1X_SCALER, "players.clu" },
-	{NULL, NULL, 0, 0, MDT_NONE, 0, NULL}
+	{"sword2", "Broken Sword II", MDT_ADLIB | MDT_NATIVE, GF_DEFAULT_TO_1X_SCALER, "players.clu" },
+	{"sword2alt", "Broken Sword II (alt)", MDT_ADLIB | MDT_NATIVE, GF_DEFAULT_TO_1X_SCALER, "r2ctlns.ocx" },
+	{"sword2demo", "Broken Sword II (Demo)", MDT_ADLIB | MDT_NATIVE, GF_DEFAULT_TO_1X_SCALER | GF_DEMO, "players.clu" },
+	{NULL, NULL, MDT_NONE, 0, NULL}
 };
 
 GameList Engine_SWORD2_gameList() {
@@ -123,7 +123,6 @@
 	_newgui = NULL;
 	_debugger = NULL;
 	_features = detector->_game.features;
-	_gameId = detector->_game.id;
 	_targetName = strdup(detector->_targetName.c_str());
 	_bootParam = ConfMan.getInt("boot_param");
 	_saveSlot = ConfMan.getInt("save_slot");
@@ -221,7 +220,7 @@
 	Init_fx_queue();
 
 	// all demos (not just web)
-	if (_gameId == GID_SWORD2_DEMO) {
+	if (_features & GF_DEMO) {
 		// set script variable
 		DEMO = 1;
 	}
@@ -374,7 +373,7 @@
 			} else if (c == 'P') {
 				// 'P' while not paused = pause!
 				PauseGame();
-			} else if (c == 'C' && _gameId == GID_SWORD2) {
+			} else if (c == 'C' && !(_features & GF_DEMO)) {
 				g_logic.fnPlayCredits(NULL);
 			}
 #ifdef _SWORD2_DEBUG
@@ -426,7 +425,7 @@
 	debug(5, "Start_game() STARTING:");
 
 	// all demos not just web
-	if (_gameId == GID_SWORD2_DEMO)
+	if (_features & GF_DEMO)
 		screen_manager_id = 19;		// DOCKS SECTION START
 	else
 		screen_manager_id = 949;	// INTRO & PARIS START

Index: sword2.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sword2.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- sword2.h	26 Oct 2003 21:30:49 -0000	1.25
+++ sword2.h	28 Oct 2003 17:07:23 -0000	1.26
@@ -29,9 +29,8 @@
 #include "bs2/driver/d_sound.h"
 #include "bs2/driver/d_draw.h"
 
-enum BSGameId {
-	GID_SWORD2 = GID_SWORD2_FIRST,
-	GID_SWORD2_DEMO
+enum {
+	GF_DEMO	= 1 << 0
 };
 
 class NewGui;
@@ -73,7 +72,6 @@
 	int32 InitialiseGame(void);
 	GameDetector *_detector;
 	uint32 _features;
-	byte _gameId;
 	char *_targetName; // target name for saves
 
 	Sound *_sound;





More information about the Scummvm-git-logs mailing list