Page MenuHomePhabricator (Chris)

No OneTemporary

Authored By
Unknown
Size
52 KB
Referenced Files
None
Subscribers
None
diff --git a/data/locale/de.po b/data/locale/de.po
new file mode 100644
index 0000000..9867593
--- /dev/null
+++ b/data/locale/de.po
@@ -0,0 +1,1124 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: meandmyshadow 0.4\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2012-05-21 10:48+0300\n"
+"PO-Revision-Date: 2012-05-29 00:00+0100\n"
+"Last-Translator: Wuzzy <wuzzy2@mail.ru>\n"
+"Language-Team: \n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: German\n"
+"X-Poedit-Country: GERMANY\n"
+
+#: ../src/Addons.cpp:40
+#: ../src/TitleMenu.cpp:50
+msgid "Addons"
+msgstr "Add-Ons"
+
+#: ../src/Addons.cpp:58
+msgid "Unable to initialize addon menu:"
+msgstr "Unfähig, das Add-Ons-Menü zu initialisieren:"
+
+#: ../src/Addons.cpp:66
+#: ../src/Addons.cpp:115
+#: ../src/LevelEditSelect.cpp:69
+#: ../src/LevelSelect.cpp:186
+msgid "Back"
+msgstr "Zurück"
+
+#: ../src/Addons.cpp:97
+msgid "Levels"
+msgstr "Levels"
+
+#: ../src/Addons.cpp:98
+msgid "Level Packs"
+msgstr "Levelsammlungen"
+
+#: ../src/Addons.cpp:99
+msgid "Themes"
+msgstr "Themen"
+
+#: ../src/Addons.cpp:119
+#: ../src/Addons.cpp:595
+msgid "Install"
+msgstr "Installieren"
+
+#: ../src/Addons.cpp:123
+msgid "Update"
+msgstr "Aktualisieren"
+
+#: ../src/Addons.cpp:400
+#: ../src/Addons.cpp:417
+#: ../src/Addons.cpp:434
+#: ../src/Addons.cpp:461
+#: ../src/Addons.cpp:478
+#: ../src/Addons.cpp:492
+msgid "ERROR: Unable to download addon!"
+msgstr "FEHLER: Add-On konnte nicht heruntergeladen werden!"
+
+#: ../src/Addons.cpp:400
+#: ../src/Addons.cpp:417
+#: ../src/Addons.cpp:434
+#: ../src/Addons.cpp:461
+#: ../src/Addons.cpp:478
+#: ../src/Addons.cpp:492
+msgid "ERROR:"
+msgstr "FEHLER:"
+
+#: ../src/Addons.cpp:590
+msgid "Uninstall"
+msgstr "Deinstallieren"
+
+# TRANSLATORS: Font used in GUI:
+# - Use "knewave" for languages using Latin and Latin-derived alphabets
+# - "DroidSansFallback" can be used for non-Latin writing systems
+#: ../src/Functions.cpp:460
+#: ../src/Functions.cpp:461
+#: ../src/Functions.cpp:462
+msgid "knewave"
+msgstr "knewave"
+
+# TRANSLATORS: Font used for normal text:
+# - Use "Blokletters-Viltstift" for languages using Latin and Latin-derived alphabets
+# - "DroidSansFallback" can be used for non-Latin writing systems
+#: ../src/Functions.cpp:466
+msgid "Blokletters-Viltstift"
+msgstr "Blokletters-Viltstift"
+
+#: ../src/Functions.cpp:986
+#: ../src/Functions.cpp:1013
+#: ../src/Functions.cpp:1377
+#: ../src/InputManager.cpp:196
+#: ../src/LevelEditor.cpp:1017
+#: ../src/LevelEditor.cpp:1630
+#: ../src/LevelEditor.cpp:1687
+#: ../src/LevelEditor.cpp:1750
+#: ../src/LevelEditor.cpp:1830
+#: ../src/LevelEditor.cpp:1936
+#: ../src/LevelEditor.cpp:1996
+#: ../src/LevelEditSelect.cpp:175
+#: ../src/LevelEditSelect.cpp:215
+#: ../src/LevelEditSelect.cpp:263
+msgid "OK"
+msgstr "OK"
+
+#: ../src/Functions.cpp:987
+#: ../src/Functions.cpp:999
+#: ../src/Functions.cpp:1009
+#: ../src/Functions.cpp:1381
+#: ../src/LevelEditor.cpp:1021
+#: ../src/LevelEditor.cpp:1634
+#: ../src/LevelEditor.cpp:1691
+#: ../src/LevelEditor.cpp:1754
+#: ../src/LevelEditor.cpp:1834
+#: ../src/LevelEditor.cpp:1940
+#: ../src/LevelEditor.cpp:2000
+#: ../src/LevelEditSelect.cpp:179
+#: ../src/LevelEditSelect.cpp:219
+#: ../src/LevelEditSelect.cpp:267
+#: ../src/TitleMenu.cpp:442
+msgid "Cancel"
+msgstr "Abbrechen"
+
+#: ../src/Functions.cpp:991
+msgid "Abort"
+msgstr "Abbrechen"
+
+#: ../src/Functions.cpp:992
+#: ../src/Functions.cpp:1008
+msgid "Retry"
+msgstr "Neu versuchen"
+
+#: ../src/Functions.cpp:993
+msgid "Ignore"
+msgstr "Ignorieren"
+
+#: ../src/Functions.cpp:997
+#: ../src/Functions.cpp:1003
+msgid "Yes"
+msgstr "Ja"
+
+#: ../src/Functions.cpp:998
+#: ../src/Functions.cpp:1004
+msgid "No"
+msgstr "Nein"
+
+# TRANSLATORS: Filename is coming before this text
+#: ../src/Functions.cpp:1145
+#, c-format
+msgid ""
+"%s already exists.\n"
+"Do you want to overwrite it?"
+msgstr ""
+"%s existiert bereits.\n"
+"Möchtest du es überschreiben?"
+
+#: ../src/Functions.cpp:1145
+msgid "Overwrite Prompt"
+msgstr "Überschreiben bestätigen"
+
+#: ../src/Functions.cpp:1166
+#: ../src/Functions.cpp:1184
+#, c-format
+msgid "Can't open file %s."
+msgstr "Kann die Datei %s nicht öffnen."
+
+#: ../src/Functions.cpp:1166
+#: ../src/Functions.cpp:1184
+msgid "Error"
+msgstr "Fehler"
+
+#: ../src/Functions.cpp:1318
+msgid "Save File"
+msgstr "Datei speichern"
+
+#: ../src/Functions.cpp:1318
+msgid "Load File"
+msgstr "Datei laden"
+
+#: ../src/Functions.cpp:1322
+msgid "Search In"
+msgstr "Suche in"
+
+#: ../src/Functions.cpp:1332
+msgid "File Name"
+msgstr "Dateiname"
+
+# TRANSLATORS: Please do not remove %s or %d from your translation:
+# - %d means the level number in a levelpack
+# - %s means the name of current level
+#: ../src/Game.cpp:226
+#: ../src/Game.cpp:820
+#, c-format
+msgid "Level %d %s"
+msgstr "Level %d %s"
+
+# TRANSLATORS: Please do not remove %s from your translation:
+# - %s will be replaced with current action key
+#: ../src/Game.cpp:647
+#, c-format
+msgid "Press %s key to save the game."
+msgstr "Drücke die %s-Taste, um das Spiel zu speichern"
+
+# TRANSLATORS: Please do not remove %s from your translation:
+# - %s will be replaced with current action key
+#: ../src/Game.cpp:652
+#, c-format
+msgid "Press %s key to swap the position of player and shadow."
+msgstr "Drücke die %s-Taste, um die Position von dir und deinem Schatten zu vertauschen."
+
+# TRANSLATORS: Please do not remove %s from your translation:
+# - %s will be replaced with current action key
+#: ../src/Game.cpp:657
+#, c-format
+msgid "Press %s key to activate the switch."
+msgstr "Drücke die %s-Taste, um den Schalter zu aktivieren."
+
+# TRANSLATORS: Please do not remove %s from your translation:
+# - %s will be replaced with current action key
+#: ../src/Game.cpp:662
+#, c-format
+msgid "Press %s key to teleport."
+msgstr "Drücke die %s-Taste zum teleportieren."
+
+# TRANSLATORS: Please do not remove %s from your translation:
+# - first %s means currently configured key to restart game
+# - Second %s means configured key to load from last save
+#: ../src/Game.cpp:703
+#, c-format
+msgid "Press %s to restart current level or press %s to load the game."
+msgstr "Drücke %s, um den aktellen Level neuzustarten oder drücke %s, um das Spiel zu laden."
+
+# TRANSLATORS: Please do not remove %s from your translation:
+# - %s will be replaced with currently configured key to restart game
+#: ../src/Game.cpp:715
+#, c-format
+msgid "Press %s to restart current level."
+msgstr "Drücke %s, um das aktuelle Level neuzustarten."
+
+#: ../src/Game.cpp:729
+msgid "Your shadow has died."
+msgstr "Dein Schatten ist gestorben."
+
+#: ../src/Game.cpp:772
+#, c-format
+msgid "%d recordings"
+msgstr "%d Aufzeichnungen"
+
+# TRANSLATORS: This is caption for finished level
+#: ../src/Game.cpp:812
+msgid "You've finished:"
+msgstr "Du hast beendet:"
+
+# TRANSLATORS: Please do not remove %-.2f from your translation:
+# - %-.2f means time in seconds
+# - s is shortened form of a second. Try to keep it so.
+#: ../src/Game.cpp:981
+#, c-format
+msgid "Time: %-.2fs"
+msgstr "Zeit: %-.2fs"
+
+# TRANSLATORS: Please do not remove %-.2f from your translation:
+# - %-.2f means time in seconds
+# - s is shortened form of a second. Try to keep it so.
+#: ../src/Game.cpp:990
+#, c-format
+msgid "Best time: %-.2fs"
+msgstr "Bestzeit: %-.2fs"
+
+#: ../src/Game.cpp:1001
+#, c-format
+msgid "Target time: %-.2fs"
+msgstr "Zielzeit: %-2.fs"
+
+# TRANSLATORS: Please do not remove %d from your translation:
+# - %d means the number of recordings user has made
+#: ../src/Game.cpp:1022
+#, c-format
+msgid "Recordings: %d"
+msgstr "Aufzeichnungen: %d"
+
+# TRANSLATORS: Please do not remove %d from your translation:
+# - %d means the number of recordings user has made
+#: ../src/Game.cpp:1030
+#, c-format
+msgid "Best recordings: %d"
+msgstr "Beste Aufzeichnungen: %d"
+
+#: ../src/Game.cpp:1040
+#, c-format
+msgid "Target recordings: %d"
+msgstr "Ziel: %d Aufzeichnungen"
+
+# TRANSLATORS: Please do not remove %s from your translation:
+# - %s will be replaced with name of a prize medal (gold, silver or bronze)
+#: ../src/Game.cpp:1053
+#, c-format
+msgid "You earned the %s medal"
+msgstr "Du hast die %smedaillie gewonnen"
+
+#: ../src/Game.cpp:1053
+msgid "GOLD"
+msgstr "Gold"
+
+#: ../src/Game.cpp:1053
+msgid "SILVER"
+msgstr "Silber"
+
+#: ../src/Game.cpp:1053
+msgid "BRONZE"
+msgstr "Bronze"
+
+# TRANSLATORS: used as return to the level selector menu
+#: ../src/Game.cpp:1068
+msgid "Menu"
+msgstr "Menü"
+
+# TRANSLATORS: used as restart level
+#: ../src/Game.cpp:1075
+#: ../src/InputManager.cpp:41
+msgid "Restart"
+msgstr "Neu versuchen"
+
+# TRANSLATORS: used as next level
+#: ../src/Game.cpp:1082
+msgid "Next"
+msgstr "Nächstes"
+
+#: ../src/Game.cpp:1122
+msgid "Game replay is done."
+msgstr "Wiederholung ist fertig."
+
+#: ../src/Game.cpp:1122
+msgid "Game Replay"
+msgstr "Wiederholung"
+
+#: ../src/Game.cpp:1275
+#: ../src/Game.cpp:1277
+msgid "Congratulations"
+msgstr "Glückwunsch"
+
+#: ../src/Game.cpp:1277
+msgid "You have finished the levelpack!"
+msgstr "Du hast diese Levelsammlung abgeschlossen!"
+
+#: ../src/InputManager.cpp:40
+msgid "Up (in menu)"
+msgstr "Rauf (im Menü)"
+
+#: ../src/InputManager.cpp:40
+msgid "Down (in menu)"
+msgstr "Runter (im Menü)"
+
+#: ../src/InputManager.cpp:40
+msgid "Left"
+msgstr "Links"
+
+#: ../src/InputManager.cpp:40
+msgid "Right"
+msgstr "Rechts"
+
+#: ../src/InputManager.cpp:40
+msgid "Jump"
+msgstr "Sprung"
+
+#: ../src/InputManager.cpp:40
+msgid "Action"
+msgstr "Aktion"
+
+#: ../src/InputManager.cpp:40
+msgid "Space (Record)"
+msgstr "Aufzeichnen"
+
+#: ../src/InputManager.cpp:41
+msgid "Escape"
+msgstr "Zurück/Beenden"
+
+#: ../src/InputManager.cpp:41
+msgid "Tab (View shadow/Level prop.)"
+msgstr "Tab (Schatten ansehen/Leveleinstellungen)"
+
+#: ../src/InputManager.cpp:41
+msgid "Save game (in editor)"
+msgstr "Spiel speichern (im Editor)"
+
+#: ../src/InputManager.cpp:41
+msgid "Load game"
+msgstr "Spiel laden"
+
+#: ../src/InputManager.cpp:41
+msgid "Swap (in editor)"
+msgstr "Vertauschen (im Editor)"
+
+#: ../src/InputManager.cpp:42
+msgid "Teleport (in editor)"
+msgstr "Teleportieren (im Editor)"
+
+#: ../src/InputManager.cpp:42
+msgid "Suicide (in editor)"
+msgstr "Selbstmord (im Editor)"
+
+#: ../src/InputManager.cpp:42
+msgid "Shift (in editor)"
+msgstr "Laufband (im Editor)"
+
+#: ../src/InputManager.cpp:42
+msgid "Next block type (in Editor)"
+msgstr "Nächster Blocktyp (im Editor)"
+
+#: ../src/InputManager.cpp:43
+msgid "Previous block type (in editor)"
+msgstr "Vorheriger Blocktyp (im Editor)"
+
+#: ../src/InputManager.cpp:43
+msgid "Select (in menu)"
+msgstr "Auswählen (im Menü)"
+
+#: ../src/InputManager.cpp:163
+#: ../src/TitleMenu.cpp:430
+msgid "Config Keys"
+msgstr "Tastenbelegung konfigurieren"
+
+#: ../src/InputManager.cpp:166
+msgid "Select an item and press a key to config it."
+msgstr "Wähle einen Eintrag und drück eine Taste zum konfigurieren."
+
+#: ../src/InputManager.cpp:179
+msgid "Primary key"
+msgstr "Haupttaste"
+
+#: ../src/InputManager.cpp:180
+msgid "Alternative key"
+msgstr "Alternative Taste"
+
+#: ../src/InputManager.cpp:186
+msgid "Unset the key"
+msgstr "Tastenbelegung löschen"
+
+#: ../src/InputManager.cpp:300
+msgid "(Not set)"
+msgstr "(nicht gesetzt)"
+
+#: ../src/LevelEditor.cpp:121
+msgid "Toolbox"
+msgstr "Werkzeugkasten"
+
+#: ../src/LevelEditor.cpp:180
+msgid "Block"
+msgstr "Block"
+
+#: ../src/LevelEditor.cpp:180
+msgid "Player Start"
+msgstr "Spieler-Startpunkt"
+
+#: ../src/LevelEditor.cpp:180
+msgid "Shadow Start"
+msgstr "Shatten-Startpunkt"
+
+#: ../src/LevelEditor.cpp:181
+msgid "Exit"
+msgstr "Ausgang"
+
+#: ../src/LevelEditor.cpp:181
+msgid "Shadow Block"
+msgstr "Schattenblock"
+
+#: ../src/LevelEditor.cpp:181
+msgid "Spikes"
+msgstr "Stacheln"
+
+#: ../src/LevelEditor.cpp:182
+msgid "Checkpoint"
+msgstr "Kontrollpunkt"
+
+#: ../src/LevelEditor.cpp:182
+#: ../src/LevelEditSelect.cpp:258
+msgid "Swap"
+msgstr "Vertauschen"
+
+#: ../src/LevelEditor.cpp:182
+#: ../src/LevelEditor.cpp:1976
+msgid "Fragile"
+msgstr "Brüchig"
+
+#: ../src/LevelEditor.cpp:183
+msgid "Moving Block"
+msgstr "Bewegender Block"
+
+#: ../src/LevelEditor.cpp:183
+msgid "Moving Shadow Block"
+msgstr "Bewegender Schattenblock"
+
+#: ../src/LevelEditor.cpp:183
+msgid "Moving Spikes"
+msgstr "Bewegende Stacheln"
+
+#: ../src/LevelEditor.cpp:184
+msgid "Teleporter"
+msgstr "Teleporter"
+
+#: ../src/LevelEditor.cpp:184
+#: ../src/LevelEditor.cpp:1884
+msgid "Button"
+msgstr "Taster"
+
+#: ../src/LevelEditor.cpp:184
+#: ../src/LevelEditor.cpp:1886
+msgid "Switch"
+msgstr "Schalter"
+
+#: ../src/LevelEditor.cpp:185
+msgid "Conveyor Belt"
+msgstr "Fließband"
+
+#: ../src/LevelEditor.cpp:185
+msgid "Shadow Conveyor Belt"
+msgstr "Schattenfließband"
+
+#: ../src/LevelEditor.cpp:185
+msgid "Notification Block"
+msgstr "Hinweisblock"
+
+#: ../src/LevelEditor.cpp:185
+msgid "Collectable"
+msgstr "Einsammelbar"
+
+#: ../src/LevelEditor.cpp:529
+msgid "Are you sure you want to quit?"
+msgstr "Bist du sicher, dass du gehen willst?"
+
+#: ../src/LevelEditor.cpp:529
+msgid "Quit prompt"
+msgstr "Beenden-Frage"
+
+#: ../src/LevelEditor.cpp:957
+#: ../src/LevelEditor.cpp:959
+#: ../src/LevelEditor.cpp:2609
+#: ../src/LevelEditor.cpp:2611
+#, c-format
+msgid "Level \"%s\" saved"
+msgstr "Level »%s« gespeichert"
+
+#: ../src/LevelEditor.cpp:957
+#: ../src/LevelEditor.cpp:959
+#: ../src/LevelEditor.cpp:2609
+#: ../src/LevelEditor.cpp:2611
+msgid "Saved"
+msgstr "Gespeichert"
+
+#: ../src/LevelEditor.cpp:972
+#: ../src/LevelEditor.cpp:2732
+msgid "Level settings"
+msgstr "Leveleinstellungen"
+
+#: ../src/LevelEditor.cpp:976
+#: ../src/LevelEditSelect.cpp:154
+msgid "Name:"
+msgstr "Name:"
+
+#: ../src/LevelEditor.cpp:982
+msgid "Theme:"
+msgstr "Thema:"
+
+#: ../src/LevelEditor.cpp:997
+msgid "Target time (s):"
+msgstr "Zielzeit (s):"
+
+#: ../src/LevelEditor.cpp:1008
+msgid "Target recordings:"
+msgstr "Zielaufzeichnungen:"
+
+#: ../src/LevelEditor.cpp:1576
+#: ../src/LevelEditor.cpp:1793
+msgid "Defined"
+msgstr "Definiert"
+
+#: ../src/LevelEditor.cpp:1579
+#: ../src/LevelEditor.cpp:1796
+#: ../src/LevelEditor.cpp:1878
+msgid "None"
+msgstr "Keine"
+
+#: ../src/LevelEditor.cpp:1586
+msgid "Moving block"
+msgstr "Bewegender Block"
+
+#: ../src/LevelEditor.cpp:1589
+msgid "Moving shadow block"
+msgstr "Bewegender Schattenblock"
+
+#: ../src/LevelEditor.cpp:1592
+msgid "Moving spikes"
+msgstr "Bewegende Stacken"
+
+#: ../src/LevelEditor.cpp:1599
+#: ../src/LevelEditor.cpp:1736
+msgid "Enabled"
+msgstr "Aktiviert"
+
+#: ../src/LevelEditor.cpp:1605
+msgid "Loop"
+msgstr "Schleife"
+
+#: ../src/LevelEditor.cpp:1611
+msgid "Path"
+msgstr "Pfad"
+
+#: ../src/LevelEditor.cpp:1671
+msgid "Notification block"
+msgstr "Hinweisblock"
+
+#: ../src/LevelEditor.cpp:1674
+msgid "Enter message here:"
+msgstr "Gib die Nachricht hier ein:"
+
+#: ../src/LevelEditor.cpp:1728
+msgid "Shadow Conveyor belt"
+msgstr "Schattenfließband"
+
+#: ../src/LevelEditor.cpp:1730
+msgid "Conveyor belt"
+msgstr "Fließband"
+
+#: ../src/LevelEditor.cpp:1742
+msgid "Enter speed here:"
+msgstr "Gib die Geschwindigkeit hier ein:"
+
+#: ../src/LevelEditor.cpp:1800
+msgid "Portal"
+msgstr "Portal"
+
+#: ../src/LevelEditor.cpp:1803
+msgid "Activate on touch"
+msgstr "Bei Berührung aktivieren"
+
+#: ../src/LevelEditor.cpp:1809
+#: ../src/LevelEditor.cpp:1914
+msgid "Targets:"
+msgstr "Ziele:"
+
+#: ../src/LevelEditor.cpp:1875
+#, c-format
+msgid "%d Defined"
+msgstr "%d definiert"
+
+#: ../src/LevelEditor.cpp:1891
+msgid "Behaviour:"
+msgstr "Verhalten:"
+
+#: ../src/LevelEditor.cpp:1897
+msgid "On"
+msgstr "Ein"
+
+#: ../src/LevelEditor.cpp:1898
+msgid "Off"
+msgstr "Aus"
+
+#: ../src/LevelEditor.cpp:1899
+msgid "Toggle"
+msgstr "Umschalten"
+
+#: ../src/LevelEditor.cpp:1979
+msgid "State:"
+msgstr "Status:"
+
+#: ../src/LevelEditor.cpp:1985
+msgid "Complete"
+msgstr "Vollständig"
+
+#: ../src/LevelEditor.cpp:1986
+msgid "One step"
+msgstr "Eine Stufe"
+
+#: ../src/LevelEditor.cpp:1987
+msgid "Two steps"
+msgstr "Zwei Stufen"
+
+#: ../src/LevelEditor.cpp:1988
+msgid "Gone"
+msgstr "Fort"
+
+#: ../src/LevelEditor.cpp:2717
+msgid "Select"
+msgstr "Auswählen"
+
+#: ../src/LevelEditor.cpp:2720
+msgid "Add"
+msgstr "Hinzufügen"
+
+#: ../src/LevelEditor.cpp:2723
+msgid "Delete"
+msgstr "Löschen"
+
+#: ../src/LevelEditor.cpp:2726
+msgid "Configure"
+msgstr "Konfigurieren"
+
+#: ../src/LevelEditor.cpp:2729
+#: ../src/LevelPlaySelect.cpp:65
+#: ../src/TitleMenu.cpp:47
+msgid "Play"
+msgstr "Spielen"
+
+#: ../src/LevelEditor.cpp:2735
+msgid "Save level"
+msgstr "Level speichern"
+
+#: ../src/LevelEditor.cpp:2738
+msgid "Back to menu"
+msgstr "Zurück zum Menü"
+
+#: ../src/LevelEditor.cpp:2784
+#, c-format
+msgid "Movespeed: %s"
+msgstr "Bewegungsgeschwindigkeit: %s"
+
+#: ../src/LevelEditSelect.cpp:41
+#: ../src/TitleMenu.cpp:49
+msgid "Map Editor"
+msgstr "Karteneditor"
+
+#: ../src/LevelEditSelect.cpp:78
+msgid "New Levelpack"
+msgstr "Neue Levelsammlung"
+
+#: ../src/LevelEditSelect.cpp:83
+msgid "Pack Properties"
+msgstr "Sammlungseinstellungen"
+
+#: ../src/LevelEditSelect.cpp:88
+msgid "Remove Pack"
+msgstr "Sammlung löschen"
+
+#: ../src/LevelEditSelect.cpp:93
+msgid "Move Map"
+msgstr "Karte verschieben"
+
+#: ../src/LevelEditSelect.cpp:99
+msgid "Remove Map"
+msgstr "Karte löschen"
+
+#: ../src/LevelEditSelect.cpp:104
+msgid "Edit Map"
+msgstr "Karte bearbeiten"
+
+#: ../src/LevelEditSelect.cpp:151
+msgid "Properties"
+msgstr "Einstellungen"
+
+#: ../src/LevelEditSelect.cpp:161
+msgid "Description:"
+msgstr "Beschreibung:"
+
+#: ../src/LevelEditSelect.cpp:168
+msgid "Congratulation text:"
+msgstr "Glückwunschtext:"
+
+#: ../src/LevelEditSelect.cpp:203
+#: ../src/LevelEditSelect.cpp:371
+msgid "Add level"
+msgstr "Level hinzufügen"
+
+#: ../src/LevelEditSelect.cpp:206
+msgid "File name:"
+msgstr "Dateiname:"
+
+#: ../src/LevelEditSelect.cpp:243
+msgid "Move level"
+msgstr "Level verschieben"
+
+#: ../src/LevelEditSelect.cpp:246
+msgid "Level: "
+msgstr "Level:"
+
+#: ../src/LevelEditSelect.cpp:256
+msgid "Before"
+msgstr "Davor"
+
+#: ../src/LevelEditSelect.cpp:257
+msgid "After"
+msgstr "Dahinter"
+
+#: ../src/LevelEditSelect.cpp:439
+msgid "Are you sure?"
+msgstr "Bist du dir sicher?"
+
+#: ../src/LevelEditSelect.cpp:439
+msgid "Remove prompt"
+msgstr "Löschabfrage"
+
+#: ../src/LevelEditSelect.cpp:579
+msgid "No file name given for the new level."
+msgstr "Es wurde kein Dateiname für das Level angegeben."
+
+#: ../src/LevelEditSelect.cpp:579
+msgid "Missing file name"
+msgstr "Dateiname fehlt"
+
+#: ../src/LevelEditSelect.cpp:656
+msgid "The entered level number isn't valid!"
+msgstr "Die eingegebene Levelnummer ist ungültig!"
+
+#: ../src/LevelEditSelect.cpp:656
+msgid "Illegal number"
+msgstr "Ungültige Nummer"
+
+#: ../src/LevelPlaySelect.cpp:43
+msgid "Select Level"
+msgstr "Levelauswahl"
+
+#: ../src/LevelPlaySelect.cpp:92
+msgid "Choose a level"
+msgstr "Wähle ein Level"
+
+#: ../src/LevelPlaySelect.cpp:93
+#: ../src/LevelPlaySelect.cpp:231
+#: ../src/LevelPlaySelect.cpp:242
+msgid "Time:"
+msgstr "Zeit:"
+
+#: ../src/LevelPlaySelect.cpp:94
+#: ../src/LevelPlaySelect.cpp:240
+#: ../src/LevelPlaySelect.cpp:243
+msgid "Recordings:"
+msgstr "Aufzeichnungen:"
+
+#: ../src/Main.cpp:56
+#, c-format
+msgid "Usage: %s [OPTIONS] ...\n"
+msgstr "Benutzung: %s [OPTIONEN] … \n"
+
+#: ../src/Main.cpp:57
+msgid "Available options:\n"
+msgstr "Verfügbare Optionen:\n"
+
+#: ../src/Main.cpp:58
+msgid "Specifies the data directory."
+msgstr "Legt das Datenverzeichnis fest."
+
+#: ../src/Main.cpp:59
+msgid "Specifies the user preferences directory."
+msgstr "Legt das Benutzerverzeichnis (für die Einstellungen) fest."
+
+#: ../src/Main.cpp:60
+msgid "Run the game fullscreen."
+msgstr "Das Spiel im Vollbild starten."
+
+#: ../src/Main.cpp:61
+msgid "Run the game windowed."
+msgstr "Das Spiel im Fenster starten."
+
+#: ../src/Main.cpp:62
+msgid "Set the music volume."
+msgstr "Legt die Musiklautstärke fest."
+
+#: ../src/Main.cpp:63
+msgid "Set the sound volume."
+msgstr "Legt die Toneffektlautstärke fest."
+
+#: ../src/Main.cpp:64
+msgid "Change a setting to a given value."
+msgstr "Setzt die Einstellungen auf einen gegebenen Wert."
+
+#: ../src/Main.cpp:65
+msgid "Display the version and quit."
+msgstr "Version anzeigen und beenden."
+
+#: ../src/Main.cpp:66
+msgid "Display this help message."
+msgstr "Zeigt diese Hilfemeldung an."
+
+#: ../src/TitleMenu.cpp:48
+msgid "Options"
+msgstr "Optionen"
+
+#: ../src/TitleMenu.cpp:51
+msgid "Quit"
+msgstr "Beenden"
+
+#: ../src/TitleMenu.cpp:109
+msgid "Enable internet in order to install addons."
+msgstr "Erlaube den Internetzugang, um Add-Ons zu installieren."
+
+#: ../src/TitleMenu.cpp:109
+msgid "Internet disabled"
+msgstr "Internetzugang nicht erlaubt"
+
+#: ../src/TitleMenu.cpp:188
+msgid "Settings"
+msgstr "Einstellungen"
+
+#: ../src/TitleMenu.cpp:236
+msgid "Music"
+msgstr "Musik"
+
+#: ../src/TitleMenu.cpp:244
+msgid "Sound"
+msgstr "Toneffekte"
+
+#: ../src/TitleMenu.cpp:252
+msgid "Fullscreen"
+msgstr "Vollbild"
+
+#: ../src/TitleMenu.cpp:257
+msgid "Resolution"
+msgstr "Auflösung"
+
+#: ../src/TitleMenu.cpp:339
+msgid "Language"
+msgstr "Sprache"
+
+# TRANSLATORS: as detect user's language automatically
+#: ../src/TitleMenu.cpp:348
+msgid "Auto-Detect"
+msgstr "automatisch erkennen"
+
+#: ../src/TitleMenu.cpp:376
+msgid "Theme"
+msgstr "Thema"
+
+#: ../src/TitleMenu.cpp:409
+msgid "Level themes"
+msgstr "Levelthemen"
+
+#: ../src/TitleMenu.cpp:414
+msgid "Internet"
+msgstr "Internet"
+
+#: ../src/TitleMenu.cpp:420
+msgid "Internet proxy"
+msgstr "Internet-Proxy"
+
+# TRANSLATORS: Used for button which clear any level progress like unlocked levels and highscores.
+#: ../src/TitleMenu.cpp:437
+msgid "Clear Progress"
+msgstr "Fortschritt löschen"
+
+#: ../src/TitleMenu.cpp:447
+msgid "Save Changes"
+msgstr "Änderungen speichern"
+
+#: ../src/TitleMenu.cpp:546
+msgid "Do you really want to reset level progress?"
+msgstr "Willst du wirklich den Levelfortschritt zurücksetzen?"
+
+#: ../src/TitleMenu.cpp:546
+msgid "Warning"
+msgstr "Warnung"
+
+# TRANSLATORS: name of a key
+msgid "backspace"
+msgstr "Rücktaste"
+
+# TRANSLATORS: name of a key
+msgid "tab"
+msgstr "Tab"
+
+# TRANSLATORS: name of a key
+msgid "clear"
+msgstr ""
+
+# TRANSLATORS: name of a key
+msgid "return"
+msgstr "Eingabetaste"
+
+# TRANSLATORS: name of a key
+msgid "pause"
+msgstr "Pause"
+
+# TRANSLATORS: name of a key
+msgid "escape"
+msgstr "Escape"
+
+# TRANSLATORS: name of a key
+msgid "space"
+msgstr "Leertaste"
+
+# TRANSLATORS: name of a key
+msgid "delete"
+msgstr "Entfernen"
+
+# TRANSLATORS: name of a key
+msgid "enter"
+msgstr "Eingabetaste (Ziffernblock)"
+
+# TRANSLATORS: name of a key
+msgid "equals"
+msgstr "Gleichheitszeichen"
+
+# TRANSLATORS: name of a key
+msgid "up"
+msgstr "oben"
+
+# TRANSLATORS: name of a key
+msgid "down"
+msgstr "unten"
+
+# TRANSLATORS: name of a key
+msgid "right"
+msgstr "rechts"
+
+# TRANSLATORS: name of a key
+msgid "left"
+msgstr "links"
+
+# TRANSLATORS: name of a key
+msgid "insert"
+msgstr "Einfügen"
+
+# TRANSLATORS: name of a key
+msgid "home"
+msgstr "Pos1"
+
+# TRANSLATORS: name of a key
+msgid "end"
+msgstr "Ende"
+
+# TRANSLATORS: name of a key
+msgid "page up"
+msgstr "Bild auf"
+
+# TRANSLATORS: name of a key
+msgid "page down"
+msgstr "Bild ab"
+
+# TRANSLATORS: name of a key
+msgid "numlock"
+msgstr "Num-Lock"
+
+# TRANSLATORS: name of a key
+msgid "caps lock"
+msgstr "Feststelltaste"
+
+# TRANSLATORS: name of a key
+msgid "scroll lock"
+msgstr "Rollen"
+
+# TRANSLATORS: name of a key
+msgid "right shift"
+msgstr "Umschalt rechts"
+
+# TRANSLATORS: name of a key
+msgid "left shift"
+msgstr "Umschalt links"
+
+# TRANSLATORS: name of a key
+msgid "right ctrl"
+msgstr "Steuerung rechts"
+
+# TRANSLATORS: name of a key
+msgid "left ctrl"
+msgstr "Steuerung links"
+
+# TRANSLATORS: name of a key
+msgid "right alt"
+msgstr "Alt rechts"
+
+# TRANSLATORS: name of a key
+msgid "left alt"
+msgstr "Alt links"
+
+# TRANSLATORS: name of a key
+msgid "right meta"
+msgstr "Meta rechts"
+
+# TRANSLATORS: name of a key
+msgid "left meta"
+msgstr "Meta links"
+
+# TRANSLATORS: name of a key
+msgid "left super"
+msgstr "Super links"
+
+# TRANSLATORS: name of a key
+msgid "right super"
+msgstr "Super rechts"
+
+# TRANSLATORS: name of a key
+msgid "alt gr"
+msgstr "Alt Gr"
+
+# TRANSLATORS: name of a key
+msgid "compose"
+msgstr ""
+
+# TRANSLATORS: name of a key
+msgid "help"
+msgstr "Hilfe"
+
+# TRANSLATORS: name of a key
+msgid "print screen"
+msgstr "Druck"
+
+# TRANSLATORS: name of a key
+msgid "sys req"
+msgstr "System-Abfrage"
+
+# TRANSLATORS: name of a key
+msgid "break"
+msgstr "Unterbrechen"
+
+# TRANSLATORS: name of a key
+msgid "menu"
+msgstr "Menü"
+
+# TRANSLATORS: name of a key
+msgid "power"
+msgstr ""
+
+# TRANSLATORS: name of a key
+msgid "euro"
+msgstr "Euro"
+
+# TRANSLATORS: name of a key
+msgid "undo"
+msgstr ""
+
diff --git a/data/themes/Cloudscape/Credits b/data/themes/Cloudscape/Credits
deleted file mode 100644
index 5d6da52..0000000
--- a/data/themes/Cloudscape/Credits
+++ /dev/null
@@ -1 +0,0 @@
-collectable.png -- from Supertux Forest, license under GNU GPL. Modified by ctdabomb - http://forum.freegamedev.net/memberlist.php?mode=viewprofile&u=2036 .
diff --git a/data/themes/Cloudscape/License b/data/themes/Cloudscape/License
index 80e6986..cc84679 100644
--- a/data/themes/Cloudscape/License
+++ b/data/themes/Cloudscape/License
@@ -1,2 +1,5 @@
Copyright (c) 2011 by Tedium.
This work is made available under the terms of the Creative Commons Attribution-ShareAlike 3.0 license, http://creativecommons.org/licenses/by-sa/3.0
+
+Except collectable.png
+which is from Supertux Forest, licensed under GNU GPL. Modified by ctdabomb, http://forum.freegamedev.net/memberlist.php?mode=viewprofile&u=2036
diff --git a/docs/Compiling.txt b/docs/Compiling.txt
index 008a170..110c2aa 100644
--- a/docs/Compiling.txt
+++ b/docs/Compiling.txt
@@ -1,32 +1,33 @@
-== Compiling on Linux ==
+Compiling on Linux
+==================
You will need the following packages (and their -dev(el) files) to be installed:
* libSDL
* libSDL_image
* libSDL_ttf
* libSDL_mixer
* libSDL_gfx
* libcurl
* libarchive
* cmake
* C++ compiler (found in packages like g++, gcc-c++, gcc)
The process is simple. Enter a terminal and move to directory containing
MeAndMyShadow. Then just type
cmake .
to generate the Makefile. If everything configured properly you don't see any
errors and then you can start compiling by typing
make
Finally you can run MeAndMyShadow with
./meandmyshadow
To install MeAndMyShadow on your system, run following as root
make install
diff --git a/src/Addons.cpp b/src/Addons.cpp
index 2afb466..497a4ce 100644
--- a/src/Addons.cpp
+++ b/src/Addons.cpp
@@ -1,598 +1,598 @@
/****************************************************************************
** Copyright (C) 2011 Luka Horvat <redreaper132 at gmail.com>
** Copyright (C) 2011 Edward Lii <edward_iii at myway.com>
** Copyright (C) 2011 O. Bahri Gordebak <gordebak at gmail.com>
**
**
** This file may be used under the terms of the GNU General Public
** License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of
** this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
**
****************************************************************************/
#include "Addons.h"
#include "GameState.h"
#include "Functions.h"
#include "FileManager.h"
#include "Globals.h"
#include "Objects.h"
#include "GUIObject.h"
#include "GUIScrollBar.h"
#include "GUIListBox.h"
#include "POASerializer.h"
#include "InputManager.h"
#include <string>
#include <sstream>
#include <iostream>
#include <SDL/SDL_ttf.h>
#include <SDL/SDL.h>
using namespace std;
Addons::Addons(){
//Render the title.
SDL_Color black={0,0,0};
title=TTF_RenderUTF8_Blended(fontTitle,_("Addons"),black);
FILE* addon=fopen((getUserPath(USER_CACHE)+"addons").c_str(),"wb");
action=NONE;
addons=NULL;
//Clear the GUI if any.
if(GUIObjectRoot){
delete GUIObjectRoot;
GUIObjectRoot=NULL;
}
//Try to get(download) the addonsList.
if(getAddonsList(addon)==false) {
//It failed so we show the error message.
GUIObjectRoot=new GUIObject(0,0,SCREEN_WIDTH,SCREEN_HEIGHT);
GUIObject* obj=new GUIObject(90,96,200,32,GUIObjectLabel,_("Unable to initialize addon menu:"));
obj->name="lbl";
GUIObjectRoot->childControls.push_back(obj);
obj=new GUIObject(120,130,200,32,GUIObjectLabel,error.c_str());
obj->name="lbl";
GUIObjectRoot->childControls.push_back(obj);
obj=new GUIObject(90,550,200,32,GUIObjectButton,_("Back"));
obj->name="cmdBack";
obj->eventCallback=this;
GUIObjectRoot->childControls.push_back(obj);
return;
}
//Now create the GUI.
createGUI();
}
Addons::~Addons(){
delete addons;
//Free the title surface.
SDL_FreeSurface(title);
//If the GUIObjectRoot exist delete it.
if(GUIObjectRoot){
delete GUIObjectRoot;
GUIObjectRoot=NULL;
}
}
void Addons::createGUI(){
//Downloaded the addons file now we can create the GUI.
GUIObjectRoot=new GUIObject(0,0,SCREEN_WIDTH,SCREEN_HEIGHT);
//Create list of categories
GUISingleLineListBox *listTabs=new GUISingleLineListBox((SCREEN_WIDTH-360)/2,100,360,36);
listTabs->name="lstTabs";
listTabs->item.push_back(_("Levels"));
listTabs->item.push_back(_("Level Packs"));
listTabs->item.push_back(_("Themes"));
listTabs->value=0;
listTabs->eventCallback=this;
GUIObjectRoot->childControls.push_back(listTabs);
//Create the list for the addons.
//By default levels will be selected.
list=new GUIListBox(SCREEN_WIDTH*0.1,160,SCREEN_WIDTH*0.8,SCREEN_HEIGHT-220);
list->item=addonsToList("levels");
list->name="lstAddons";
list->eventCallback=this;
list->value=-1;
GUIObjectRoot->childControls.push_back(list);
type="levels";
//And the buttons at the bottom of the screen.
GUIObject* obj=new GUIObject(SCREEN_WIDTH*0.3,SCREEN_HEIGHT-50,-1,32,GUIObjectButton,_("Back"),0,true,true,GUIGravityCenter);
obj->name="cmdBack";
obj->eventCallback=this;
GUIObjectRoot->childControls.push_back(obj);
actionButton=new GUIObject(SCREEN_WIDTH*0.7,SCREEN_HEIGHT-50,-1,32,GUIObjectButton,_("Install"),0,false,true,GUIGravityCenter);
actionButton->name="cmdInstall";
actionButton->eventCallback=this;
GUIObjectRoot->childControls.push_back(actionButton);
updateButton=new GUIObject(SCREEN_WIDTH*0.5,SCREEN_HEIGHT-50,-1,32,GUIObjectButton,_("Update"),0,false,false,GUIGravityCenter);
updateButton->name="cmdUpdate";
updateButton->eventCallback=this;
GUIObjectRoot->childControls.push_back(updateButton);
}
bool Addons::getAddonsList(FILE* file){
//First we download the file.
if(downloadFile("http://meandmyshadow.sourceforge.net/game/addons03",file)==false){
error="ERROR: unable to download addons file!";
cerr<<error<<endl;
return false;
}
fclose(file);
//Load the downloaded file.
ifstream addonFile;
addonFile.open((getUserPath(USER_CACHE)+"addons").c_str());
- if(addonFile==false) {
+ if(!addonFile.good()) {
error="ERROR: unable to load addon_list file!";
cerr<<error<<endl;
return false;
}
//Parse the addonsfile.
TreeStorageNode obj;
{
POASerializer objSerializer;
if(!objSerializer.readNode(addonFile,&obj,true)){
error="ERROR: Invalid file format of addons file!";
cerr<<error<<endl;
return false;
}
}
//Also load the installed_addons file.
ifstream iaddonFile;
iaddonFile.open((getUserPath(USER_CONFIG)+"installed_addons").c_str());
if(!iaddonFile) {
//The installed_addons file doesn't exist, so we create it.
ofstream iaddons;
iaddons.open((getUserPath(USER_CONFIG)+"installed_addons").c_str());
iaddons<<" "<<endl;
iaddons.close();
//Also load the installed_addons file.
iaddonFile.open((getUserPath(USER_CONFIG)+"installed_addons").c_str());
if(!iaddonFile) {
error="ERROR: Unable to create the installed_addons file.";
cerr<<error<<endl;
return false;
}
}
//And parse the installed_addons file.
TreeStorageNode obj1;
{
POASerializer objSerializer;
if(!objSerializer.readNode(iaddonFile,&obj1,true)){
error="ERROR: Invalid file format of the installed_addons!";
cerr<<error<<endl;
return false;
}
}
//Fill the vector.
addons = new std::vector<Addon>;
fillAddonList(*addons,obj,obj1);
//Close the files.
iaddonFile.close();
addonFile.close();
return true;
}
void Addons::fillAddonList(std::vector<Addons::Addon> &list, TreeStorageNode &addons, TreeStorageNode &installed_addons){
//Loop through the blocks of the addons file.
//These should contain the types levels, levelpacks, themes.
for(unsigned int i=0;i<addons.subNodes.size();i++){
TreeStorageNode* block=addons.subNodes[i];
if(block==NULL) continue;
string type;
type=block->name;
//Now loop the entries(subNodes) of the block.
for(unsigned int i=0;i<block->subNodes.size();i++){
TreeStorageNode* entry=block->subNodes[i];
if(entry==NULL) continue;
if(entry->name=="entry" && entry->value.size()==1){
//The entry is valid so create a new Addon.
Addon addon = *(new Addon);
addon.type=type;
addon.name=entry->value[0];
addon.file=entry->attributes["file"][0];
if(!entry->attributes["folder"].empty()){
addon.folder=entry->attributes["folder"][0];
}
addon.author=entry->attributes["author"][0];
addon.version=atoi(entry->attributes["version"][0].c_str());
addon.upToDate=false;
addon.installed=false;
//Check if the addon is already installed.
for(unsigned int i=0;i<installed_addons.subNodes.size();i++){
TreeStorageNode* installed=installed_addons.subNodes[i];
if(installed==NULL) continue;
if(installed->name=="entry" && installed->value.size()==3){
if(addon.type.compare(installed->value[0])==0 && addon.name.compare(installed->value[1])==0) {
addon.installed=true;
addon.installedVersion=atoi(installed->value[2].c_str());
if(addon.installedVersion>=addon.version) {
addon.upToDate=true;
}
}
}
}
//Finally put him in the list.
list.push_back(addon);
}
}
}
}
std::vector<std::string> Addons::addonsToList(const std::string &type){
std::vector<std::string> result;
for(unsigned int i=0;i<addons->size();i++) {
//Check if the addon is from the right type.
if((*addons)[i].type==type) {
string entry = (*addons)[i].name + " by " + (*addons)[i].author;
if((*addons)[i].installed) {
if((*addons)[i].upToDate) {
entry += " *";
} else {
entry += " +";
}
}
result.push_back(entry);
}
}
return result;
}
bool Addons::saveInstalledAddons(){
if(!addons) return false;
//Open the file.
ofstream iaddons;
iaddons.open((getUserPath(USER_CONFIG)+"installed_addons").c_str());
if(!iaddons) return false;
//Loop all the levels.
TreeStorageNode installed;
for(unsigned int i=0;i<addons->size();i++) {
//Check if the level is installed or not.
if((*addons)[i].installed) {
TreeStorageNode *entry=new TreeStorageNode;
entry->name="entry";
entry->value.push_back((*addons)[i].type);
entry->value.push_back((*addons)[i].name);
char version[64];
sprintf(version,"%d",(*addons)[i].installedVersion);
entry->value.push_back(version);
installed.subNodes.push_back(entry);
}
}
//And write away the file.
POASerializer objSerializer;
objSerializer.writeNode(&installed,iaddons,true,true);
return true;
}
void Addons::handleEvents(){
//Check if we should quit.
if(event.type==SDL_QUIT){
//Save the installed addons before exiting.
saveInstalledAddons();
setNextState(STATE_EXIT);
}
//Check if escape is pressed, if so return to the main menu.
if(inputMgr.isKeyUpEvent(INPUTMGR_ESCAPE)){
setNextState(STATE_MENU);
}
}
void Addons::logic(){}
void Addons::render(){
//We only need to draw the menu background.
applySurface(0,0,menuBackground,screen,NULL);
//Draw the title.
applySurface((SCREEN_WIDTH-title->w)/2,40,title,screen,NULL);
}
void Addons::resize(){
//Delete the gui (if any).
if(GUIObjectRoot){
delete GUIObjectRoot;
GUIObjectRoot=NULL;
}
//Now create a new one.
createGUI();
}
void Addons::GUIEventCallback_OnEvent(std::string name,GUIObject* obj,int eventType){
if(name=="lstTabs"){
if(obj->value==0){
list->item=addonsToList("levels");
type="levels";
}else if(obj->value==1){
list->item=addonsToList("levelpacks");
type="levelpacks";
}else{
list->item=addonsToList("themes");
type="themes";
}
list->value=0;
GUIEventCallback_OnEvent("lstAddons",list,GUIEventChange);
}else if(name=="lstAddons"){
//Get the addon struct that belongs to it.
Addon *addon=NULL;
if(!list->item.empty()) {
string entry = list->item[list->value];
if(type.compare("levels")==0) {
for(unsigned int i=0;i<addons->size();i++) {
std::string prefix=(*addons)[i].name;
if(!entry.compare(0, prefix.size(), prefix)) {
addon=&(*addons)[i];
}
}
} else if(type.compare("levelpacks")==0) {
for(unsigned int i=0;i<addons->size();i++) {
std::string prefix=(*addons)[i].name;
if(!entry.compare(0, prefix.size(), prefix)) {
addon=&(*addons)[i];
}
}
} else if(type.compare("themes")==0) {
for(unsigned int i=0;i<addons->size();i++) {
std::string prefix=(*addons)[i].name;
if(!entry.compare(0, prefix.size(), prefix)) {
addon=&(*addons)[i];
}
}
}
}
selected=addon;
updateActionButton();
updateUpdateButton();
}else if(name=="cmdBack"){
saveInstalledAddons();
setNextState(STATE_MENU);
}else if(name=="cmdUpdate"){
//First remove the addon and then install it again.
if(type.compare("levels")==0) {
if(downloadFile(selected->file,(getUserPath(USER_DATA)+"/levels/"))!=false){
selected->upToDate=true;
selected->installedVersion=selected->version;
list->item=addonsToList("levels");
updateActionButton();
updateUpdateButton();
}else{
cerr<<"ERROR: Unable to download addon!"<<endl;
msgBox(_("ERROR: Unable to download addon!"),MsgBoxOKOnly,_("ERROR:"));
return;
}
}else if(type.compare("levelpacks")==0) {
if(!removeDirectory((getUserPath(USER_DATA)+"levelpacks/"+selected->folder+"/").c_str())){
cerr<<"ERROR: Unable to remove the directory "<<(getUserPath(USER_DATA)+"levelpacks/"+selected->folder+"/")<<"."<<endl;
return;
}
if(downloadFile(selected->file,(getUserPath(USER_CACHE)+"/tmp/"))!=false){
extractFile(getUserPath(USER_CACHE)+"/tmp/"+fileNameFromPath(selected->file,true),getUserPath(USER_DATA)+"/levelpacks/"+selected->folder+"/");
selected->upToDate=true;
selected->installedVersion=selected->version;
list->item=addonsToList("levelpacks");
updateActionButton();
updateUpdateButton();
}else{
cerr<<"ERROR: Unable to download addon!"<<endl;
msgBox(_("ERROR: Unable to download addon!"),MsgBoxOKOnly,_("ERROR:"));
return;
}
}else if(type.compare("themes")==0) {
if(!removeDirectory((getUserPath(USER_DATA)+"themes/"+selected->folder+"/").c_str())){
cerr<<"ERROR: Unable to remove the directory "<<(getUserPath(USER_DATA)+"themes/"+selected->folder+"/")<<"."<<endl;
return;
}
if(downloadFile(selected->file,(getUserPath(USER_CACHE)+"/tmp/"))!=false){
extractFile((getUserPath(USER_CACHE)+"/tmp/"+fileNameFromPath(selected->file,true)),(getUserPath(USER_DATA)+"/themes/"+selected->folder+"/"));
selected->upToDate=true;
selected->installedVersion=selected->version;
list->item=addonsToList("themes");
updateActionButton();
updateUpdateButton();
}else{
cerr<<"ERROR: Unable to download addon!"<<endl;
msgBox(_("ERROR: Unable to download addon!"),MsgBoxOKOnly,_("ERROR:"));
return;
}
}
}else if(name=="cmdInstall"){
switch(action) {
case NONE:
break;
case INSTALL:
//Download the addon.
if(type.compare("levels")==0) {
if(downloadFile(selected->file,getUserPath(USER_DATA)+"/levels/")!=false){
selected->upToDate=true;
selected->installed=true;
selected->installedVersion=selected->version;
list->item=addonsToList("levels");
updateActionButton();
;
//And add the level to the levels levelpack.
LevelPack* levelsPack=getLevelPackManager()->getLevelPack("Levels");
levelsPack->addLevel(getUserPath(USER_DATA)+"/levels/"+fileNameFromPath(selected->file));
levelsPack->setLocked(levelsPack->getLevelCount()-1);
}else{
cerr<<"ERROR: Unable to download addon!"<<endl;
msgBox(_("ERROR: Unable to download addon!"),MsgBoxOKOnly,_("ERROR:"));
return;
}
}else if(type.compare("levelpacks")==0) {
if(downloadFile(selected->file,getUserPath(USER_CACHE)+"/tmp/")!=false){
extractFile(getUserPath(USER_CACHE)+"/tmp/"+fileNameFromPath(selected->file,true),getUserPath(USER_DATA)+"/levelpacks/"+selected->folder+"/");
selected->upToDate=true;
selected->installed=true;
selected->installedVersion=selected->version;
list->item=addonsToList("levelpacks");
updateActionButton();
updateUpdateButton();
//And add the levelpack to the levelpackManager.
getLevelPackManager()->loadLevelPack(getUserPath(USER_DATA)+"/levelpacks/"+selected->folder);
}else{
cerr<<"ERROR: Unable to download addon!"<<endl;
msgBox(_("ERROR: Unable to download addon!"),MsgBoxOKOnly,_("ERROR:"));
return;
}
}else if(type.compare("themes")==0) {
if(downloadFile(selected->file,getUserPath(USER_CACHE)+"/tmp/")!=false){
extractFile(getUserPath(USER_CACHE)+"/tmp/"+fileNameFromPath(selected->file,true),getUserPath(USER_DATA)+"/themes/"+selected->folder+"/");
selected->upToDate=true;
selected->installed=true;
selected->installedVersion=selected->version;
list->item=addonsToList("themes");
updateActionButton();
updateUpdateButton();
}else{
cerr<<"ERROR: Unable to download addon!"<<endl;
msgBox(_("ERROR: Unable to download addon!"),MsgBoxOKOnly,_("ERROR:"));
return;
}
}
break;
case UNINSTALL:
//Uninstall the addon.
if(type.compare("levels")==0) {
if(remove((getUserPath(USER_DATA)+"levels/"+fileNameFromPath(selected->file)).c_str())){
cerr<<"ERROR: Unable to remove the file "<<(getUserPath(USER_DATA) + "levels/" + fileNameFromPath(selected->file))<<"."<<endl;
return;
}
selected->upToDate=false;
selected->installed=false;
list->item=addonsToList("levels");
updateActionButton();
updateUpdateButton();
//And remove the level from the levels levelpack.
LevelPack* levelsPack=getLevelPackManager()->getLevelPack("Levels");
for(int i=0;i<levelsPack->getLevelCount();i++){
if(levelsPack->getLevelFile(i)==(getUserPath(USER_DATA)+"levels/"+fileNameFromPath(selected->file))){
//Remove the level and break out of the loop.
levelsPack->removeLevel(i);
break;
}
}
}else if(type.compare("levelpacks")==0) {
if(!removeDirectory((getUserPath(USER_DATA)+"levelpacks/"+selected->folder+"/").c_str())){
cerr<<"ERROR: Unable to remove the directory "<<(getUserPath(USER_DATA)+"levelpacks/"+selected->folder+"/")<<"."<<endl;
return;
}
selected->upToDate=false;
selected->installed=false;
list->item=addonsToList("levelpacks");
updateActionButton();
updateUpdateButton();
//And remove the levelpack from the levelpack manager.
getLevelPackManager()->removeLevelPack(selected->folder);
}else if(type.compare("themes")==0) {
if(!removeDirectory((getUserPath(USER_DATA)+"themes/"+selected->folder+"/").c_str())){
cerr<<"ERROR: Unable to remove the directory "<<(getUserPath(USER_DATA)+"themes/"+selected->folder+"/")<<"."<<endl;
return;
}
selected->upToDate=false;
selected->installed=false;
list->item=addonsToList("themes");
updateActionButton();
updateUpdateButton();
}
break;
}
}
}
void Addons::updateUpdateButton(){
//some sanity check
if(selected==NULL){
updateButton->enabled=false;
return;
}
//Check if the selected addon is installed.
if(selected->installed){
//It is installed, but is it uptodate?
if(selected->upToDate){
//The addon is installed and there is no need to show the button.
updateButton->enabled=false;
updateButton->visible=false;
}else{
//Otherwise show the button
updateButton->enabled=true;
updateButton->visible=true;
}
}else{
//The addon isn't installed so we can only install it.
updateButton->enabled=false;
}
}
void Addons::updateActionButton(){
//some sanity check
if(selected==NULL){
actionButton->enabled=false;
action = NONE;
return;
}
//Check if the selected addon is installed.
if(selected->installed){
//It is installed, but is it uptodate?
actionButton->enabled=true;
actionButton->caption=_("Uninstall");
action = UNINSTALL;
}else{
//The addon isn't installed so we can only install it.
actionButton->enabled=true;
actionButton->caption=_("Install");
action = INSTALL;
}
}
diff --git a/src/Settings.cpp b/src/Settings.cpp
index 161ab0a..60153cd 100644
--- a/src/Settings.cpp
+++ b/src/Settings.cpp
@@ -1,239 +1,239 @@
/****************************************************************************
** Copyright (C) 2011 Luka Horvat <redreaper132 at gmail.com>
** Copyright (C) 2011 Edward Lii <edward_iii at myway.com>
** Copyright (C) 2011 O. Bahri Gordebak <gordebak at gmail.com>
**
**
** This file may be used under the terms of the GNU General Public
** License version 3.0 as published by the Free Software Foundation
** and appearing in the file LICENSE.GPL included in the packaging of
** this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
**
****************************************************************************/
#include "Settings.h"
#include <SDL/SDL.h>
#include <string>
#include <stdio.h>
using namespace std;
Settings::Settings(const string fileName): fileName(fileName){
char s[32];
settings["sound"]="128";
settings["music"]="128";
settings["musiclist"]="default";
settings["fullscreen"]="0";
settings["width"]="800";
settings["height"]="600";
settings["resizable"]="1";
#ifdef HARDWARE_ACCELERATION
settings["gl"]="1";
#else
settings["gl"]="0";
#endif
- settings["theme"]="Cloudscape";
+ settings["theme"]="%DATA%/themes/Cloudscape";
settings["leveltheme"]="1";
settings["internet"]="1";
settings["lastlevelpack"]="tutorial";
settings["internet-proxy"]="";
settings["lang"]="";
//Key settings.
sprintf(s,"%d",(int)SDLK_UP);
settings["key_up"]=settings["key_jump"]=s;
sprintf(s,"%d",(int)SDLK_DOWN);
settings["key_down"]=settings["key_action"]=s; //SDLK_DOWN
sprintf(s,"%d",(int)SDLK_LEFT);
settings["key_left"]=s; //SDLK_LEFT
sprintf(s,"%d",(int)SDLK_RIGHT);
settings["key_right"]=s; //SDLK_RIGHT
sprintf(s,"%d",(int)SDLK_SPACE);
settings["key_space"]=s; //SDLK_SPACE
sprintf(s,"%d",(int)SDLK_ESCAPE);
settings["key_escape"]=s; //SDLK_ESCAPE
sprintf(s,"%d",(int)SDLK_r);
settings["key_restart"]=s; //SDLK_r
sprintf(s,"%d",(int)SDLK_TAB);
settings["key_tab"]=s;
sprintf(s,"%d",(int)SDLK_F2);
settings["key_save"]=s; //SDLK_F2
sprintf(s,"%d",(int)SDLK_F3);
settings["key_load"]=s; //SDLK_F3
sprintf(s,"%d",(int)SDLK_F4);
settings["key_swap"]=s; //SDLK_F4
sprintf(s,"%d",(int)SDLK_F5);
settings["key_teleport"]=s; //SDLK_F5
sprintf(s,"%d",(int)SDLK_F12);
settings["key_suicide"]=s;
sprintf(s,"%d",(int)SDLK_RSHIFT);
settings["key_shift"]=s; //SDLK_RSHIFT
sprintf(s,"%d",(int)SDLK_PAGEUP);
settings["key_next"]=s; //SDLK_PAGEUP
sprintf(s,"%d",(int)SDLK_PAGEDOWN);
settings["key_previous"]=s; //SDLK_PAGEDOWN
sprintf(s,"%d",(int)SDLK_RETURN);
settings["key_select"]=s; //SDLK_RETURN
settings["key_up2"]=settings["key_down2"]=settings["key_left2"]=settings["key_right2"]=
settings["key_jump2"]=settings["key_action2"]=
settings["key_space2"]=settings["key_escape2"]=settings["key_restart2"]=settings["key_tab2"]=
settings["key_save2"]=settings["key_load2"]=settings["key_swap2"]=settings["key_teleport2"]=
settings["key_suicide2"]=settings["key_shift2"]=settings["key_next2"]=settings["key_previous2"]=
settings["key_select2"]="0";
}
void Settings::parseFile(){
//We open the settings file.
ifstream file;
file.open(fileName.c_str());
if(!file){
cout<<"Can't find config file!"<<endl;
createFile();
}
//Now we're going to walk throught the file line by line.
string line;
while(getline(file,line)){
string temp = line;
unComment(temp);
if(temp.empty() || empty(temp))
continue;
//The line is good so we parse it.
parseLine(temp);
}
//And close the file.
file.close();
}
void Settings::parseLine(const string &line){
if((line.find('=') == line.npos) || !validLine(line))
cout<<"Warning illegal line in config file!"<<endl;
string temp = line;
temp.erase(0, temp.find_first_not_of("\t "));
int seperator = temp.find('=');
//Get the key and trim it.
string key, value;
key = line.substr(0, seperator);
if(key.find('\t')!=line.npos || key.find(' ')!=line.npos)
key.erase(key.find_first_of("\t "));
//Get the value and trim it.
value = line.substr(seperator + 1);
value.erase(0, value.find_first_not_of("\t "));
value.erase(value.find_last_not_of("\t ") + 1);
//Add the setting to the settings map.
setValue(key,value);
}
bool Settings::validLine(const string &line){
string temp = line;
temp.erase(0, temp.find_first_not_of("\t "));
if(temp[0] == '=')
return false;
for(size_t i = temp.find('=') + 1; i < temp.length(); i++)
return true;
return false;
}
void Settings::unComment(string &line){
if (line.find('#') != line.npos)
line.erase(line.find('#'));
}
bool Settings::empty(const string &line){
return (line.find_first_not_of(' ')==line.npos);
}
string Settings::getValue(const string &key){
if(settings.find(key) == settings.end()){
cout<<"Key "<<key<<" couldn't be found!"<<endl;
return "";
}
return settings[key];
}
bool Settings::getBoolValue(const string &key){
if(settings.find(key) == settings.end()){
cout<<"Key "<<key<<" couldn't be found!"<<endl;
return false;
}
return (settings[key] != "0");
}
void Settings::setValue(const string &key, const string &value){
if(settings.find(key) == settings.end()){
cout<<"Key "<<key<<" couldn't be found!"<<endl;
return;
}
settings[key]=value;
}
void Settings::createFile(){
ofstream file;
file.open(fileName.c_str());
//Default Config file.
file<<"#MeAndMyShadow config file. Created on "<<endl;
map<string, string>::iterator iter;
for(iter = settings.begin(); iter != settings.end(); ++iter){
file << iter->first << " = " << iter->second << endl;
}
//And close the file.
file.close();
}
void Settings::save(){
ofstream file;
file.open(fileName.c_str());
//First get the date and time.
time_t rawtime;
struct tm* timedate;
time(&rawtime);
timedate=localtime(&rawtime);
//Now write it to the first line of the config file.
//Note: There's no endl at the end since that's already in asctime(timeinfo).
file<<"#MeAndMyShadow config file. Created on "<<asctime(timedate);
//Loop through the settings and save them.
map<string,string>::const_iterator iter;
for(iter=settings.begin(); iter!=settings.end(); ++iter){
file<<iter->first<<" = "<<iter->second<<endl;
}
file.close();
}

File Metadata

Mime Type
text/x-diff
Expires
Mon, Jun 15, 11:36 PM (2 w, 2 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
70150
Default Alt Text
(52 KB)

Event Timeline