[Scummvm-cvs-logs] CVS: scummvm/saga binread.cpp,1.2,1.3 gamedesc.cpp,1.3,1.4 gamedesc.h,1.2,1.3 gamedesc_priv.h,1.1,1.2 resfile.cpp,1.2,1.3 saga.cpp,1.1,1.2 saga.h,1.1,1.2

Eugene Sandulenko sev at users.sourceforge.net
Sun Mar 14 18:47:22 CET 2004


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15450

Modified Files:
	binread.cpp gamedesc.cpp gamedesc.h gamedesc_priv.h 
	resfile.cpp saga.cpp saga.h 
Log Message:
Use Saga namespace everywhere


Index: binread.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/binread.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- binread.cpp	15 Mar 2004 01:14:48 -0000	1.2
+++ binread.cpp	15 Mar 2004 01:59:06 -0000	1.3
@@ -23,6 +23,8 @@
 
 #include "binread.h"
 
+namespace Saga {
+
 BinReader::BinReader() {
 	_buf    = NULL;
 	_bufPtr = NULL;
@@ -146,4 +148,4 @@
 	return u32_be;
 }
 
-
+}

Index: gamedesc.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gamedesc.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- gamedesc.cpp	15 Mar 2004 01:14:49 -0000	1.3
+++ gamedesc.cpp	15 Mar 2004 01:59:06 -0000	1.4
@@ -31,7 +31,7 @@
 #include "gamedesc.h"
 #include "gamedesc_priv.h"
 
-using namespace SagaGameDesc;
+namespace Saga {
 
 /*--------------------------------------------------------------------------*\
  * Inherit the Earth - Demo version
@@ -308,7 +308,7 @@
 
 static R_GAMEMODULE GameModule;
 
-void SagaGameDesc::setGameDirectory(const char *gamedir) {
+void setGameDirectory(const char *gamedir) {
 	assert(gamedir != NULL);
 
 	debug(1, "Using game data path: %s", gamedir);
@@ -316,7 +316,7 @@
 	GameModule.game_dir = gamedir;
 }
 
-int SagaGameDesc::detectGame() {
+int detectGame() {
 	File test_file;
 
 	bool disqualified = false;
@@ -381,7 +381,7 @@
 	return -1;
 }
 
-bool SagaGameDesc::openGame() {
+bool openGame() {
 	int game_filect;
 
 	if ((GameModule.game_index = detectGame()) < 0) { 
@@ -445,3 +445,5 @@
 bool verifyIHNMCD() {
 	return true;
 }
+
+}

Index: gamedesc.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gamedesc.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gamedesc.h	15 Mar 2004 01:14:49 -0000	1.2
+++ gamedesc.h	15 Mar 2004 01:59:06 -0000	1.3
@@ -26,7 +26,7 @@
 
 /* Public stuff */
 
-namespace SagaGameDesc {
+namespace Saga {
 
 enum R_GAME_BASETYPES {
 	R_GAMETYPE_ITE,
@@ -120,9 +120,6 @@
 
 } // end namespace 
 
-
-
-
 #endif
 
 

Index: gamedesc_priv.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/gamedesc_priv.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gamedesc_priv.h	14 Mar 2004 23:39:41 -0000	1.1
+++ gamedesc_priv.h	15 Mar 2004 01:59:06 -0000	1.2
@@ -24,7 +24,7 @@
 
 #include "gamedesc.h"
 
-using namespace SagaGameDesc;
+namespace Saga {
 
 //-------------------------------------------------------------------
 // Private stuff 
@@ -43,32 +43,30 @@
 typedef bool (ResourceFile::*R_GAME_VERIFYFUNC)();
 
 typedef struct R_GAME_FILEDESC_tag {
-
-    const char * gf_fname;
-    unsigned int         gf_type;
+    const char *gf_fname;
+    unsigned int gf_type;
 
 } R_GAME_FILEDESC;
 
 typedef struct R_GAMEDESC_tag {
-    
     int gd_game_type;
     int gd_game_id;
 
-    const char * gd_title;
+    const char *gd_title;
 
-    R_GAME_DISPLAYINFO * gd_display_info;
+    R_GAME_DISPLAYINFO *gd_display_info;
 
     int   gd_startscene;
 
-    R_GAME_RESOURCEINFO * gd_resource_info;
+    R_GAME_RESOURCEINFO *gd_resource_info;
 
-    int               gd_filect;
-    R_GAME_FILEDESC * gd_filedescs;
+    int              gd_filect;
+    R_GAME_FILEDESC *gd_filedescs;
     
-    int               gd_fontct;
-    R_GAME_FONTDESC * gd_fontdescs;
+    int              gd_fontct;
+    R_GAME_FONTDESC *gd_fontdescs;
     
-    R_GAME_SOUNDINFO * gd_soundinfo;
+    R_GAME_SOUNDINFO *gd_soundinfo;
 
     int gd_supported;
 
@@ -76,7 +74,6 @@
 
 
 typedef struct R_GAME_FILEDATA_tag {
-
     ResourceFile *file_ctxt;
 
     unsigned int  file_types;
@@ -86,26 +83,25 @@
 
 
 typedef struct R_GAMEMODULE_tag {
-
     int game_init;
     int game_index;
     
-    R_GAMEDESC * gamedesc;
+    R_GAMEDESC *gamedesc;
 
     int g_skipintro;
 
     const char *game_dir;
     
-    char game_language[ R_GAME_LANGSTR_LIMIT ];
+    char game_language[R_GAME_LANGSTR_LIMIT];
 
     unsigned int gfile_n;
-    R_GAME_FILEDATA * gfile_data;
+    R_GAME_FILEDATA *gfile_data;
 
     unsigned int gd_fontct;
-    R_GAME_FONTDESC * gd_fontdescs;
+    R_GAME_FONTDESC *gd_fontdescs;
 
-    int          err_n;
-    const char * err_str;
+    int         err_n;
+    const char *err_str;
 
 } R_GAMEMODULE;
 
@@ -115,6 +111,8 @@
 bool verifyIHNMDEMO();
 bool verifyIHNMCD();
 
+}
+
 #endif // SAGA_GAMEDESC_PRIV_H
 
 

Index: resfile.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/resfile.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- resfile.cpp	15 Mar 2004 01:14:49 -0000	1.2
+++ resfile.cpp	15 Mar 2004 01:59:06 -0000	1.3
@@ -26,6 +26,7 @@
 #include "resfile.h"
 #include "binread.h"
 
+namespace Saga {
 
 ResourceFile::ResourceFile() {
 	_resTblOffset = 0;
@@ -130,7 +131,7 @@
 	*res = NULL;
 	*res_len = NULL;
 
-	if (!R_PBOUNDS( rn, _resTblCt)) {
+	if (!R_PBOUNDS(rn, _resTblCt)) {
 		return false;
 	}
 
@@ -158,13 +159,4 @@
 	delete[] res;
 }
 
-
-
-
-
-
-
-
-
-
-
+}

Index: saga.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- saga.cpp	14 Mar 2004 23:39:41 -0000	1.1
+++ saga.cpp	15 Mar 2004 01:59:06 -0000	1.2
@@ -48,13 +48,13 @@
 
 static const SAGAGameSettings saga_settings[] = {
 	/* Inherit the Earth - Original floppy version */
-	{ "ite", "Inherit the Earth (DOS)", GID_ITE,
+  	{ "ite", "Inherit the Earth (DOS)", Saga::GID_ITE,
 	 MDT_ADLIB, "ite.rsc" },
 	/* Inherit the Earth - CD version */
-	{ "itecd", "Inherit the Earth (DOS CD Version)", GID_ITECD,
+	{ "itecd", "Inherit the Earth (DOS CD Version)", Saga::GID_ITECD,
 	 MDT_ADLIB, "sounds.rsc" },
 	/* I Have No Mouth and I Must Scream */
-	{ "ihnm", "I Have No Mouth and I Must Scream (DOS)", GID_IHNM,
+	{ "ihnm", "I Have No Mouth and I Must Scream (DOS)", Saga::GID_IHNM,
 	 MDT_ADLIB, "scream.res" },
 
 	{ NULL, NULL, 0, 0, NULL }
@@ -90,7 +90,7 @@
 }
 
 Engine *Engine_SAGA_create(GameDetector *detector, OSystem *syst) {
-	return new SagaEngine(detector, syst);
+	return new Saga::SagaEngine(detector, syst);
 }
 
 REGISTER_PLUGIN("SAGA Engine", Engine_SAGA_gameList, Engine_SAGA_create, Engine_SAGA_detectGames)
@@ -100,8 +100,8 @@
 SagaEngine::SagaEngine(GameDetector *detector, OSystem *syst)
 	: Engine(syst) {
 
-	SagaGameDesc::setGameDirectory(getGameDataPath());
-	SagaGameDesc::openGame();
+	setGameDirectory(getGameDataPath());
+	openGame();
 
 	// Setup mixer
 	if (!_mixer->isReady()) {

Index: saga.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/saga.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- saga.h	14 Mar 2004 23:39:41 -0000	1.1
+++ saga.h	15 Mar 2004 01:59:06 -0000	1.2
@@ -29,6 +29,8 @@
 
 #include "gamedesc.h"
 
+namespace Saga {
+
 #define R_PBOUNDS(n,max) (((n)>=(0))&&((n)<(max)))
 
 enum SAGAGameId {
@@ -52,5 +54,6 @@
 
 };
 
+}
 
 #endif





More information about the Scummvm-git-logs mailing list