From e68610f027ad6f35025d9aca87202ceb4501e97e Mon Sep 17 00:00:00 2001 From: Ryan Flegel Date: Mon, 25 Oct 2004 03:32:50 +0000 Subject: [PATCH] - committed patch from Richard Smith - fixed some warnings SVN-Revision: 2059 --- lib/special/sprite.cpp | 2 +- po/LINGUAS | 2 +- po/de.po | 61 +++++++++++++++++++---------------------- po/es.po | 64 +++++++++++++++++++++---------------------- po/fr.po | 61 +++++++++++++++++++---------------------- po/nl.po | 61 +++++++++++++++++++---------------------- po/nn.po | 61 +++++++++++++++++++---------------------- po/pt.po | 74 ++++++++++++++++++++++++-------------------------- po/supertux.pot | 61 +++++++++++++++++++---------------------- src/level.cpp | 20 ++++++++++++-- src/level_subset.cpp | 34 ++++++++--------------- src/level_subset.h | 3 -- src/leveleditor.cpp | 3 +- src/title.cpp | 17 ++++++++++-- src/worldmap.cpp | 4 +-- 15 files changed, 258 insertions(+), 270 deletions(-) diff --git a/lib/special/sprite.cpp b/lib/special/sprite.cpp index b7df947bd..f6cbdebfc 100644 --- a/lib/special/sprite.cpp +++ b/lib/special/sprite.cpp @@ -99,7 +99,7 @@ Sprite::parse_action(LispReader& lispreader) "Mirror actions must be defined after the real one!\n"; else { - for(int i = 0; i < act_tmp->surfaces.size(); i++) + for(int i = 0; static_cast(i) < act_tmp->surfaces.size(); i++) { Surface* surface = new Surface(sdl_surface_from_sdl_surface( act_tmp->surfaces[i]->impl->get_sdl_surface(), true), true); diff --git a/po/LINGUAS b/po/LINGUAS index 5d84d9851..515622959 100644 --- a/po/LINGUAS +++ b/po/LINGUAS @@ -1,8 +1,8 @@ # Set of available languages. de es -it pt fr nl nn +it diff --git a/po/de.po b/po/de.po index 704e152a3..453622e62 100644 --- a/po/de.po +++ b/po/de.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: SuperTux 0.1.1\n" "Report-Msgid-Bugs-To: super-tux-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2004-10-12 19:19+0100\n" +"POT-Creation-Date: 2004-10-20 14:06-0600\n" "PO-Revision-Date: 2004-06-03 00:29+0200\n" "Last-Translator: \n" "Language-Team: German \n" @@ -34,7 +34,6 @@ msgid "PAUSE - Press 'P' To Play" msgstr "" #: src/gameloop.cpp:675 -#, c-format msgid "Playing: " msgstr "" @@ -91,7 +90,7 @@ msgstr "" #: src/leveleditor.cpp:70 src/leveleditor.cpp:80 src/misc.cpp:125 #: src/misc.cpp:136 src/misc.cpp:149 src/misc.cpp:160 src/title.cpp:142 -#: src/title.cpp:213 +#: src/title.cpp:220 msgid "Back" msgstr "" @@ -167,86 +166,86 @@ msgstr "" msgid "Eraser" msgstr "" -#: src/leveleditor.cpp:137 +#: src/leveleditor.cpp:141 msgid "Trampoline" msgstr "" -#: src/leveleditor.cpp:138 +#: src/leveleditor.cpp:142 msgid "Flying Platform" msgstr "" -#: src/leveleditor.cpp:139 +#: src/leveleditor.cpp:143 msgid "Door" msgstr "" -#: src/leveleditor.cpp:142 +#: src/leveleditor.cpp:146 msgid "Edtit foreground tiles" msgstr "" -#: src/leveleditor.cpp:144 +#: src/leveleditor.cpp:148 msgid "Edit interactive tiles" msgstr "" -#: src/leveleditor.cpp:146 +#: src/leveleditor.cpp:150 msgid "Edit background tiles" msgstr "" -#: src/leveleditor.cpp:150 +#: src/leveleditor.cpp:154 msgid "Next sector" msgstr "" -#: src/leveleditor.cpp:151 +#: src/leveleditor.cpp:155 msgid "Prevous sector" msgstr "" -#: src/leveleditor.cpp:152 +#: src/leveleditor.cpp:156 msgid "Next level" msgstr "" -#: src/leveleditor.cpp:153 +#: src/leveleditor.cpp:157 msgid "Prevous level" msgstr "" -#: src/leveleditor.cpp:154 +#: src/leveleditor.cpp:158 #, fuzzy msgid "Save level" msgstr "Spiel Beginnen" -#: src/leveleditor.cpp:155 +#: src/leveleditor.cpp:159 msgid "Test level" msgstr "" -#: src/leveleditor.cpp:156 +#: src/leveleditor.cpp:160 msgid "Setup level" msgstr "" -#: src/leveleditor.cpp:238 src/leveleditor.cpp:714 src/leveleditor.cpp:739 -#: src/leveleditor.cpp:830 +#: src/leveleditor.cpp:242 src/leveleditor.cpp:718 src/leveleditor.cpp:743 +#: src/leveleditor.cpp:834 msgid "Level not saved. Wanna to?" msgstr "" -#: src/leveleditor.cpp:353 +#: src/leveleditor.cpp:357 #, c-format msgid "Level %d doesn't exist. Create it?" msgstr "" -#: src/leveleditor.cpp:556 src/misc.cpp:96 +#: src/leveleditor.cpp:560 src/misc.cpp:96 msgid "Level Editor" msgstr "Level Editor" -#: src/leveleditor.cpp:579 +#: src/leveleditor.cpp:583 msgid "F1 for help" msgstr "" -#: src/leveleditor.cpp:581 +#: src/leveleditor.cpp:585 msgid "Choose a level subset" msgstr "" -#: src/leveleditor.cpp:765 +#: src/leveleditor.cpp:769 msgid "No more sectors exist. Create another?" msgstr "" -#: src/leveleditor.cpp:917 +#: src/leveleditor.cpp:921 msgid "" "This is the built-in level editor. It's aim is to be intuitive\n" "and simple to use, so it should be pretty straight forward.\n" @@ -283,7 +282,7 @@ msgid "" "enemies and game objects in the bottom.\n" msgstr "" -#: src/leveleditor.cpp:953 +#: src/leveleditor.cpp:957 msgid "" "The Foreground/Interactive/Background buttons may be used to\n" "see and edit the respective layer. Level's have three tiles layers:\n" @@ -317,12 +316,12 @@ msgid "" "Webpage: http://pingus.seul.org/~grumbel/flexlay/" msgstr "" -#: src/leveleditor.cpp:993 +#: src/leveleditor.cpp:997 #, fuzzy msgid "- Level Editor's Help -" msgstr "Level Editor" -#: src/leveleditor.cpp:997 +#: src/leveleditor.cpp:1001 #, c-format msgid "Press any key to continue - Page %d/%d" msgstr "" @@ -481,22 +480,18 @@ msgid "- Best Level Statistics -" msgstr "" #: src/statistics.cpp:117 -#, c-format msgid "Max score:" msgstr "" #: src/statistics.cpp:137 -#, c-format msgid "Max coins collected:" msgstr "" #: src/statistics.cpp:139 -#, c-format msgid "Max fragging:" msgstr "" #: src/statistics.cpp:141 -#, c-format msgid "Min time needed:" msgstr "" @@ -520,7 +515,7 @@ msgstr "" msgid "Min time needed: %d / %d" msgstr "" -#: src/title.cpp:367 +#: src/title.cpp:374 msgid "" "Copyright (c) 2003 SuperTux Devel Team\n" "This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n" @@ -529,7 +524,7 @@ msgid "" "for details.\n" msgstr "" -#: src/title.cpp:419 +#: src/title.cpp:426 msgid "Are you sure you want to delete slot" msgstr "" diff --git a/po/es.po b/po/es.po index 631d55dd1..482a706bc 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: SuperTux-CVS\n" "Report-Msgid-Bugs-To: super-tux-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2004-10-12 19:19+0100\n" +"POT-Creation-Date: 2004-10-20 14:06-0600\n" "PO-Revision-Date: 2004-10-12 19:31+0200\n" "Last-Translator: Javier Beaumont \n" "Language-Team: Spanish Team \n" @@ -35,7 +35,6 @@ msgid "PAUSE - Press 'P' To Play" msgstr "PAUSA - Pulsa 'P' para continuar" #: src/gameloop.cpp:675 -#, c-format msgid "Playing: " msgstr "Jugando: " @@ -92,7 +91,7 @@ msgstr "" #: src/leveleditor.cpp:70 src/leveleditor.cpp:80 src/misc.cpp:125 #: src/misc.cpp:136 src/misc.cpp:149 src/misc.cpp:160 src/title.cpp:142 -#: src/title.cpp:213 +#: src/title.cpp:220 msgid "Back" msgstr "Volver" @@ -170,87 +169,87 @@ msgstr "" msgid "Eraser" msgstr "" -#: src/leveleditor.cpp:137 +#: src/leveleditor.cpp:141 msgid "Trampoline" msgstr "" -#: src/leveleditor.cpp:138 +#: src/leveleditor.cpp:142 msgid "Flying Platform" msgstr "" -#: src/leveleditor.cpp:139 +#: src/leveleditor.cpp:143 msgid "Door" msgstr "" -#: src/leveleditor.cpp:142 +#: src/leveleditor.cpp:146 msgid "Edtit foreground tiles" msgstr "" -#: src/leveleditor.cpp:144 +#: src/leveleditor.cpp:148 msgid "Edit interactive tiles" msgstr "" -#: src/leveleditor.cpp:146 +#: src/leveleditor.cpp:150 msgid "Edit background tiles" msgstr "" -#: src/leveleditor.cpp:150 +#: src/leveleditor.cpp:154 msgid "Next sector" msgstr "" -#: src/leveleditor.cpp:151 +#: src/leveleditor.cpp:155 msgid "Prevous sector" msgstr "" -#: src/leveleditor.cpp:152 +#: src/leveleditor.cpp:156 msgid "Next level" msgstr "" -#: src/leveleditor.cpp:153 +#: src/leveleditor.cpp:157 msgid "Prevous level" msgstr "" -#: src/leveleditor.cpp:154 +#: src/leveleditor.cpp:158 #, fuzzy msgid "Save level" msgstr "Salvar el juego" -#: src/leveleditor.cpp:155 +#: src/leveleditor.cpp:159 msgid "Test level" msgstr "" -#: src/leveleditor.cpp:156 +#: src/leveleditor.cpp:160 #, fuzzy msgid "Setup level" msgstr "Configurar las teclas" -#: src/leveleditor.cpp:238 src/leveleditor.cpp:714 src/leveleditor.cpp:739 -#: src/leveleditor.cpp:830 +#: src/leveleditor.cpp:242 src/leveleditor.cpp:718 src/leveleditor.cpp:743 +#: src/leveleditor.cpp:834 msgid "Level not saved. Wanna to?" msgstr "" -#: src/leveleditor.cpp:353 +#: src/leveleditor.cpp:357 #, c-format msgid "Level %d doesn't exist. Create it?" msgstr "" -#: src/leveleditor.cpp:556 src/misc.cpp:96 +#: src/leveleditor.cpp:560 src/misc.cpp:96 msgid "Level Editor" msgstr "Editor de niveles" -#: src/leveleditor.cpp:579 +#: src/leveleditor.cpp:583 msgid "F1 for help" msgstr "" -#: src/leveleditor.cpp:581 +#: src/leveleditor.cpp:585 msgid "Choose a level subset" msgstr "" -#: src/leveleditor.cpp:765 +#: src/leveleditor.cpp:769 msgid "No more sectors exist. Create another?" msgstr "" -#: src/leveleditor.cpp:917 +#: src/leveleditor.cpp:921 msgid "" "This is the built-in level editor. It's aim is to be intuitive\n" "and simple to use, so it should be pretty straight forward.\n" @@ -287,7 +286,7 @@ msgid "" "enemies and game objects in the bottom.\n" msgstr "" -#: src/leveleditor.cpp:953 +#: src/leveleditor.cpp:957 msgid "" "The Foreground/Interactive/Background buttons may be used to\n" "see and edit the respective layer. Level's have three tiles layers:\n" @@ -321,12 +320,12 @@ msgid "" "Webpage: http://pingus.seul.org/~grumbel/flexlay/" msgstr "" -#: src/leveleditor.cpp:993 +#: src/leveleditor.cpp:997 #, fuzzy msgid "- Level Editor's Help -" msgstr "Editor de niveles" -#: src/leveleditor.cpp:997 +#: src/leveleditor.cpp:1001 #, c-format msgid "Press any key to continue - Page %d/%d" msgstr "" @@ -485,22 +484,21 @@ msgid "- Best Level Statistics -" msgstr "Las mejores estadísticas del nivel" #: src/statistics.cpp:117 -#, fuzzy, c-format +#, fuzzy msgid "Max score:" msgstr "Máxima puntuación: %d" #: src/statistics.cpp:137 -#, c-format msgid "Max coins collected:" msgstr "" #: src/statistics.cpp:139 -#, fuzzy, c-format +#, fuzzy msgid "Max fragging:" msgstr "Máxima matanza: %d" #: src/statistics.cpp:141 -#, fuzzy, c-format +#, fuzzy msgid "Min time needed:" msgstr "Mínimo tiempo necesario: %d" @@ -524,7 +522,7 @@ msgstr "M msgid "Min time needed: %d / %d" msgstr "Mínimo tiempo necesario: %d" -#: src/title.cpp:367 +#: src/title.cpp:374 msgid "" "Copyright (c) 2003 SuperTux Devel Team\n" "This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n" @@ -539,7 +537,7 @@ msgstr "" "COPYING\n" "para detalles.\n" -#: src/title.cpp:419 +#: src/title.cpp:426 msgid "Are you sure you want to delete slot" msgstr "¿Estás seguro de que quieres borrar la ranura?" diff --git a/po/fr.po b/po/fr.po index 12c2bb088..942952cce 100644 --- a/po/fr.po +++ b/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: fr\n" "Report-Msgid-Bugs-To: super-tux-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2004-10-12 19:19+0100\n" +"POT-Creation-Date: 2004-10-20 14:06-0600\n" "PO-Revision-Date: 2004-06-17 22:11+0200\n" "Last-Translator: Frederic Rodrigo \n" "Language-Team: Français\n" @@ -32,7 +32,6 @@ msgid "PAUSE - Press 'P' To Play" msgstr "PAUSE - Pressez P pour Jouer" #: src/gameloop.cpp:675 -#, c-format msgid "Playing: " msgstr "Jouer : " @@ -89,7 +88,7 @@ msgstr "" #: src/leveleditor.cpp:70 src/leveleditor.cpp:80 src/misc.cpp:125 #: src/misc.cpp:136 src/misc.cpp:149 src/misc.cpp:160 src/title.cpp:142 -#: src/title.cpp:213 +#: src/title.cpp:220 msgid "Back" msgstr "Retour" @@ -165,87 +164,87 @@ msgstr "" msgid "Eraser" msgstr "" -#: src/leveleditor.cpp:137 +#: src/leveleditor.cpp:141 msgid "Trampoline" msgstr "" -#: src/leveleditor.cpp:138 +#: src/leveleditor.cpp:142 msgid "Flying Platform" msgstr "" -#: src/leveleditor.cpp:139 +#: src/leveleditor.cpp:143 msgid "Door" msgstr "" -#: src/leveleditor.cpp:142 +#: src/leveleditor.cpp:146 msgid "Edtit foreground tiles" msgstr "" -#: src/leveleditor.cpp:144 +#: src/leveleditor.cpp:148 msgid "Edit interactive tiles" msgstr "" -#: src/leveleditor.cpp:146 +#: src/leveleditor.cpp:150 msgid "Edit background tiles" msgstr "" -#: src/leveleditor.cpp:150 +#: src/leveleditor.cpp:154 msgid "Next sector" msgstr "" -#: src/leveleditor.cpp:151 +#: src/leveleditor.cpp:155 msgid "Prevous sector" msgstr "" -#: src/leveleditor.cpp:152 +#: src/leveleditor.cpp:156 msgid "Next level" msgstr "" -#: src/leveleditor.cpp:153 +#: src/leveleditor.cpp:157 msgid "Prevous level" msgstr "" -#: src/leveleditor.cpp:154 +#: src/leveleditor.cpp:158 #, fuzzy msgid "Save level" msgstr "Sauver le Jeu" -#: src/leveleditor.cpp:155 +#: src/leveleditor.cpp:159 msgid "Test level" msgstr "" -#: src/leveleditor.cpp:156 +#: src/leveleditor.cpp:160 #, fuzzy msgid "Setup level" msgstr "Touches " -#: src/leveleditor.cpp:238 src/leveleditor.cpp:714 src/leveleditor.cpp:739 -#: src/leveleditor.cpp:830 +#: src/leveleditor.cpp:242 src/leveleditor.cpp:718 src/leveleditor.cpp:743 +#: src/leveleditor.cpp:834 msgid "Level not saved. Wanna to?" msgstr "" -#: src/leveleditor.cpp:353 +#: src/leveleditor.cpp:357 #, c-format msgid "Level %d doesn't exist. Create it?" msgstr "" -#: src/leveleditor.cpp:556 src/misc.cpp:96 +#: src/leveleditor.cpp:560 src/misc.cpp:96 msgid "Level Editor" msgstr "Éditeur de niveaux" -#: src/leveleditor.cpp:579 +#: src/leveleditor.cpp:583 msgid "F1 for help" msgstr "" -#: src/leveleditor.cpp:581 +#: src/leveleditor.cpp:585 msgid "Choose a level subset" msgstr "" -#: src/leveleditor.cpp:765 +#: src/leveleditor.cpp:769 msgid "No more sectors exist. Create another?" msgstr "" -#: src/leveleditor.cpp:917 +#: src/leveleditor.cpp:921 msgid "" "This is the built-in level editor. It's aim is to be intuitive\n" "and simple to use, so it should be pretty straight forward.\n" @@ -282,7 +281,7 @@ msgid "" "enemies and game objects in the bottom.\n" msgstr "" -#: src/leveleditor.cpp:953 +#: src/leveleditor.cpp:957 msgid "" "The Foreground/Interactive/Background buttons may be used to\n" "see and edit the respective layer. Level's have three tiles layers:\n" @@ -316,12 +315,12 @@ msgid "" "Webpage: http://pingus.seul.org/~grumbel/flexlay/" msgstr "" -#: src/leveleditor.cpp:993 +#: src/leveleditor.cpp:997 #, fuzzy msgid "- Level Editor's Help -" msgstr "Éditeur de niveaux" -#: src/leveleditor.cpp:997 +#: src/leveleditor.cpp:1001 #, c-format msgid "Press any key to continue - Page %d/%d" msgstr "" @@ -479,22 +478,18 @@ msgid "- Best Level Statistics -" msgstr "" #: src/statistics.cpp:117 -#, c-format msgid "Max score:" msgstr "" #: src/statistics.cpp:137 -#, c-format msgid "Max coins collected:" msgstr "" #: src/statistics.cpp:139 -#, c-format msgid "Max fragging:" msgstr "" #: src/statistics.cpp:141 -#, c-format msgid "Min time needed:" msgstr "" @@ -518,7 +513,7 @@ msgstr "" msgid "Min time needed: %d / %d" msgstr "" -#: src/title.cpp:367 +#: src/title.cpp:374 msgid "" "Copyright (c) 2003 SuperTux Devel Team\n" "This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n" @@ -527,7 +522,7 @@ msgid "" "for details.\n" msgstr "" -#: src/title.cpp:419 +#: src/title.cpp:426 #, fuzzy msgid "Are you sure you want to delete slot" msgstr "Êtes vous sûr de vouloir supprimer le slot %d ?" diff --git a/po/nl.po b/po/nl.po index 789b32c8f..16d810017 100644 --- a/po/nl.po +++ b/po/nl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACGE VERSION\n" "Report-Msgid-Bugs-To: super-tux-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2004-10-12 19:19+0100\n" +"POT-Creation-Date: 2004-10-20 14:06-0600\n" "PO-Revision-Date: 2004-06-07 HO:MI+ZONE\n" "Last-Translator: Frank van der Loo \n" "Language-Team: Dutch \n" @@ -32,7 +32,6 @@ msgid "PAUSE - Press 'P' To Play" msgstr "PAUSE - Druk op 'P' Om Verder Te Gaan" #: src/gameloop.cpp:675 -#, c-format msgid "Playing: " msgstr "Level: " @@ -89,7 +88,7 @@ msgstr "" #: src/leveleditor.cpp:70 src/leveleditor.cpp:80 src/misc.cpp:125 #: src/misc.cpp:136 src/misc.cpp:149 src/misc.cpp:160 src/title.cpp:142 -#: src/title.cpp:213 +#: src/title.cpp:220 msgid "Back" msgstr "Terug" @@ -165,87 +164,87 @@ msgstr "" msgid "Eraser" msgstr "" -#: src/leveleditor.cpp:137 +#: src/leveleditor.cpp:141 msgid "Trampoline" msgstr "" -#: src/leveleditor.cpp:138 +#: src/leveleditor.cpp:142 msgid "Flying Platform" msgstr "" -#: src/leveleditor.cpp:139 +#: src/leveleditor.cpp:143 msgid "Door" msgstr "" -#: src/leveleditor.cpp:142 +#: src/leveleditor.cpp:146 msgid "Edtit foreground tiles" msgstr "" -#: src/leveleditor.cpp:144 +#: src/leveleditor.cpp:148 msgid "Edit interactive tiles" msgstr "" -#: src/leveleditor.cpp:146 +#: src/leveleditor.cpp:150 msgid "Edit background tiles" msgstr "" -#: src/leveleditor.cpp:150 +#: src/leveleditor.cpp:154 msgid "Next sector" msgstr "" -#: src/leveleditor.cpp:151 +#: src/leveleditor.cpp:155 msgid "Prevous sector" msgstr "" -#: src/leveleditor.cpp:152 +#: src/leveleditor.cpp:156 msgid "Next level" msgstr "" -#: src/leveleditor.cpp:153 +#: src/leveleditor.cpp:157 msgid "Prevous level" msgstr "" -#: src/leveleditor.cpp:154 +#: src/leveleditor.cpp:158 #, fuzzy msgid "Save level" msgstr "Bewaar Spel" -#: src/leveleditor.cpp:155 +#: src/leveleditor.cpp:159 msgid "Test level" msgstr "" -#: src/leveleditor.cpp:156 +#: src/leveleditor.cpp:160 #, fuzzy msgid "Setup level" msgstr "Toetsen Instellen" -#: src/leveleditor.cpp:238 src/leveleditor.cpp:714 src/leveleditor.cpp:739 -#: src/leveleditor.cpp:830 +#: src/leveleditor.cpp:242 src/leveleditor.cpp:718 src/leveleditor.cpp:743 +#: src/leveleditor.cpp:834 msgid "Level not saved. Wanna to?" msgstr "" -#: src/leveleditor.cpp:353 +#: src/leveleditor.cpp:357 #, c-format msgid "Level %d doesn't exist. Create it?" msgstr "" -#: src/leveleditor.cpp:556 src/misc.cpp:96 +#: src/leveleditor.cpp:560 src/misc.cpp:96 msgid "Level Editor" msgstr "Level Bewerker" -#: src/leveleditor.cpp:579 +#: src/leveleditor.cpp:583 msgid "F1 for help" msgstr "" -#: src/leveleditor.cpp:581 +#: src/leveleditor.cpp:585 msgid "Choose a level subset" msgstr "" -#: src/leveleditor.cpp:765 +#: src/leveleditor.cpp:769 msgid "No more sectors exist. Create another?" msgstr "" -#: src/leveleditor.cpp:917 +#: src/leveleditor.cpp:921 msgid "" "This is the built-in level editor. It's aim is to be intuitive\n" "and simple to use, so it should be pretty straight forward.\n" @@ -282,7 +281,7 @@ msgid "" "enemies and game objects in the bottom.\n" msgstr "" -#: src/leveleditor.cpp:953 +#: src/leveleditor.cpp:957 msgid "" "The Foreground/Interactive/Background buttons may be used to\n" "see and edit the respective layer. Level's have three tiles layers:\n" @@ -316,12 +315,12 @@ msgid "" "Webpage: http://pingus.seul.org/~grumbel/flexlay/" msgstr "" -#: src/leveleditor.cpp:993 +#: src/leveleditor.cpp:997 #, fuzzy msgid "- Level Editor's Help -" msgstr "Level Bewerker" -#: src/leveleditor.cpp:997 +#: src/leveleditor.cpp:1001 #, c-format msgid "Press any key to continue - Page %d/%d" msgstr "" @@ -479,22 +478,18 @@ msgid "- Best Level Statistics -" msgstr "" #: src/statistics.cpp:117 -#, c-format msgid "Max score:" msgstr "" #: src/statistics.cpp:137 -#, c-format msgid "Max coins collected:" msgstr "" #: src/statistics.cpp:139 -#, c-format msgid "Max fragging:" msgstr "" #: src/statistics.cpp:141 -#, c-format msgid "Min time needed:" msgstr "" @@ -518,7 +513,7 @@ msgstr "" msgid "Min time needed: %d / %d" msgstr "" -#: src/title.cpp:367 +#: src/title.cpp:374 msgid "" "Copyright (c) 2003 SuperTux Devel Team\n" "This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n" @@ -531,7 +526,7 @@ msgstr "" "mag het verspreiden onder bepaalde voorwaarden; bekijk het bestand COPYING\n" "voor details.\n" -#: src/title.cpp:419 +#: src/title.cpp:426 #, fuzzy msgid "Are you sure you want to delete slot" msgstr "Weet u zeker dat u slot %d wilt verwijderen?" diff --git a/po/nn.po b/po/nn.po index 437559789..8d98f1ad2 100644 --- a/po/nn.po +++ b/po/nn.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: nn\n" "Report-Msgid-Bugs-To: super-tux-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2004-10-12 19:19+0100\n" +"POT-Creation-Date: 2004-10-20 14:06-0600\n" "PO-Revision-Date: 2004-07-19 12:55+0200\n" "Last-Translator: Karl Ove Hufthammer \n" "Language-Team: Norwegian Nynorsk \n" @@ -34,7 +34,6 @@ msgid "PAUSE - Press 'P' To Play" msgstr "PAUSE – Trykk «P» for Ã¥ halda fram" #: src/gameloop.cpp:675 -#, c-format msgid "Playing: " msgstr "Brett: " @@ -91,7 +90,7 @@ msgstr "" #: src/leveleditor.cpp:70 src/leveleditor.cpp:80 src/misc.cpp:125 #: src/misc.cpp:136 src/misc.cpp:149 src/misc.cpp:160 src/title.cpp:142 -#: src/title.cpp:213 +#: src/title.cpp:220 msgid "Back" msgstr "Tilbake" @@ -167,87 +166,87 @@ msgstr "" msgid "Eraser" msgstr "" -#: src/leveleditor.cpp:137 +#: src/leveleditor.cpp:141 msgid "Trampoline" msgstr "" -#: src/leveleditor.cpp:138 +#: src/leveleditor.cpp:142 msgid "Flying Platform" msgstr "" -#: src/leveleditor.cpp:139 +#: src/leveleditor.cpp:143 msgid "Door" msgstr "" -#: src/leveleditor.cpp:142 +#: src/leveleditor.cpp:146 msgid "Edtit foreground tiles" msgstr "" -#: src/leveleditor.cpp:144 +#: src/leveleditor.cpp:148 msgid "Edit interactive tiles" msgstr "" -#: src/leveleditor.cpp:146 +#: src/leveleditor.cpp:150 msgid "Edit background tiles" msgstr "" -#: src/leveleditor.cpp:150 +#: src/leveleditor.cpp:154 msgid "Next sector" msgstr "" -#: src/leveleditor.cpp:151 +#: src/leveleditor.cpp:155 msgid "Prevous sector" msgstr "" -#: src/leveleditor.cpp:152 +#: src/leveleditor.cpp:156 msgid "Next level" msgstr "" -#: src/leveleditor.cpp:153 +#: src/leveleditor.cpp:157 msgid "Prevous level" msgstr "" -#: src/leveleditor.cpp:154 +#: src/leveleditor.cpp:158 #, fuzzy msgid "Save level" msgstr "Lagra spel" -#: src/leveleditor.cpp:155 +#: src/leveleditor.cpp:159 msgid "Test level" msgstr "" -#: src/leveleditor.cpp:156 +#: src/leveleditor.cpp:160 #, fuzzy msgid "Setup level" msgstr "Speltastar" -#: src/leveleditor.cpp:238 src/leveleditor.cpp:714 src/leveleditor.cpp:739 -#: src/leveleditor.cpp:830 +#: src/leveleditor.cpp:242 src/leveleditor.cpp:718 src/leveleditor.cpp:743 +#: src/leveleditor.cpp:834 msgid "Level not saved. Wanna to?" msgstr "" -#: src/leveleditor.cpp:353 +#: src/leveleditor.cpp:357 #, c-format msgid "Level %d doesn't exist. Create it?" msgstr "" -#: src/leveleditor.cpp:556 src/misc.cpp:96 +#: src/leveleditor.cpp:560 src/misc.cpp:96 msgid "Level Editor" msgstr "Lag brett" -#: src/leveleditor.cpp:579 +#: src/leveleditor.cpp:583 msgid "F1 for help" msgstr "" -#: src/leveleditor.cpp:581 +#: src/leveleditor.cpp:585 msgid "Choose a level subset" msgstr "" -#: src/leveleditor.cpp:765 +#: src/leveleditor.cpp:769 msgid "No more sectors exist. Create another?" msgstr "" -#: src/leveleditor.cpp:917 +#: src/leveleditor.cpp:921 msgid "" "This is the built-in level editor. It's aim is to be intuitive\n" "and simple to use, so it should be pretty straight forward.\n" @@ -284,7 +283,7 @@ msgid "" "enemies and game objects in the bottom.\n" msgstr "" -#: src/leveleditor.cpp:953 +#: src/leveleditor.cpp:957 msgid "" "The Foreground/Interactive/Background buttons may be used to\n" "see and edit the respective layer. Level's have three tiles layers:\n" @@ -318,12 +317,12 @@ msgid "" "Webpage: http://pingus.seul.org/~grumbel/flexlay/" msgstr "" -#: src/leveleditor.cpp:993 +#: src/leveleditor.cpp:997 #, fuzzy msgid "- Level Editor's Help -" msgstr "Lag brett" -#: src/leveleditor.cpp:997 +#: src/leveleditor.cpp:1001 #, c-format msgid "Press any key to continue - Page %d/%d" msgstr "" @@ -481,22 +480,18 @@ msgid "- Best Level Statistics -" msgstr "" #: src/statistics.cpp:117 -#, c-format msgid "Max score:" msgstr "" #: src/statistics.cpp:137 -#, c-format msgid "Max coins collected:" msgstr "" #: src/statistics.cpp:139 -#, c-format msgid "Max fragging:" msgstr "" #: src/statistics.cpp:141 -#, c-format msgid "Min time needed:" msgstr "" @@ -520,7 +515,7 @@ msgstr "" msgid "Min time needed: %d / %d" msgstr "" -#: src/title.cpp:367 +#: src/title.cpp:374 msgid "" "Copyright (c) 2003 SuperTux Devel Team\n" "This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n" @@ -533,7 +528,7 @@ msgstr "" "og du kan kopiera det til andre under visse vilkÃ¥r. SjÃ¥ fila «COPYING»\n" "for meir informasjon.\n" -#: src/title.cpp:419 +#: src/title.cpp:426 #, fuzzy msgid "Are you sure you want to delete slot" msgstr "Er du sikker pÃ¥ at du vil sletta plass %d?" diff --git a/po/pt.po b/po/pt.po index f57d13350..1c617b3e4 100644 --- a/po/pt.po +++ b/po/pt.po @@ -11,7 +11,7 @@ msgid "" msgstr "" "Project-Id-Version: pt\n" "Report-Msgid-Bugs-To: super-tux-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2004-10-12 19:19+0100\n" +"POT-Creation-Date: 2004-10-20 14:06-0600\n" "PO-Revision-Date: 2004-10-12 19:44+0100\n" "Last-Translator: Ricardo Cruz \n" "Language-Team: European Portuguese\n" @@ -38,7 +38,6 @@ msgid "PAUSE - Press 'P' To Play" msgstr "PAUSA - Carrega no 'P' para continuar" #: src/gameloop.cpp:675 -#, c-format msgid "Playing: " msgstr "Jogando: " @@ -95,7 +94,7 @@ msgstr "Carregar Conjunto" #: src/leveleditor.cpp:70 src/leveleditor.cpp:80 src/misc.cpp:125 #: src/misc.cpp:136 src/misc.cpp:149 src/misc.cpp:160 src/title.cpp:142 -#: src/title.cpp:213 +#: src/title.cpp:220 msgid "Back" msgstr "Recuar" @@ -167,85 +166,85 @@ msgstr "Aplicar" msgid "Eraser" msgstr "Borracha" -#: src/leveleditor.cpp:137 +#: src/leveleditor.cpp:141 msgid "Trampoline" msgstr "Trampolim" -#: src/leveleditor.cpp:138 +#: src/leveleditor.cpp:142 msgid "Flying Platform" msgstr "Plataforma Voadora" -#: src/leveleditor.cpp:139 +#: src/leveleditor.cpp:143 msgid "Door" msgstr "Porta" -#: src/leveleditor.cpp:142 +#: src/leveleditor.cpp:146 msgid "Edtit foreground tiles" msgstr "Editar camada da frente" -#: src/leveleditor.cpp:144 +#: src/leveleditor.cpp:148 msgid "Edit interactive tiles" msgstr "Editar camada interactiva" -#: src/leveleditor.cpp:146 +#: src/leveleditor.cpp:150 msgid "Edit background tiles" msgstr "Editar camada de fundo" -#: src/leveleditor.cpp:150 +#: src/leveleditor.cpp:154 msgid "Next sector" msgstr "Próximo sector" -#: src/leveleditor.cpp:151 +#: src/leveleditor.cpp:155 msgid "Prevous sector" msgstr "Sector anterior" -#: src/leveleditor.cpp:152 +#: src/leveleditor.cpp:156 msgid "Next level" msgstr "Próximo nível" -#: src/leveleditor.cpp:153 +#: src/leveleditor.cpp:157 msgid "Prevous level" msgstr "Nível anterior" -#: src/leveleditor.cpp:154 +#: src/leveleditor.cpp:158 msgid "Save level" msgstr "Gravar o nível" -#: src/leveleditor.cpp:155 +#: src/leveleditor.cpp:159 msgid "Test level" msgstr "Testar o nível" -#: src/leveleditor.cpp:156 +#: src/leveleditor.cpp:160 msgid "Setup level" msgstr "Configurar o nível" -#: src/leveleditor.cpp:238 src/leveleditor.cpp:714 src/leveleditor.cpp:739 -#: src/leveleditor.cpp:830 +#: src/leveleditor.cpp:242 src/leveleditor.cpp:718 src/leveleditor.cpp:743 +#: src/leveleditor.cpp:834 msgid "Level not saved. Wanna to?" msgstr "Nível não gravado. Gravá-lo?" -#: src/leveleditor.cpp:353 +#: src/leveleditor.cpp:357 #, c-format msgid "Level %d doesn't exist. Create it?" msgstr "Nível %d não existe. Criá-lo?" -#: src/leveleditor.cpp:556 src/misc.cpp:96 +#: src/leveleditor.cpp:560 src/misc.cpp:96 msgid "Level Editor" msgstr "Editor de Níveis" -#: src/leveleditor.cpp:579 +#: src/leveleditor.cpp:583 msgid "F1 for help" msgstr "F1 para ajuda" -#: src/leveleditor.cpp:581 +#: src/leveleditor.cpp:585 msgid "Choose a level subset" msgstr "Escolhe um conjunto de níveis" -#: src/leveleditor.cpp:765 +#: src/leveleditor.cpp:769 msgid "No more sectors exist. Create another?" msgstr "Não existem mais sectores. Criar outro?" -#: src/leveleditor.cpp:917 +#: src/leveleditor.cpp:921 msgid "" "This is the built-in level editor. It's aim is to be intuitive\n" "and simple to use, so it should be pretty straight forward.\n" @@ -301,7 +300,8 @@ msgstr "" "Já deverás ter reparado no grupo de botões flutuante.\n" "Cada um serve um propósito diferente. Para escolheres um certo botão\n" "usa o botão esquerdo do rato no mesmo. Alguns botões tem uma tecla\n" -"de atalho, que pode ser visualizada carregando com o botão do rato direito no\n" +"de atalho, que pode ser visualizada carregando com o botão do rato direito " +"no\n" "mesmo. Isso irá mostrar o que o botão faz, também.\n" "Os grupos de botões podem também ser movidos arrastando-os,\n" "enquanto o botão esquerdo do rato é pressionado.\n" @@ -311,11 +311,12 @@ msgstr "" "Para começares a introduzir 'tiles' e objectos usa o grupo de botões\n" "maior. Cada botão é um 'tile' diferente. Para o pôres no nível,\n" "carrega no mesmo e depois usa o botão esquerdo do rato no nível.\n" -"Podes também copiar 'tiles' do nível usando o botão do meio do rato (a roda serve).\n" +"Podes também copiar 'tiles' do nível usando o botão do meio do rato (a roda " +"serve).\n" "Usa a roda do rato para deslizares pelo grupo de botões. Irás encontrar\n" "inimigos e elementos do jogo no fundo.\n" -#: src/leveleditor.cpp:953 +#: src/leveleditor.cpp:957 msgid "" "The Foreground/Interactive/Background buttons may be used to\n" "see and edit the respective layer. Level's have three tiles layers:\n" @@ -350,11 +351,13 @@ msgid "" msgstr "" "Da esquerda para a direita:\n" "Mini setas - podem ser usadas para escolher outros sectores..\n" -"Sectores são mini-níveis, por assim dizer, que podem ser acessíveis por portas.\n" +"Sectores são mini-níveis, por assim dizer, que podem ser acessíveis por " +"portas.\n" "Setas grantes - permitem escolher outro nível no mesmo conjunto de níveis.\n" "Disquete - gravar o nível.\n" "Tux - testar o nível.\n" -"Ferramentas - configura algumas definições do nível, incluíndo mudanças do tamanho do mesmo.\n" +"Ferramentas - configura algumas definições do nível, incluíndo mudanças do " +"tamanho do mesmo.\n" "\n" "Chegámos ao fim deste Howto.\n" "\n" @@ -368,11 +371,11 @@ msgstr "" "incluíndo o SuperTux. É um projecto independente.\n" "Webpage: http://pingus.seul.org/~grumbel/flexlay/" -#: src/leveleditor.cpp:993 +#: src/leveleditor.cpp:997 msgid "- Level Editor's Help -" msgstr "- Ajuda do Editor de Níveis -" -#: src/leveleditor.cpp:997 +#: src/leveleditor.cpp:1001 #, c-format msgid "Press any key to continue - Page %d/%d" msgstr "Carregar numa tecla para continuar - Página %d/%d" @@ -528,22 +531,18 @@ msgid "- Best Level Statistics -" msgstr "- Melhores Estatísticas do Nível -" #: src/statistics.cpp:117 -#, c-format msgid "Max score:" msgstr "Máx pontos:" #: src/statistics.cpp:137 -#, c-format msgid "Max coins collected:" msgstr "Máx moedas apanhadas:" #: src/statistics.cpp:139 -#, c-format msgid "Max fragging:" msgstr "Max matança:" #: src/statistics.cpp:141 -#, c-format msgid "Min time needed:" msgstr "Min tempo necessário:" @@ -567,7 +566,7 @@ msgstr "Máx matança: %d / %d" msgid "Min time needed: %d / %d" msgstr "Min tempo necessário: %d / %d" -#: src/title.cpp:367 +#: src/title.cpp:374 msgid "" "Copyright (c) 2003 SuperTux Devel Team\n" "This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n" @@ -581,7 +580,7 @@ msgstr "" "COPYING\n" "para mais informações.\n" -#: src/title.cpp:419 +#: src/title.cpp:426 msgid "Are you sure you want to delete slot" msgstr "Tens a certeza que queres remover o slot" @@ -732,4 +731,3 @@ msgstr "Alt direito" #: lib/gui/menu.cpp:269 msgid "Left Alt" msgstr "Alt esquerdo" - diff --git a/po/supertux.pot b/po/supertux.pot index e28f8b30f..1f249ebed 100644 --- a/po/supertux.pot +++ b/po/supertux.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: super-tux-devel@lists.sourceforge.net\n" -"POT-Creation-Date: 2004-10-12 19:19+0100\n" +"POT-Creation-Date: 2004-10-20 14:06-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -33,7 +33,6 @@ msgid "PAUSE - Press 'P' To Play" msgstr "" #: src/gameloop.cpp:675 -#, c-format msgid "Playing: " msgstr "" @@ -90,7 +89,7 @@ msgstr "" #: src/leveleditor.cpp:70 src/leveleditor.cpp:80 src/misc.cpp:125 #: src/misc.cpp:136 src/misc.cpp:149 src/misc.cpp:160 src/title.cpp:142 -#: src/title.cpp:213 +#: src/title.cpp:220 msgid "Back" msgstr "" @@ -162,85 +161,85 @@ msgstr "" msgid "Eraser" msgstr "" -#: src/leveleditor.cpp:137 +#: src/leveleditor.cpp:141 msgid "Trampoline" msgstr "" -#: src/leveleditor.cpp:138 +#: src/leveleditor.cpp:142 msgid "Flying Platform" msgstr "" -#: src/leveleditor.cpp:139 +#: src/leveleditor.cpp:143 msgid "Door" msgstr "" -#: src/leveleditor.cpp:142 +#: src/leveleditor.cpp:146 msgid "Edtit foreground tiles" msgstr "" -#: src/leveleditor.cpp:144 +#: src/leveleditor.cpp:148 msgid "Edit interactive tiles" msgstr "" -#: src/leveleditor.cpp:146 +#: src/leveleditor.cpp:150 msgid "Edit background tiles" msgstr "" -#: src/leveleditor.cpp:150 +#: src/leveleditor.cpp:154 msgid "Next sector" msgstr "" -#: src/leveleditor.cpp:151 +#: src/leveleditor.cpp:155 msgid "Prevous sector" msgstr "" -#: src/leveleditor.cpp:152 +#: src/leveleditor.cpp:156 msgid "Next level" msgstr "" -#: src/leveleditor.cpp:153 +#: src/leveleditor.cpp:157 msgid "Prevous level" msgstr "" -#: src/leveleditor.cpp:154 +#: src/leveleditor.cpp:158 msgid "Save level" msgstr "" -#: src/leveleditor.cpp:155 +#: src/leveleditor.cpp:159 msgid "Test level" msgstr "" -#: src/leveleditor.cpp:156 +#: src/leveleditor.cpp:160 msgid "Setup level" msgstr "" -#: src/leveleditor.cpp:238 src/leveleditor.cpp:714 src/leveleditor.cpp:739 -#: src/leveleditor.cpp:830 +#: src/leveleditor.cpp:242 src/leveleditor.cpp:718 src/leveleditor.cpp:743 +#: src/leveleditor.cpp:834 msgid "Level not saved. Wanna to?" msgstr "" -#: src/leveleditor.cpp:353 +#: src/leveleditor.cpp:357 #, c-format msgid "Level %d doesn't exist. Create it?" msgstr "" -#: src/leveleditor.cpp:556 src/misc.cpp:96 +#: src/leveleditor.cpp:560 src/misc.cpp:96 msgid "Level Editor" msgstr "" -#: src/leveleditor.cpp:579 +#: src/leveleditor.cpp:583 msgid "F1 for help" msgstr "" -#: src/leveleditor.cpp:581 +#: src/leveleditor.cpp:585 msgid "Choose a level subset" msgstr "" -#: src/leveleditor.cpp:765 +#: src/leveleditor.cpp:769 msgid "No more sectors exist. Create another?" msgstr "" -#: src/leveleditor.cpp:917 +#: src/leveleditor.cpp:921 msgid "" "This is the built-in level editor. It's aim is to be intuitive\n" "and simple to use, so it should be pretty straight forward.\n" @@ -277,7 +276,7 @@ msgid "" "enemies and game objects in the bottom.\n" msgstr "" -#: src/leveleditor.cpp:953 +#: src/leveleditor.cpp:957 msgid "" "The Foreground/Interactive/Background buttons may be used to\n" "see and edit the respective layer. Level's have three tiles layers:\n" @@ -311,11 +310,11 @@ msgid "" "Webpage: http://pingus.seul.org/~grumbel/flexlay/" msgstr "" -#: src/leveleditor.cpp:993 +#: src/leveleditor.cpp:997 msgid "- Level Editor's Help -" msgstr "" -#: src/leveleditor.cpp:997 +#: src/leveleditor.cpp:1001 #, c-format msgid "Press any key to continue - Page %d/%d" msgstr "" @@ -471,22 +470,18 @@ msgid "- Best Level Statistics -" msgstr "" #: src/statistics.cpp:117 -#, c-format msgid "Max score:" msgstr "" #: src/statistics.cpp:137 -#, c-format msgid "Max coins collected:" msgstr "" #: src/statistics.cpp:139 -#, c-format msgid "Max fragging:" msgstr "" #: src/statistics.cpp:141 -#, c-format msgid "Min time needed:" msgstr "" @@ -510,7 +505,7 @@ msgstr "" msgid "Min time needed: %d / %d" msgstr "" -#: src/title.cpp:367 +#: src/title.cpp:374 msgid "" "Copyright (c) 2003 SuperTux Devel Team\n" "This game comes with ABSOLUTELY NO WARRANTY. This is free software, and you\n" @@ -519,7 +514,7 @@ msgid "" "for details.\n" msgstr "" -#: src/title.cpp:419 +#: src/title.cpp:426 msgid "Are you sure you want to delete slot" msgstr "" diff --git a/src/level.cpp b/src/level.cpp index f7906aba7..21069c7fd 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -52,7 +52,19 @@ Level::Level() void Level::load(const std::string& filename) { - LispReader* level = LispReader::load(filename, "supertux-level"); + std::string filepath; + filepath = st_dir + "/levels/" + filename; + if (access(filepath.c_str(), R_OK) != 0) + { + filepath = datadir + "/levels/" + filename; + if (access(filepath.c_str(), R_OK) != 0) + { + std::cerr << "Error: Level: couldn't find level: " << filename << std::endl; + return; + } + } + + LispReader* level = LispReader::load(filepath, "supertux-level"); int version = 1; level->read_int("version", version); @@ -102,7 +114,11 @@ Level::load_old_format(LispReader& reader) void Level::save(const std::string& filename) { - ofstream file(filename.c_str(), ios::out); + std::string filepath = "levels/" + filename; + int last_slash = filepath.find_last_of('/'); + FileSystem::fcreatedir(filepath.substr(0,last_slash).c_str()); + filepath = st_dir + "/" + filepath; + ofstream file(filepath.c_str(), ios::out); LispWriter* writer = new LispWriter(file); writer->write_comment("Level made using SuperTux's built-in Level Editor"); diff --git a/src/level_subset.cpp b/src/level_subset.cpp index 34d0565b4..fda54170e 100644 --- a/src/level_subset.cpp +++ b/src/level_subset.cpp @@ -88,42 +88,32 @@ void LevelSubset::load(const std::string& subset) // Check in which directory our subset is located (ie. ~/.supertux/ // or SUPERTUX_DATADIR) std::string filename; - filename = st_dir + "/levels/" + subset + "/"; - if (access(filename.c_str(), R_OK) == 0) + filename = st_dir + "/levels/" + subset + "/info"; + if (access(filename.c_str(), R_OK) != 0) { - directory = filename; - } - else - { - filename = datadir + "/levels/" + subset + "/"; - if (access(filename.c_str(), R_OK) == 0) - directory = filename; - else + filename = datadir + "/levels/" + subset + "/info"; + if (access(filename.c_str(), R_OK) != 0) std::cout << "Error: LevelSubset: couldn't find subset: " << subset << std::endl; } - read_info_file(directory + "info"); + read_info_file(filename); if (levels.empty()) { // Level info file doesn't define any levels, so read the // directory to see what we can find std::set files; + filename = datadir + "/levels/" + subset + "/"; + files = FileSystem::read_directory(filename); + filename = st_dir + "/levels/" + subset + "/"; - if(access(filename.c_str(), R_OK) == 0) - { - files = FileSystem::read_directory(filename); - } - else - { - filename = datadir + "/levels/" + subset + "/"; - files = FileSystem::read_directory(filename); - } + std::set user_files = FileSystem::read_directory(filename); + files.insert(user_files.begin(), user_files.end()); for(std::set::iterator i = files.begin(); i != files.end(); ++i) { if (has_suffix(*i, ".stl")) - levels.push_back(*i); + levels.push_back(subset+ "/" + *i); } } } @@ -177,7 +167,7 @@ std::string LevelSubset::get_level_filename(unsigned int num) { assert(num < levels.size()); - return directory + levels[num]; + return levels[num]; } int diff --git a/src/level_subset.h b/src/level_subset.h index 7ae6bcd8a..8202271f4 100644 --- a/src/level_subset.h +++ b/src/level_subset.h @@ -32,9 +32,6 @@ using namespace SuperTux; class LevelSubset { private: - /** Directory in which the level subset is stored */ - std::string directory; - /** Level filenames without the leading path ("level1.stl", "level3.stl", ...) */ std::vector levels; diff --git a/src/leveleditor.cpp b/src/leveleditor.cpp index de5a83b94..260c9d359 100644 --- a/src/leveleditor.cpp +++ b/src/leveleditor.cpp @@ -840,7 +840,8 @@ if(level_changed) GameSession session(level_filename, ST_GL_TEST); session.run(); // player_status.reset(); -sound_manager->halt_music(); +if(sound_manager) + sound_manager->halt_music(); } void LevelEditor::change(int x, int y, int newtile, int layer) diff --git a/src/title.cpp b/src/title.cpp index d156c0d1d..9e4504912 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -218,7 +218,20 @@ void check_levels_contrib_menu() /** get level's title */ std::string level_title = ""; - LispReader* reader = LispReader::load(subset.get_level_filename(i), "supertux-level"); + std::string filename = subset.get_level_filename(i); + std::string filepath; + filepath = st_dir + "/levels/" + filename; + if (access(filepath.c_str(), R_OK) != 0) + { + filepath = datadir + "/levels/" + filename; + if (access(filepath.c_str(), R_OK) != 0) + { + std::cerr << "Error: Level: couldn't find level: " << filename << std::endl; + continue; + } + } + + LispReader* reader = LispReader::load(filepath, "supertux-level"); if(!reader) { std::cerr << "Error: Could not open level file. Ignoring...\n"; @@ -314,7 +327,7 @@ void title(void) random_timer.init(true); Ticks::pause_init(); - titlesession = new GameSession(datadir + "/levels/misc/menu.stl", ST_GL_DEMO_GAME); + titlesession = new GameSession("misc/menu.stl", ST_GL_DEMO_GAME); /* Load images: */ bkg_title = new Surface(datadir + "/images/background/arctis.jpg", false); diff --git a/src/worldmap.cpp b/src/worldmap.cpp index 370109952..e7eed6d1c 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -169,7 +169,7 @@ TileManager::TileManager() std::cerr << "Warning: no image specified for tile " << id << ".\nIgnoring...\n" << std::endl; - for(int i = 0; i < filenames.size(); i++) + for(int i = 0; static_cast(i) < filenames.size(); i++) { Surface* image = new Surface( datadir + "/images/worldmap/" + filenames[i], true); @@ -879,7 +879,7 @@ WorldMap::update(float delta) // do a shriking fade to the level shrink_fade(Vector((level->pos.x*32 + 16 + offset.x),(level->pos.y*32 + 16 + offset.y)), 500); - GameSession session(datadir + "/levels/" + level->name, + GameSession session(level->name, ST_GL_LOAD_LEVEL_FILE, level->vertical_flip, &level->statistics); -- 2.11.0