SOURCES: maxr-data.patch - adjusted for 0.2.2

lisu lisu at pld-linux.org
Mon Jan 5 16:34:50 CET 2009


Author: lisu                         Date: Mon Jan  5 15:34:50 2009 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- adjusted for 0.2.2

---- Files affected:
SOURCES:
   maxr-data.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/maxr-data.patch
diff -u SOURCES/maxr-data.patch:1.1 SOURCES/maxr-data.patch:1.2
--- SOURCES/maxr-data.patch:1.1	Tue Dec 23 13:52:13 2008
+++ SOURCES/maxr-data.patch	Mon Jan  5 16:34:44 2009
@@ -1,5 +1,5 @@
---- maxr-0.2.1/data/max.xml~	2008-10-18 15:11:28.000000000 +0200
-+++ maxr-0.2.1/data/max.xml	2008-12-23 10:51:21.000000000 +0100
+--- maxr-0.2.2/data/max.xml~	2009-01-02 19:25:41.000000000 +0000
++++ maxr-0.2.2/data/max.xml	2009-01-02 19:27:44.000000000 +0000
 @@ -36,16 +36,16 @@
              <Frequency Num="44100" />
          </Sound>
@@ -24,107 +24,26 @@
 +		<Music Text="/usr/share/maxr/music" />
 +		<Vehicles Text="/usr/share/maxr/vehicles" />
 +		<Buildings Text="/usr/share/maxr/buildings" />
+             <MVEs Text="mve" />
          </Paths>
      </Game>
- </Options>
---- maxr-0.2.1/src/language.h~	2008-10-18 14:56:29.000000000 +0200
-+++ maxr-0.2.1/src/language.h	2008-12-23 11:10:40.000000000 +0100
-@@ -32,7 +32,7 @@
+
+--- maxr-0.2.2/src/loaddata.cpp~	2009-01-05 14:33:27.000000000 +0100
++++ maxr-0.2.2/src/loaddata.cpp	2009-01-05 14:31:18.000000000 +0100
+@@ -3699,7 +3699,7 @@
+ 	//init absolutly needed paths
+ 	SettingsData.sLog = MAX_LOG;
+ 	SettingsData.sNetLog = MAX_NET_LOG;
+-	SettingsData.sExePath = ""; //FIXME: I don't know how this is handled on win/mac -- beko
++	SettingsData.sExePath = "/usr/share/maxr"; //FIXME: I don't know how this is handled on win/mac -- beko
  
- ////////////////////////////////////////////////////////////////////////////////
+ 	#ifdef WIN32
+ 		SettingsData.sHome=""; //this is where windowsuser should set their %HOME%
+@@ -3779,6 +3779,7 @@
+ 			
+ 			SettingsData.sExePath = cPathToExe;
+ 			SettingsData.sExePath = SettingsData.sExePath.substr(0, iPos); 
++			SettingsData.sExePath = "/usr/share/maxr";
+ 			SettingsData.sExePath += PATH_DELIMITER;
  
--#define LANGUAGE_FILE_FOLDER "languages"
-+#define LANGUAGE_FILE_FOLDER "/usr/share/maxr/languages"
- #define LANGUAGE_FILE_NAME   "lang_"
- #define LANGUAGE_FILE_EXT    ".xml"
- 
---- maxr-0.2.1/src/main.cpp~	2008-12-23 11:38:16.000000000 +0100
-+++ maxr-0.2.1/src/main.cpp	2008-12-23 11:37:57.000000000 +0100
-@@ -217,12 +217,12 @@
- // generate SplashScreen
- void showSplash()
- {
--	buffer = LoadPCX("init.pcx", false); //load splash with SDL_HWSURFACE
-+	buffer = LoadPCX("/usr/share/maxr/init.pcx", false); //load splash with SDL_HWSURFACE
- 	if (buffer == NULL)
- 	{ //TODO: at flag for gamewide handling of SDL_HWSURFACE in case it doesn't work
- 		cLog::write("Couldn't use hardware acceleration for images", cLog::eLOG_TYPE_ERROR);
- 		cLog::write("This is currently not supported. Expect M.A.X. to crash!", cLog::eLOG_TYPE_ERROR);
--		buffer = LoadPCX("init.pcx", true);
-+		buffer = LoadPCX("/usr/share/maxr/init.pcx", true);
- 		if (buffer == NULL)
- 		{
- 			cLog::write("Couldn't use software acceleration, too", cLog::eLOG_TYPE_ERROR);
-@@ -232,7 +232,7 @@
- 
- 	}
- 
--	SDL_WM_SetIcon ( SDL_LoadBMP ( "maxr.bmp" ), NULL ); //JCK: Icon for frame and taskmanager is set
-+	SDL_WM_SetIcon ( SDL_LoadBMP ( "/usr/share/maxr/maxr.bmp" ), NULL ); //JCK: Icon for frame and taskmanager is set
- 	screen=SDL_SetVideoMode ( SPLASHWIDTH, SPLASHHEIGHT, SettingsData.iColourDepth, SDL_HWSURFACE|SDL_NOFRAME );
- 	SDL_BlitSurface ( buffer,NULL,screen,NULL );
- 	SDL_WM_SetCaption ( MAXVERSION, NULL );
---- maxr-0.2.1/src/keys.cpp~	2008-10-18 14:56:29.000000000 +0200
-+++ maxr-0.2.1/src/keys.cpp	2008-12-23 12:32:31.000000000 +0100
-@@ -28,12 +28,12 @@
- 	TiXmlDocument KeysXml;
- 	ExTiXmlNode * pXmlNode = NULL;
- 	string sTmpString;
--	if(!FileExists("keys.xml"))
-+	if(!FileExists("/usr/share/maxr/keys.xml"))
- 	{
- 		cLog::write ( "generating new file", LOG_TYPE_WARNING );
- 		GenerateKeysXml();
- 	}
--	if(!KeysXml.LoadFile("keys.xml"))
-+	if(!KeysXml.LoadFile("/usr/share/maxr/keys.xml"))
- 	{
- 		cLog::write ( "cannot load keys.xml\ngenerating new file", LOG_TYPE_WARNING );
- 		GenerateKeysXml();
---- maxr-0.2.1/src/loaddata.cpp~	2008-12-23 12:47:22.000000000 +0100
-+++ maxr-0.2.1/src/loaddata.cpp	2008-12-23 12:47:14.000000000 +0100
-@@ -133,7 +133,7 @@
- 			sTmpString[i] += 32;
- 		}
- 	}
--	sTmpString.insert(0, (string)"languages" + PATH_DELIMITER + "lang_");
-+	sTmpString.insert(0, (string)"/usr/share/maxr/languages" + PATH_DELIMITER + "lang_");
- 	sTmpString += ".xml";
- 	if ( LoadLanguage()!=1 || !LanguageFile.LoadFile( sTmpString.c_str() ) )
- 	{
-@@ -512,7 +512,7 @@
- 	// Prepare max.xml for reading
- 	TiXmlDocument MaxXml;
- 	ExTiXmlNode * pXmlNode = NULL;
--	if(!FileExists("max.xml"))
-+	if(!FileExists("/usr/share/maxr/max.xml"))
- 	{
- 		cLog::write ( "Generating new config file max.xml", LOG_TYPE_WARNING );
- 		if( GenerateMaxXml() == -1)
-@@ -520,7 +520,7 @@
- 			return -1;
- 		}
- 	}
--	if(!MaxXml.LoadFile("max.xml"))
-+	if(!MaxXml.LoadFile("/usr/share/maxr/max.xml"))
- 	{
- 		cLog::write ( "Can't read max.xml\n", LOG_TYPE_WARNING );
- 		if( GenerateMaxXml() == -1)
-@@ -3316,7 +3316,7 @@
- 	// Prepare max.xml for writing
- 	TiXmlDocument MaxXml;
- 	ExTiXmlNode * pXmlNode = NULL;
--	if(!FileExists("max.xml"))
-+	if(!FileExists("/usr/share/maxr/max.xml"))
- 	{
- 		cLog::write ( "Generating new config file max.xml (not working yet)", LOG_TYPE_WARNING );
- 		if( GenerateMaxXml() == -1)
-@@ -3324,7 +3324,7 @@
- 			return -1;
- 		}
- 	}
--	if(!MaxXml.LoadFile("max.xml"))
-+	if(!MaxXml.LoadFile("/usr/share/maxr/max.xml"))
- 	{
- 		cLog::write ( "Can't read max.xml\n", LOG_TYPE_WARNING );
- 		if( GenerateMaxXml() == -1)
+ 			//crude path validation
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/maxr-data.patch?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list