[Tux4kids-commits] r1699 - in tuxmath/trunk: data/missions data/missions/arcade data/missions/campaign src

David Bruce dbruce-guest at alioth.debian.org
Sun Dec 27 20:14:33 UTC 2009


Author: dbruce-guest
Date: 2009-12-27 20:14:33 +0000 (Sun, 27 Dec 2009)
New Revision: 1699

Modified:
   tuxmath/trunk/data/missions/arcade/ace
   tuxmath/trunk/data/missions/arcade/commando
   tuxmath/trunk/data/missions/arcade/ranger
   tuxmath/trunk/data/missions/arcade/scout
   tuxmath/trunk/data/missions/arcade/space_cadet
   tuxmath/trunk/data/missions/campaign/campaign
   tuxmath/trunk/data/missions/demo
   tuxmath/trunk/data/missions/options
   tuxmath/trunk/src/factoroids.c
   tuxmath/trunk/src/fileops.c
   tuxmath/trunk/src/game.c
   tuxmath/trunk/src/mathcards.c
   tuxmath/trunk/src/server.c
Log:
Cleanup of extraneous run-time output

Modified: tuxmath/trunk/data/missions/arcade/ace
===================================================================
--- tuxmath/trunk/data/missions/arcade/ace	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/data/missions/arcade/ace	2009-12-27 20:14:33 UTC (rev 1699)
@@ -58,7 +58,6 @@
 slow_after_wrong = 0
 max_questions = 25000
 bonus_comet_interval = 20
-fraction_to_keep = 1
 allow_pause = 0
 bonus_speed_ratio = 2.0
 

Modified: tuxmath/trunk/data/missions/arcade/commando
===================================================================
--- tuxmath/trunk/data/missions/arcade/commando	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/data/missions/arcade/commando	2009-12-27 20:14:33 UTC (rev 1699)
@@ -57,7 +57,6 @@
 slow_after_wrong = 1
 max_questions = 25000
 bonus_comet_interval = 20
-fraction_to_keep = 1
 allow_pause = 0
 bonus_speed_ratio = 2.0
 

Modified: tuxmath/trunk/data/missions/arcade/ranger
===================================================================
--- tuxmath/trunk/data/missions/arcade/ranger	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/data/missions/arcade/ranger	2009-12-27 20:14:33 UTC (rev 1699)
@@ -59,6 +59,5 @@
 slow_after_wrong = 0
 max_questions = 25000
 bonus_comet_interval = 10
-fraction_to_keep = 1.00
 allow_pause = 0
 bonus_speed_ratio = 1.8

Modified: tuxmath/trunk/data/missions/arcade/scout
===================================================================
--- tuxmath/trunk/data/missions/arcade/scout	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/data/missions/arcade/scout	2009-12-27 20:14:33 UTC (rev 1699)
@@ -46,7 +46,6 @@
 slow_after_wrong = 0
 max_questions = 5000
 bonus_comet_interval = 10
-fraction_to_keep = 1.00
 allow_pause = 0
 bonus_speed_ratio = 1.5
 

Modified: tuxmath/trunk/data/missions/arcade/space_cadet
===================================================================
--- tuxmath/trunk/data/missions/arcade/space_cadet	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/data/missions/arcade/space_cadet	2009-12-27 20:14:33 UTC (rev 1699)
@@ -37,6 +37,5 @@
 slow_after_wrong = 0
 max_questions = 5000
 bonus_comet_interval = 10
-fraction_to_keep = 1.00
 allow_pause = 0
 bonus_speed_ratio = 1.2

Modified: tuxmath/trunk/data/missions/campaign/campaign
===================================================================
--- tuxmath/trunk/data/missions/campaign/campaign	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/data/missions/campaign/campaign	2009-12-27 20:14:33 UTC (rev 1699)
@@ -13,6 +13,5 @@
 allow_pause = 1
 bonus_speed_ratio = 1.8
 max_speed = 10.00
-fraction_to_keep = 0.10
 keep_score = 0
 

Modified: tuxmath/trunk/data/missions/demo
===================================================================
--- tuxmath/trunk/data/missions/demo	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/data/missions/demo	2009-12-27 20:14:33 UTC (rev 1699)
@@ -271,8 +271,6 @@
 # Default: 1                                               #
 # Parameter: copies_repeated_wrongs (integer)              #
 # Default: 1                                               #
-# Parameter: fraction_to_keep (float)                      #
-# Default: 1                                               #
 #                                                          #
 # These settings offer further control over the question   #
 # list and are generally only useful if 'play_through_list'#
@@ -288,13 +286,6 @@
 # missed question will reappear. This can be set anywhere  #
 # from 1 to 10.                                            #
 #                                                          #
-# 'fraction_to_keep' allows a list to be generated that    #
-# consists of a randomly-selected subset of the questions  #
-# fitting the criteria.  The parameter is a float that     #
-# must be greater than 0 and less than or equal to 1. For  #
-# example, a value of 0.1 means 10% of the questions       #
-# meeting the criteria will go into the list.              #
-#                                                          #
 # The defaults for these values result in a 'mission'      #
 # for Tux that is accomplished by answering all            #
 # questions correctly with at least one surviving city.    #
@@ -303,7 +294,6 @@
 question_copies = 1
 repeat_wrongs = 1
 copies_repeated_wrongs = 1
-fraction_to_keep = 1.00
 
 ############################################################
 #                                                          #

Modified: tuxmath/trunk/data/missions/options
===================================================================
--- tuxmath/trunk/data/missions/options	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/data/missions/options	2009-12-27 20:14:33 UTC (rev 1699)
@@ -265,8 +265,6 @@
 # Default: 1                                               #
 # Parameter: copies_repeated_wrongs (integer)              #
 # Default: 1                                               #
-# Parameter: fraction_to_keep (float)                      #
-# Default: 1                                               #
 #                                                          #
 # These settings offer further control over the question   #
 # list and are generally only useful if 'play_through_list'#
@@ -282,13 +280,6 @@
 # missed question will reappear. This can be set anywhere  #
 # from 1 to 10.                                            #
 #                                                          #
-# 'fraction_to_keep' allows a list to be generated that    #
-# consists of a randomly-selected subset of the questions  #
-# fitting the criteria.  The parameter is a float that     #
-# must be greater than 0 and less than or equal to 1. For  #
-# example, a value of 0.1 means 10% of the questions       #
-# meeting the criteria will go into the list.              #
-#                                                          #
 # The defaults for these values result in a 'mission'      #
 # for Tux that is accomplished by answering all            #
 # questions correctly with at least one surviving city.    #
@@ -297,7 +288,6 @@
 question_copies = 1
 repeat_wrongs = 1
 copies_repeated_wrongs = 1
-fraction_to_keep = 1.00
 
 ############################################################
 #                                                          #

Modified: tuxmath/trunk/src/factoroids.c
===================================================================
--- tuxmath/trunk/src/factoroids.c	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/src/factoroids.c	2009-12-27 20:14:33 UTC (rev 1699)
@@ -397,9 +397,10 @@
   if(screen->h < 600 && screen->w < 800)
     zoom = 0.65;
   else
-    zoom=(float)screen->w/(float)BASE_RES_X;
+    zoom = (float)screen->w/(float)BASE_RES_X;
 
-  printf("The zoome rate is: %f\n", zoom);
+  DEBUGCODE(debug_factoroids)
+    printf("The zoom factor is: %f\n", zoom);
 
   /*************** Precalculating software rotation ***************/
 

Modified: tuxmath/trunk/src/fileops.c
===================================================================
--- tuxmath/trunk/src/fileops.c	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/src/fileops.c	2009-12-27 20:14:33 UTC (rev 1699)
@@ -1582,13 +1582,6 @@
     "# missed question will reappear. This can be set anywhere  #\n"
     "# from 1 to 10.                                            #\n"
     "#                                                          #\n"
-    "# 'fraction_to_keep' allows a list to be generated that    #\n"
-    "# consists of a randomly-selected subset of the questions  #\n"
-    "# fitting the criteria.  The parameter is a float that     #\n"
-    "# must be greater than 0 and less than or equal to 1. For  #\n"
-    "# example, a value of 0.1 means 10%% of the questions      #\n"
-    "# meeting the criteria will go into the list.              #\n"
-    "#                                                          #\n"
     "# The defaults for these values result in a 'mission'      #\n" 
     "# for Tux that is accomplished by answering all            #\n"
     "# questions correctly with at least one surviving city.    #\n"

Modified: tuxmath/trunk/src/game.c
===================================================================
--- tuxmath/trunk/src/game.c	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/src/game.c	2009-12-27 20:14:33 UTC (rev 1699)
@@ -911,13 +911,13 @@
     return 0;
   }
 
-  
+ 
   /* Write pre-game info to game summary file: */
   if (Opts_SaveSummary())
   {
     write_pregame_summary();
   }
-  
+
   /* Prepare to start the game: */
   city_expl_height = screen->h - images[IMG_CITY_BLUE]->h;
 
@@ -2992,7 +2992,8 @@
     if(q_found == -1)
     {
       DEBUGMSG(debug_game, "add_comet() called but no question available in queue\n");
-      return 0;    DEBUGCODE(debug_game) print_current_quests();
+      DEBUGCODE(debug_game) print_current_quests();
+      return 0;
     } 
   }
 

Modified: tuxmath/trunk/src/mathcards.c
===================================================================
--- tuxmath/trunk/src/mathcards.c	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/src/mathcards.c	2009-12-27 20:14:33 UTC (rev 1699)
@@ -335,9 +335,7 @@
   /* if math_opts not set up yet, initialize it: */
   if (!initialized)
   {
-
     DEBUGMSG(debug_mathcards, "\nNot initialized - calling MC_Initialize()");
-
     MC_Initialize();
   }
 
@@ -345,9 +343,9 @@
   {
     DEBUGMSG(debug_mathcards, "\nCould not initialize - bailing out");
     DEBUGMSG(debug_mathcards, "\nLeaving MC_StartGame()\n");
-
     return 0;
   }
+
   /* we know math_opts exists if we make it to here */
   srand(time(NULL));
 
@@ -360,7 +358,8 @@
   active_quests = NULL;
   
   /* clear the time list */
-  if (time_per_question_list != NULL) {
+  if (time_per_question_list != NULL)
+  {
     free(time_per_question_list);
     time_per_question_list = NULL;
     length_time_per_question_list = 0;
@@ -1183,7 +1182,7 @@
   MC_MathQuestion* ptr = list;
   while (ptr)
   {
-    fprintf(stderr, "%s\n", ptr->card.formula_string);
+    fprintf(fp, "%s\n", ptr->card.formula_string);
     ptr = ptr->next;
   }
 }
@@ -2551,4 +2550,4 @@
   if (t < 0 || difficulty < 1)
     return 0;
   return (difficulty * SCORE_COEFFICIENT)/t;
-}
\ No newline at end of file
+}

Modified: tuxmath/trunk/src/server.c
===================================================================
--- tuxmath/trunk/src/server.c	2009-12-27 20:14:25 UTC (rev 1698)
+++ tuxmath/trunk/src/server.c	2009-12-27 20:14:33 UTC (rev 1699)
@@ -208,7 +208,7 @@
     local_argv[i] = argv[i];
   }
 
-  f(pthread_create(&server_thread, NULL, run_server_local_args, NULL))
+  if(pthread_create(&server_thread, NULL, run_server_local_args, NULL))
   {
     printf("Error creating thread\n");
     return -1;




More information about the Tux4kids-commits mailing list