[Tux4kids-commits] r1687 - tuxmath/trunk/po tuxmath/trunk/src tuxtype/branches/gsoc-sarah/src

David Bruce dbruce-guest at alioth.debian.org
Sun Dec 20 03:29:28 UTC 2009


Author: dbruce-guest
Date: 2009-12-20 03:29:28 +0000 (Sun, 20 Dec 2009)
New Revision: 1687

Modified:
   tuxmath/trunk/po/es.gmo
   tuxmath/trunk/po/pt.gmo
   tuxmath/trunk/po/pt.po
   tuxmath/trunk/src/game.c
   tuxmath/trunk/src/highscore.c
   tuxmath/trunk/src/menu.c
   tuxmath/trunk/src/network.c
   tuxmath/trunk/src/network.h
   tuxmath/trunk/src/server.c
   tuxmath/trunk/src/server.h
   tuxmath/trunk/src/servermain.c
   tuxmath/trunk/src/testclient.c
   tuxtype/branches/gsoc-sarah/src/playgame.c
Log:
Fix compiler errors if libsdl_net not available

Modified: tuxmath/trunk/po/es.gmo
===================================================================
(Binary files differ)

Modified: tuxmath/trunk/po/pt.gmo
===================================================================
(Binary files differ)

Modified: tuxmath/trunk/po/pt.po
===================================================================
--- tuxmath/trunk/po/pt.po	2009-12-17 13:18:34 UTC (rev 1686)
+++ tuxmath/trunk/po/pt.po	2009-12-20 03:29:28 UTC (rev 1687)
@@ -11,14 +11,14 @@
 msgstr ""
 "Project-Id-Version: tuxmath\n"
 "Report-Msgid-Bugs-To: tuxmath-devel at lists.sourceforge.net\n"
-"POT-Creation-Date: 2009-03-06 06:12-0600\n"
+"POT-Creation-Date: 2009-10-12 09:25-0500\n"
 "PO-Revision-Date: 2009-10-14 16:04+0100\n"
 "Last-Translator: Pedro Amorim <pedro_amorim at live.com.pt>\n"
 "Language-Team: Portuguese <pt at li.org>\n"
-"Language: pt\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
+"Language: pt\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
 "X-Generator: Pootle 1.2.1\n"
 "X-Launchpad-Export-Date: 2008-05-06 22:24+0000\n"
@@ -237,8 +237,9 @@
 "redistribuir o programa."
 
 #: src/credits.c:108
+#, fuzzy
 msgid ""
-"A full copy of the GPL is included with the documenation for this program."
+"A full copy of the GPL is included with the documentation for this program."
 msgstr ""
 "Uma cópia completa da GPL está incluída na documentação para este programa."
 
@@ -246,335 +247,354 @@
 msgid "For more information about Free Software and the GNU GPL, visit:"
 msgstr "Para mais informações sobre Software Livre e da GNU GPL, visite:"
 
-#: src/factoroids.c:558
+#: src/factoroids.c:552
 msgid "FACTOROIDS: to win, you need destroy all the asteroids."
 msgstr "FACTOROIDS: para ganhar, precisas de destruir todos os asteróides."
 
-#: src/factoroids.c:559 src/factoroids.c:570
+#: src/factoroids.c:553 src/factoroids.c:564
 msgid "Use the arrow keys to turn or go forward.  Aim at an asteroid,"
 msgstr ""
 "Utiliza as setas do teclado para virar ou ir em frente. Faz mira contra um "
 "asteróide,"
 
-#: src/factoroids.c:560
+#: src/factoroids.c:554
 msgid "type one of its factors, and press space or return"
 msgstr ""
-"digitando o número que corresponde ao seu factor, e carregas nas teclas Espaço ou Enter"
+"digitando o número que corresponde ao seu factor, e carregas nas teclas "
+"Espaço ou Enter"
 
-#: src/factoroids.c:561
+#: src/factoroids.c:555
 msgid "to split it into its factors.  Rocks with prime numbers are destroyed!"
 msgstr ""
 "para dividir entre os seus factores.  As rochas com números primos são "
 "destruídos! Por exemplo o factor primo de 6 é 2 e 3 (6 = 2 × 3)"
 
-#: src/factoroids.c:569
+#: src/factoroids.c:563
 msgid "FRACTIONS: to win, you need destroy all the asteroids"
 msgstr "FRACÇÕES: para ganhar, precisas de destruir todos os asteróides."
 
-#: src/factoroids.c:571
+#: src/factoroids.c:565
 msgid "type a number that can simplify the fraction, and press space or return"
 msgstr ""
-"digitando um número que pode simplificar a divisão, e carregas nas teclas Espaço ou "
-"Enter"
+"digitando um número que pode simplificar a divisão, e carregas nas teclas "
+"Espaço ou Enter"
 
-#: src/factoroids.c:572
+#: src/factoroids.c:566
 msgid ""
 "to split it.  Destroy fractions that can not be further simplified in a "
 "single shot!"
 msgstr ""
-"para o dividir.  Destrói fracções que não podem ser mais simplificadas "
-"com um único tiro!"
+"para o dividir.  Destrói fracções que não podem ser mais simplificadas com "
+"um único tiro!"
 
-#: src/game.c:717
+#: src/game.c:984
 msgid "Welcome to TuxMath!"
 msgstr "Bem-vindo ao TuxMath!"
 
-#: src/game.c:734
+#: src/game.c:1001
 msgid "Your mission is to save your"
 msgstr "A tua missão é salvar os"
 
-#: src/game.c:735
+#: src/game.c:1002
 msgid "penguins' igloos from the"
 msgstr "iglos dos pinguins da"
 
-#: src/game.c:736
+#: src/game.c:1003
 msgid "falling comets."
 msgstr "queda dos cometas."
 
-#: src/game.c:755
+#: src/game.c:1022
 msgid "Stop a comet by typing"
 msgstr "Pára um cometa"
 
-#: src/game.c:756
+#: src/game.c:1023
 msgid "the answer to the math problem"
 msgstr "respondendo ao problema matemático"
 
-#: src/game.c:757
+#: src/game.c:1024
 msgid "and hitting 'space' or 'enter'."
 msgstr "e carrega na tecla 'espaço' ou 'enter'."
 
-#: src/game.c:758
+#: src/game.c:1025
 msgid "Try it now!"
 msgstr "Tenta agora!"
 
-#: src/game.c:766
+#: src/game.c:1033
 msgid "Good shot!"
 msgstr "Bom tiro!"
 
-#: src/game.c:776
+#: src/game.c:1043
 msgid "If an igloo gets hit by a comet,"
 msgstr "Se um iglo for atingido por um cometa,"
 
-#: src/game.c:777
+#: src/game.c:1044
 msgid "it melts. But don't worry: the"
 msgstr "ele derrete-se. Mas não te preocupes: o"
 
-#: src/game.c:778
+#: src/game.c:1045
 msgid "penguin is OK!"
 msgstr "pinguim está bem!"
 
-#: src/game.c:779
+#: src/game.c:1046
 msgid "Just watch what happens:"
 msgstr "Basta veres o que acontece"
 
-#: src/game.c:780
+#: src/game.c:1047
 msgid "(Press a key to start)"
 msgstr "(Carrega numa tecla para começar)"
 
-#: src/game.c:793
+#: src/game.c:1060
 msgid "Notice the answer"
 msgstr "Observa a resposta"
 
-#: src/game.c:803
+#: src/game.c:1070
 msgid "If it gets hit again, the"
 msgstr "Se for atingindo outra vez, o"
 
-#: src/game.c:804
+#: src/game.c:1071
 msgid "penguin leaves."
 msgstr "pinguim vai embora."
 
-#: src/game.c:805
+#: src/game.c:1072
 msgid "(Press a key when ready)"
 msgstr "(carrega numa tecla quando estiveres preparado)"
 
-#: src/game.c:824
+#: src/game.c:1095
 msgid "You can fix the igloos"
 msgstr "Tu podes reparar os iglos"
 
-#: src/game.c:825
+#: src/game.c:1096
 msgid "by stopping bonus comets."
 msgstr "parando os cometas bónus."
 
-#: src/game.c:834
+#: src/game.c:1107
 msgid "Zap it now!"
 msgstr "Destrói-o agora!"
 
-#: src/game.c:838
+#: src/game.c:1113
 msgid "Great job!"
 msgstr "Bom trabalho!"
 
-#: src/game.c:852
+#: src/game.c:1131
 msgid "Quit at any time by pressing"
 msgstr "Sai a qualquer momento carregando em"
 
-#: src/game.c:853
+#: src/game.c:1132
 msgid "'Esc' or clicking the 'X'"
 msgstr "'Esc' ou 'X'"
 
-#: src/game.c:854
+#: src/game.c:1133
 msgid "in the upper right corner."
 msgstr "que está no canto superior direito."
 
-#: src/game.c:855
+#: src/game.c:1134
 msgid "Do it now, and then play!"
 msgstr "Faz isso agora e, depois joga!"
 
-#: src/highscore.c:212 src/titlescreen.c:849
+#: src/highscore.c:168 data/menus/menu_strings:11
 msgid "Hall Of Fame"
 msgstr "Corredor da Fama"
 
-#: src/highscore.c:232 src/highscore.c:253 src/titlescreen.c:785
-#: src/titlescreen.c:844
+#: src/highscore.c:188 src/highscore.c:209 data/menus/menu_strings:6
+#: data/menus/menu_strings:21 data/menus/menu_strings:28
 msgid "Space Cadet"
 msgstr "Cadete Espacial"
 
-#: src/highscore.c:235 src/titlescreen.c:786 src/titlescreen.c:845
+#: src/highscore.c:191 data/menus/menu_strings:7 data/menus/menu_strings:22
+#: data/menus/menu_strings:29
 msgid "Scout"
 msgstr "Batedor"
 
-#: src/highscore.c:238 src/titlescreen.c:787 src/titlescreen.c:846
+#: src/highscore.c:194 data/menus/menu_strings:8 data/menus/menu_strings:23
+#: data/menus/menu_strings:30
 msgid "Ranger"
 msgstr "Ranger"
 
-#: src/highscore.c:241 src/titlescreen.c:788 src/titlescreen.c:847
+#: src/highscore.c:197 data/menus/menu_strings:9 data/menus/menu_strings:24
+#: data/menus/menu_strings:31
 msgid "Ace"
 msgstr "Ás"
 
-#: src/highscore.c:244 src/titlescreen.c:789 src/titlescreen.c:848
+#: src/highscore.c:200 data/menus/menu_strings:10 data/menus/menu_strings:25
+#: data/menus/menu_strings:32
 msgid "Commando"
 msgstr "Comando"
 
-#: src/highscore.c:247 src/titlescreen.c:968
+#: src/highscore.c:203 data/menus/menu_strings:36
 msgid "Factors"
 msgstr "Factores"
 
-#: src/highscore.c:250 src/titlescreen.c:969
+#: src/highscore.c:206 data/menus/menu_strings:37
 msgid "Fractions"
 msgstr "Divisões"
 
-#: src/highscore.c:353
+#: src/highscore.c:287
 msgid "You Are In The Hall of Fame!"
 msgstr "Tu estás no Corredor da Fama"
 
-#: src/highscore.c:353
+#: src/highscore.c:287
 msgid "Enter Your Name:"
 msgstr "Coloca o Teu Nome:"
 
-#: src/multiplayer.c:244
-msgid "Who is playing first?"
-msgstr "Quem vai jogar primeiro?"
+#: src/menu.c:374
+msgid "TuxMath is free and open-source!"
+msgstr "TuxMath é livre e com código aberto!"
 
-#: src/multiplayer.c:244 src/multiplayer.c:246
-msgid "Enter your name:"
-msgstr "Coloca o teu nome:"
+#: src/menu.c:375
+#, fuzzy
+msgid "You can help make it better."
+msgstr "Podes ajudar o TuxMath ao reportar problemas,"
 
-#: src/multiplayer.c:246
-msgid "Who is playing next?"
-msgstr "Quem joga a seguir?"
+#: src/menu.c:376
+msgid "Suggestions, artwork, and code are all welcome!"
+msgstr ""
 
-#: src/multiplayer.c:260
-msgid "How many rounds will you play?"
-msgstr "Quantas voltas querem jogar?"
+#: src/menu.c:377
+#, fuzzy
+msgid "Discuss TuxMath at tuxmath-devel at lists.sourceforge.net"
+msgstr "Discuta o futuro em tuxmath-devel at lists.sourceforge.net"
 
-#: src/multiplayer.c:260
-msgid "Enter a number"
-msgstr "Coloca um número"
+#: src/menu.c:498
+msgid "Edit 'options' file in your home directory"
+msgstr "Edita o ficheiro 'options' que está na tua directoria pessoal"
 
-#: src/titlescreen.c:487
-msgid "Work In Progress!"
-msgstr "Trabalho em Progresso!"
+#: src/menu.c:499
+msgid "to create customized game!"
+msgstr "para criar um jogo customizado!"
 
-#: src/titlescreen.c:488
-msgid "This feature is not ready yet"
-msgstr "Este recurso ainda não está pronto"
+#: src/menu.c:500
+msgid "Press a key or click your mouse to start game."
+msgstr ""
+"Pressiona em qualquer tecla do teclado ou clique no rato para começar o jogo."
 
-#: src/titlescreen.c:489
-msgid "Discuss the future of TuxMath at"
-msgstr "Discuta o futuro do TuxMath em"
+#: src/menu.c:501
+msgid "See README.txt for more information"
+msgstr "Lê o ficheiro README.txt para mais informações!"
 
-#: src/titlescreen.c:490
-msgid "tuxmath-devel at lists.sourceforge.net"
-msgstr "tuxmath-devel at lists.sourceforge.net"
+#: src/menu.c:525
+msgid "How many kids are playing?"
+msgstr "Quantas crianças vão jogar?"
 
-#: src/titlescreen.c:647
-msgid "Play Alone"
-msgstr "Jogar Sozinho"
+#: src/menu.c:526
+msgid "(Between 2 and 4 players)"
+msgstr "(Entre 2 a 4 jogadores)"
 
-#: src/titlescreen.c:648
-msgid "Play With Friends"
-msgstr "Jogar Com Amigos"
+#: src/menu.c:585
+#, fuzzy
+msgid "Enter Server Name:"
+msgstr "Coloca o Teu Nome:"
 
-#: src/titlescreen.c:649
-msgid "Factoroids!"
-msgstr "Factoroids!"
+#: src/menu.c:585
+msgid "(limit 50 characters)"
+msgstr ""
 
-#: src/titlescreen.c:650
-msgid "Help"
-msgstr "Ajuda"
+#: src/menu.c:598
+msgid "Select lesson file for server to use"
+msgstr ""
 
-#: src/titlescreen.c:651
-msgid "More Options"
-msgstr "Mais Opções"
+#: src/menu.c:625
+#, fuzzy
+msgid "Server Name:"
+msgstr "Coloca o Teu Nome:"
 
-#: src/titlescreen.c:652
-msgid "Quit"
-msgstr "Sair"
+#: src/menu.c:627
+msgid "Selected Lesson:"
+msgstr ""
 
-#: src/titlescreen.c:726
-msgid "Math Command Training Academy"
-msgstr "Academia de Treino Comando da Matemática"
+#: src/menu.c:648
+msgid "Detecting servers"
+msgstr ""
 
-#: src/titlescreen.c:727
-msgid "Math Command Fleet Missions"
-msgstr "Frota de Missões para Comando da Matemática"
+#: src/menu.c:648
+msgid "Please wait"
+msgstr ""
 
-#: src/titlescreen.c:728
-msgid "Play Arcade Game"
-msgstr "Jogar Modo Arcada"
+#: src/menu.c:654
+#, c-format
+msgid "Connected to server: %s"
+msgstr ""
 
-#: src/titlescreen.c:729
-msgid "Play Custom Game"
-msgstr "Jogar Modo de Prática"
+#: src/menu.c:655 src/multiplayer.c:258 src/multiplayer.c:260
+msgid "Enter your name:"
+msgstr "Coloca o teu nome:"
 
-#: src/titlescreen.c:730 src/titlescreen.c:781 src/titlescreen.c:790
-#: src/titlescreen.c:850 src/titlescreen.c:970
-msgid "Main menu"
-msgstr "Menu principal"
+#: src/menu.c:657
+#, fuzzy
+msgid "Click when ready"
+msgstr "(carrega numa tecla quando estiveres preparado)"
 
-#: src/titlescreen.c:779
-msgid "Score Sweep"
-msgstr "Pontuação"
+#: src/menu.c:659
+msgid "Waiting for other players"
+msgstr ""
 
-#: src/titlescreen.c:780
-msgid "Elimination"
-msgstr "Eliminação"
+#: src/menu.c:671
+msgid "Sorry, game already in progress."
+msgstr ""
 
-#: src/titlescreen.c:824
-msgid "How many kids are playing?"
-msgstr "Quantas crianças vão jogar?"
+#: src/menu.c:672
+#, c-format
+msgid "Sorry, game already in progress.\n"
+msgstr ""
 
-#: src/titlescreen.c:825
-msgid "(Between 2 and 4 players)"
-msgstr "(Entre 2 a 4 jogadores)"
+#: src/menu.c:677
+msgid "Sorry, no server could be found."
+msgstr ""
 
-#: src/titlescreen.c:944
-msgid "Edit 'options' file in your home directory"
-msgstr "Edita o ficheiro 'options' que está na tua directoria pessoal"
+#: src/menu.c:678
+#, c-format
+msgid "Sorry, no server could be found.\n"
+msgstr ""
 
-#: src/titlescreen.c:945
-msgid "to create customized game!"
-msgstr "para criar um jogo customizado!"
+#: src/menu.c:681
+msgid "Sorry, this version built without network support"
+msgstr ""
 
-#: src/titlescreen.c:946
-msgid "Press a key or click your mouse to start game."
-msgstr "Pressiona em qualquer tecla do teclado ou clique no rato para começar o jogo."
+#: src/menu.c:682
+#, c-format
+msgid "Sorry, this version built without network support.\n"
+msgstr ""
 
-#: src/titlescreen.c:947
-msgid "See README.txt for more information"
-msgstr "Lê o ficheiro README.txt para mais informações!"
+#: src/multiplayer.c:183
+#, c-format
+msgid "Then %s\n"
+msgstr ""
 
-#: src/titlescreen.c:1062
-msgid "Demo"
-msgstr "Demonstração"
+#: src/multiplayer.c:258
+msgid "Who is playing first?"
+msgstr "Quem vai jogar primeiro?"
 
-#: src/titlescreen.c:1063
-msgid "Project Info"
-msgstr "Informação do Projecto"
+#: src/multiplayer.c:260
+msgid "Who is playing next?"
+msgstr "Quem joga a seguir?"
 
-#: src/titlescreen.c:1064
-msgid "Credits"
-msgstr "Créditos"
+#: src/multiplayer.c:274
+msgid "How many rounds will you play?"
+msgstr "Quantas voltas querem jogar?"
 
-#: src/titlescreen.c:1065
-msgid "Main Menu"
-msgstr "Menu Principal"
+#: src/multiplayer.c:274
+msgid "Enter a number"
+msgstr "Coloca um número"
 
-#: src/titlescreen.c:1113
-msgid "TuxMath is free and open-source!"
-msgstr "TuxMath é livre e com código aberto!"
+#: src/titlescreen.c:478
+msgid "Work In Progress!"
+msgstr "Trabalho em Progresso!"
 
-#: src/titlescreen.c:1114
-msgid "You can help make it better by reporting problems,"
-msgstr "Podes ajudar o TuxMath ao reportar problemas,"
+#: src/titlescreen.c:479
+msgid "This feature is not ready yet"
+msgstr "Este recurso ainda não está pronto"
 
-#: src/titlescreen.c:1115
-msgid "suggesting improvements, or adding code."
-msgstr "sugerindo melhorias, ou adicionando código."
+#: src/titlescreen.c:480
+msgid "Discuss the future of TuxMath at"
+msgstr "Discuta o futuro do TuxMath em"
 
-#: src/titlescreen.c:1116
-msgid "Discuss the future at tuxmath-devel at lists.sourceforge.net"
-msgstr "Discuta o futuro em tuxmath-devel at lists.sourceforge.net"
+#: src/titlescreen.c:481
+msgid "tuxmath-devel at lists.sourceforge.net"
+msgstr "tuxmath-devel at lists.sourceforge.net"
 
+#: src/tuxmath.c:59 data/menus/menu_strings:39
+msgid "Help"
+msgstr "Ajuda"
+
 #: data/missions/lessons/descr_lessons:1
 msgid "Number Typing"
 msgstr "Número de Digitalização"
@@ -806,3 +826,85 @@
 #: data/missions/lessons/descr_lessons:58
 msgid "Division of Positives and Negatives"
 msgstr "Divisão de Positivos e Negativos"
+
+#: data/menus/menu_strings:1 data/menus/menu_strings:12
+#: data/menus/menu_strings:14 data/menus/menu_strings:18
+#: data/menus/menu_strings:26 data/menus/menu_strings:33
+#: data/menus/menu_strings:34 data/menus/menu_strings:38
+#: data/menus/menu_strings:44
+msgid "Main Menu"
+msgstr "Menu Principal"
+
+#: data/menus/menu_strings:2
+msgid "Play Alone"
+msgstr "Jogar Sozinho"
+
+#: data/menus/menu_strings:3
+msgid "Math Command Training Academy"
+msgstr "Academia de Treino Comando da Matemática"
+
+#: data/menus/menu_strings:4
+msgid "Math Command Fleet Missions"
+msgstr "Frota de Missões para Comando da Matemática"
+
+#: data/menus/menu_strings:5
+msgid "Play Arcade Game"
+msgstr "Jogar Modo Arcada"
+
+#: data/menus/menu_strings:13
+msgid "Play Custom Game"
+msgstr "Jogar Modo de Prática"
+
+#: data/menus/menu_strings:15
+msgid "Network Game"
+msgstr ""
+
+#: data/menus/menu_strings:16
+msgid "Run Server"
+msgstr ""
+
+#: data/menus/menu_strings:17
+msgid "Join Game"
+msgstr ""
+
+#: data/menus/menu_strings:19
+msgid "Play With Friends"
+msgstr "Jogar Com Amigos"
+
+#: data/menus/menu_strings:20
+msgid "Score Sweep"
+msgstr "Pontuação"
+
+#: data/menus/menu_strings:27
+msgid "Elimination"
+msgstr "Eliminação"
+
+#: data/menus/menu_strings:35
+msgid "Factoroids!"
+msgstr "Factoroids!"
+
+#: data/menus/menu_strings:40
+msgid "More Options"
+msgstr "Mais Opções"
+
+#: data/menus/menu_strings:41
+msgid "Demo"
+msgstr "Demonstração"
+
+#: data/menus/menu_strings:42
+msgid "Project Info"
+msgstr "Informação do Projecto"
+
+#: data/menus/menu_strings:43
+msgid "Credits"
+msgstr "Créditos"
+
+#: data/menus/menu_strings:45
+msgid "Quit"
+msgstr "Sair"
+
+#~ msgid "Main menu"
+#~ msgstr "Menu principal"
+
+#~ msgid "suggesting improvements, or adding code."
+#~ msgstr "sugerindo melhorias, ou adicionando código."

Modified: tuxmath/trunk/src/game.c
===================================================================
--- tuxmath/trunk/src/game.c	2009-12-17 13:18:34 UTC (rev 1686)
+++ tuxmath/trunk/src/game.c	2009-12-20 03:29:28 UTC (rev 1687)
@@ -1523,7 +1523,11 @@
       t = -1;   //Mathcards will ignore t == -1
     /* Tell Mathcards or the server that we answered correctly: */
     if(Opts_LanMode())
+#ifdef HAVE_LIBSDL_NET
       LAN_AnsweredCorrectly(comets[lowest].flashcard.question_id, t);
+#else
+      {}  // Needed for compiler, even though this path can't occur
+#endif      
     else
       MC_AnsweredCorrectly(comets[lowest].flashcard.question_id, t);
 
@@ -1705,7 +1709,11 @@
       {
         /* Tell MathCards about it - question not answered correctly: */
         if(Opts_LanMode())
+#ifdef HAVE_LIBSDL_NET
           LAN_NotAnsweredCorrectly(comets[i].flashcard.question_id);
+#else
+          {}
+#endif
         else
           MC_NotAnsweredCorrectly(comets[i].flashcard.question_id);
 

Modified: tuxmath/trunk/src/highscore.c
===================================================================
--- tuxmath/trunk/src/highscore.c	2009-12-17 13:18:34 UTC (rev 1686)
+++ tuxmath/trunk/src/highscore.c	2009-12-20 03:29:28 UTC (rev 1687)
@@ -858,6 +858,9 @@
 
 int Standby(const char* heading, const char* sub)
 {
+#ifndef HAVE_LIBSDL_NET
+  return 0;
+#else
   SDL_Rect loc;
   int finished = 0;
   Uint32 frame = 0;
@@ -995,9 +998,11 @@
 
   /* 1 means we start game, -1 means we go back to menu */
   return finished;
+#endif
 }
 
 
+
 int detecting_servers(const char* heading, const char* sub)
 {
 #ifndef HAVE_LIBSDL_NET

Modified: tuxmath/trunk/src/menu.c
===================================================================
--- tuxmath/trunk/src/menu.c	2009-12-17 13:18:34 UTC (rev 1686)
+++ tuxmath/trunk/src/menu.c	2009-12-20 03:29:28 UTC (rev 1687)
@@ -648,6 +648,11 @@
   RunServer_prog(3, argv);
 #endif
 
+/* No SDL_net, so show explanatory message: */
+#else
+  ShowMessage(DEFAULT_MENU_FONT_SIZE, 
+              NULL, _("Sorry, this version built without network support"), NULL, NULL);
+  printf( _("Sorry, this version built without network support.\n"));
 #endif
   return 0;
 }

Modified: tuxmath/trunk/src/network.c
===================================================================
--- tuxmath/trunk/src/network.c	2009-12-17 13:18:34 UTC (rev 1686)
+++ tuxmath/trunk/src/network.c	2009-12-20 03:29:28 UTC (rev 1687)
@@ -10,6 +10,8 @@
 * Copyright: See COPYING file that comes with this distribution.  (Briefly, GNU GPL).
 */
 
+#ifdef HAVE_LIBSDL_NET
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -501,3 +503,4 @@
 
 
 
+#endif

Modified: tuxmath/trunk/src/network.h
===================================================================
--- tuxmath/trunk/src/network.h	2009-12-17 13:18:34 UTC (rev 1686)
+++ tuxmath/trunk/src/network.h	2009-12-20 03:29:28 UTC (rev 1687)
@@ -16,6 +16,8 @@
 #ifndef NETWORK_H
 #define NETWORK_H
 
+#ifdef HAVE_LIBSDL_NET
+
 #include "transtruct.h"
 #include "SDL_net.h"
 
@@ -56,4 +58,6 @@
 /* FIXME this should be local to network.c */
 int Make_Flashcard(char* buf, MC_FlashCard* fc);
 
+#endif // HAVE_LIBSDL_NET
+
 #endif // NETWORK_H

Modified: tuxmath/trunk/src/server.c
===================================================================
--- tuxmath/trunk/src/server.c	2009-12-17 13:18:34 UTC (rev 1686)
+++ tuxmath/trunk/src/server.c	2009-12-20 03:29:28 UTC (rev 1687)
@@ -17,6 +17,8 @@
 * the tutorial code is still present here - David Bruce 
 */
 
+#ifdef HAVE_LIBSDL_NET
+
 #include "globals.h"
 #include "server.h" 
 #include "transtruct.h"
@@ -1238,4 +1240,4 @@
   return server_running;
 }
 
-
+#endif

Modified: tuxmath/trunk/src/server.h
===================================================================
--- tuxmath/trunk/src/server.h	2009-12-17 13:18:34 UTC (rev 1686)
+++ tuxmath/trunk/src/server.h	2009-12-20 03:29:28 UTC (rev 1687)
@@ -11,9 +11,10 @@
 #ifndef SERVER_H
 #define SERVER_H == 1)
 
+#ifdef HAVE_LIBSDL_NET
+
 #include "SDL_net.h"
 
-
 #define NAME_SIZE 50
 #define DEFAULT_SERVER_NAME "TuxMath LAN Server"
 #define SERVER_NAME_TIMEOUT 30000
@@ -70,3 +71,5 @@
 /* Find out if server is already running: */
 int ServerRunning(void);
 #endif
+
+#endif

Modified: tuxmath/trunk/src/servermain.c
===================================================================
--- tuxmath/trunk/src/servermain.c	2009-12-17 13:18:34 UTC (rev 1686)
+++ tuxmath/trunk/src/servermain.c	2009-12-20 03:29:28 UTC (rev 1687)
@@ -19,5 +19,9 @@
 /* server functionality is contained in server.h and server.c              */
 int main(int argc, char** argv)
 {
+#ifdef HAVE_LIBSDL_NET
   return RunServer(argc, argv);
+#else
+  return 0;
+#endif
 }

Modified: tuxmath/trunk/src/testclient.c
===================================================================
--- tuxmath/trunk/src/testclient.c	2009-12-17 13:18:34 UTC (rev 1686)
+++ tuxmath/trunk/src/testclient.c	2009-12-20 03:29:28 UTC (rev 1687)
@@ -15,6 +15,7 @@
 * was listed. The author was also not listed. AFAICT,this scenario allows incorporation of
 * derivative works into a GPLv2+ project like TuxMath - David Bruce 
 */
+#ifdef HAVE_LIBSDL_NET
 
 #include "globals.h"
 #include "transtruct.h"
@@ -534,3 +535,10 @@
   //if we don't find a matching question:
   return NULL;
 }
+#else
+/* if no SDL_net, do nothing: */
+int main(int argc, char **argv)
+{
+  return 0;
+}
+#endif

Modified: tuxtype/branches/gsoc-sarah/src/playgame.c
===================================================================
--- tuxtype/branches/gsoc-sarah/src/playgame.c	2009-12-17 13:18:34 UTC (rev 1686)
+++ tuxtype/branches/gsoc-sarah/src/playgame.c	2009-12-20 03:29:28 UTC (rev 1687)
@@ -237,7 +237,7 @@
       /* --- Poll input queue, get keyboard info --- */
       while (SDL_PollEvent(&event))
       {
-        if ( event.type == SDL_QUIT )
+        if (event.type == SDL_QUIT)
         {
           exit(0); /* FIXME does memory get cleaned up properly if we do this? */
         }
@@ -245,8 +245,13 @@
         {
           if (event.type == SDL_KEYDOWN)
           {
+	    switch (event.key.keysym.sym)
+	    {
+	      case SDLK_F11:
+                SDL_SaveBMP(screen, "screenshot.bmp");
+
+	    }
             if (event.key.keysym.sym == SDLK_F11) 
-              SDL_SaveBMP(screen, "screenshot.bmp");
 
             if (event.key.keysym.sym == SDLK_F6)
             {




More information about the Tux4kids-commits mailing list