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

dbruce-guest at alioth.debian.org dbruce-guest at alioth.debian.org
Wed Jan 7 20:58:24 UTC 2009


Author: dbruce-guest
Date: 2009-01-07 20:58:24 +0000 (Wed, 07 Jan 2009)
New Revision: 827

Modified:
   tuxtype/trunk/src/globals.h
   tuxtype/trunk/src/titlescreen.c
Log:
practice bug fix



Modified: tuxtype/trunk/src/globals.h
===================================================================
--- tuxtype/trunk/src/globals.h	2009-01-07 12:30:16 UTC (rev 826)
+++ tuxtype/trunk/src/globals.h	2009-01-07 20:58:24 UTC (rev 827)
@@ -185,7 +185,7 @@
   QUIT_GAME, CASCADE, OPTIONS, LESSONS,
   INSTRUCT_CASCADE, CASCADE1, CASCADE2, CASCADE3, CASCADE4,
   INSTRUCT_LASER, LASER1, LASER2, LASER3, LASER4,
-  FREETYPE, ASDF, ALL, MAIN, SET_LANGUAGE, PROJECT_INFO, NOT_CODED,
+  PHRASE_PRACTICE, ASDF, ALL, MAIN, SET_LANGUAGE, PROJECT_INFO, NOT_CODED,
   LEVEL1, LEVEL2, LEVEL3, LEVEL4, LASER, INSTRUCT, EDIT_WORDLIST, NONE};
 
 /* Title sequence constants */

Modified: tuxtype/trunk/src/titlescreen.c
===================================================================
--- tuxtype/trunk/src/titlescreen.c	2009-01-07 12:30:16 UTC (rev 826)
+++ tuxtype/trunk/src/titlescreen.c	2009-01-07 20:58:24 UTC (rev 827)
@@ -72,11 +72,11 @@
 /* --- define menu structure --- */
 /* (these values are all in the Game_Type enum in globals.h) */
 const int menu_item[][6]= {{0, 0,         0,         0,          0},
-			   {0, CASCADE,   LEVEL1,    LEVEL1,  EDIT_WORDLIST },
-			   {0, LASER,     LEVEL2,    LEVEL2,  FREETYPE   },
-			   {0, LESSONS,  LEVEL3,    LEVEL3,  PROJECT_INFO },
-			   {0, OPTIONS,   INSTRUCT,  LEVEL4,  SET_LANGUAGE},
-			   {0, QUIT_GAME, MAIN,      MAIN,    MAIN}};
+			   {0, CASCADE,   LEVEL1,    LEVEL1,  EDIT_WORDLIST   },
+			   {0, LASER,     LEVEL2,    LEVEL2,  PHRASE_PRACTICE },
+			   {0, LESSONS,   LEVEL3,    LEVEL3,  PROJECT_INFO    },
+			   {0, OPTIONS,   INSTRUCT,  LEVEL4,  SET_LANGUAGE    },
+			   {0, QUIT_GAME, MAIN,      MAIN,    MAIN            }};
 
 /* --- menu icons --- */
 const unsigned char *menu_icon[][6]= 
@@ -655,64 +655,18 @@
 
 
 
-    if (menu_opt == FREETYPE)
+    if (menu_opt == PHRASE_PRACTICE)
     {
       unload_media();
-      found = 0;
 
-      if (!settings.use_english)
-      {
-        sprintf(fn , "%s/phrases.txt", settings.theme_data_path);
-        if (CheckFile(fn))
-          found = 1;
+      Phrases(NULL);
 
-        /* Now look in default path if desired or needed: */
-        if (!found)
-        {
-          sprintf(fn , "%s/words/words3.txt", settings.theme_data_path);
-          if (CheckFile(fn))
-            found = 1;
-        }
+      load_media();
 
-        if (!found)
-        {
-          sprintf(fn , "%s/words/words2.txt", settings.theme_data_path);
-          if (CheckFile(fn))
-            found = 1;
-        }
+      if (settings.menu_music)
+        MusicLoad( "tuxi.ogg", -1 );
 
-        if (!found)
-        {
-          sprintf(fn , "%s/words/words1.txt", settings.theme_data_path);
-          if (CheckFile(fn))
-            found = 1;
-        }
-      }
-
-      /* Now checking English: */
-      if (!found)
-      {
-        sprintf(fn , "%s/phrases.txt", settings.default_data_path);
-        if (CheckFile(fn))
-          found = 1;
-      }
-
-      /* Now do Phrases activity if phrase loaded successfully: */
-      if (found)
-      {
-        fp=fopen(fn,"r");
-        fscanf( fp, "%[^\n]\n", str);
-        ConvertFromUTF8(phrase, str);
-        Phrases( phrase );
-        //Practice();
-        load_media();
-        redraw = 1;
-        fclose(fp);
-      }
-      else
-      {
-        fprintf(stderr, "LoadKeyboard(): Error finding file for keyboard setup!\n");
-      }
+      redraw = 1;
     }
 
     /* ------ End menu_opt processing ----------- */




More information about the Tux4kids-commits mailing list