[Tux4kids-commits] r1650 - tuxtype/trunk/src

Matthew Trey treymd-guest at alioth.debian.org
Sat Nov 14 15:17:19 UTC 2009


Author: treymd-guest
Date: 2009-11-14 15:17:19 +0000 (Sat, 14 Nov 2009)
New Revision: 1650

Modified:
   tuxtype/trunk/src/laser.c
   tuxtype/trunk/src/setup.c
Log:
Significantly reduced the penalty for losing shields/cities in Comet Zap, the player can now end the game with a score other than 0

Modified: tuxtype/trunk/src/laser.c
===================================================================
--- tuxtype/trunk/src/laser.c	2009-11-14 14:27:58 UTC (rev 1649)
+++ tuxtype/trunk/src/laser.c	2009-11-14 15:17:19 UTC (rev 1650)
@@ -368,11 +368,11 @@
 					if (cities[comets[i].city].shields) {
 						cities[comets[i].city].shields = 0;
 						PlaySound(sounds[SND_SHIELDSDOWN]);
-						laser_add_score(-500 * (diff_level+1));
+						laser_add_score(-50 * (diff_level+1));
 					} else {
 						cities[comets[i].city].expl = CITY_EXPL_START;
 						PlaySound(sounds[SND_EXPLOSION]);
-						laser_add_score(-1000 * (diff_level+1));
+						laser_add_score(-100 * (diff_level+1));
 					}
 
 					tux_anim = IMG_TUX_FIST1;

Modified: tuxtype/trunk/src/setup.c
===================================================================
--- tuxtype/trunk/src/setup.c	2009-11-14 14:27:58 UTC (rev 1649)
+++ tuxtype/trunk/src/setup.c	2009-11-14 15:17:19 UTC (rev 1650)
@@ -210,7 +210,7 @@
 
   if (!fp)
   {
-    fprintf(stderr, "load_settings_filename(): no theme-specific settings found%s\n",fn);
+    fprintf(stderr, "load_settings_filename(): no theme-specific settings found: %s\n",fn);
     return -1;
   }
 	
@@ -327,19 +327,22 @@
 	
 	/* set the settings directory/file */
 
-	#ifdef WIN32
-        //MDTTEMP: Commented out the next line and added the next 2 lines after
-		//_mkdir( "userdata" );  // just in case try to create save location
-		snprintf( fn, FNLEN-1, (const char*)"%s/TuxType", getenv("APPDATA") );
-		_mkdir( fn );  // just in case try to create save location
-        // MDTTEMP: Commented out the next line and added the line after
-		//snprintf( fn, FNLEN-1, "userdata/settings.txt" );
-		snprintf( fn, FNLEN-1, "%s/TuxType/settings.txt", getenv("APPDATA"));
-	#else
-		snprintf( fn, FNLEN-1, (const char*)"%s/.tuxtype", getenv("HOME") );
-		mkdir( fn, 0755 ); // just in case try to create save location
-		snprintf( fn, FNLEN-1, (const char*)"%s/.tuxtype/settings.txt", getenv("HOME") );
-	#endif
+	//#ifdef WIN32
+    //    //MDTTEMP: Commented out the next line and added the next 2 lines after
+	//	//_mkdir( "userdata" );  // just in case try to create save location
+	//	snprintf( fn, FNLEN-1, (const char*)"%s/TuxType", getenv("APPDATA") );
+	//	_mkdir( fn );  // just in case try to create save location
+    //    // MDTTEMP: Commented out the next line and added the line after
+	//	//snprintf( fn, FNLEN-1, "userdata/settings.txt" );
+	//	snprintf( fn, FNLEN-1, "%s/TuxType/settings.txt", getenv("APPDATA"));
+	//#else
+	//	snprintf( fn, FNLEN-1, (const char*)"%s/.tuxtype", getenv("HOME") );
+	//	mkdir( fn, 0755 ); // just in case try to create save location
+	//	snprintf( fn, FNLEN-1, (const char*)"%s/.tuxtype/settings.txt", getenv("HOME") );
+	//#endif
+	
+	// Use the settings.user_settings_path member
+	snprintf( fn, FNLEN-1, (const char*)"%s/settings.txt", settings.user_settings_path );
 
 
 	DEBUGCODE { printf("SaveSettings: settings file is '%s'\n", fn ); }
@@ -386,6 +389,11 @@
 
 int SetupPaths(const char* theme_dir)
 {
+  //DEBUGCODE
+  //{
+    fprintf(stderr, "Entering SetupPaths()\n");
+  //}
+
   settings.use_english = 1; // default is to use English if we cannot find theme
   char fn[FNLEN];           // used later when setting settings.user_settings_path
 




More information about the Tux4kids-commits mailing list