Cleaned up default courses and fixed crashs highscore handling related to course-groups:

- Moved description ouf courses to .dim files (where the translated descriptions are already)
- Removed course "course" which was unused and is so short that it does not make sense to use it (seems to be an old proof-of-concept)
- Removed obsolete .tcl file
- Fixed crash when loading the highscore from a non-existent course
- Fixed crash when trying to save highscore of non-default courses

git-svn-id: https://svn.code.sf.net/p/extremetuxracer/code/trunk@544 0420edf4-82e4-42fc-9478-35b55e6d67a3
master
pkeus 2016-01-13 16:13:01 +00:00
parent 5660f808a6
commit 12b775197d
33 changed files with 62 additions and 191 deletions

View File

@ -6,4 +6,5 @@
[finish_brake] 15.0
[author] Jasmin Patry
*[name-de_DE]Buckelpiste[desc-de_DE]Dieser Berg hält eine Reihe von Hügeln bereit. Achte auf deine Ausrichtung, bevor Du abhebst.
*[desc] This hill has a series of ramps to tackle. Be sure to line yourself up before getting airborne.
[name-de_DE]Buckelpiste[desc-de_DE]Dieser Berg hält eine Reihe von Hügeln bereit. Achte auf deine Ausrichtung, bevor Du abhebst.

View File

@ -5,4 +5,5 @@
[finish_brake] 15.0
[author] Jasmin Patry
*[desc-de_DE]Fang einfach an und sammle die Heringe im Zeitlimit, mehr nicht. Der schönste Teil ist, dass man keinen Schlepplift benutzen muss.
*[desc] Let's start out easy, just collect the herring in the time limit and you'll be fine. The best part is that you don't have to use those stupid T-bar lifts.
[desc-de_DE]Fang einfach an und sammle die Heringe im Zeitlimit, mehr nicht. Der schönste Teil ist, dass man keinen Schlepplift benutzen muss.

View File

@ -2,4 +2,5 @@
[startx] 50.00 [starty] 3.0 [angle] 28.00 [scale] 20.00
[env] etr
*[desc-de_DE]Ein gefährlicher Weg durch die Berge. Versuch mehr als 60 Heringe zu kriegen - das geht, wirklich!
*[desc] A dangerous path along the mountains. Try to catch more than 60 herrings. It is possible!
[desc-de_DE]Ein gefährlicher Weg durch die Berge. Versuch mehr als 60 Heringe zu kriegen - das geht, wirklich!

View File

@ -5,4 +5,5 @@
[author] Reinhard Niehoff
[url] http://www.erinacom.de
*[name-de_DE]Chinesische Mauer[desc-de_DE]Versuche, auf der Mauer zu bleiben. Wenn Du runterfällst, wirst Du erst eine Rampe finden müssen.
*[desc] Try to keep the top of the wall. In the case of falling down you need to find a ramp to jump back on the wall.
[name-de_DE]Chinesische Mauer[desc-de_DE]Versuche, auf der Mauer zu bleiben. Wenn Du runterfällst, wirst Du erst eine Rampe finden müssen.

View File

@ -1,10 +0,0 @@
tux_course_name "Chinese Wall"
tux_course_author "Reinhard Niehoff <rei.nie@erinacom.de>"
tux_course_dim 100 1500 95 1485
tux_start_pt 50 3.0
tux_angle 30
tux_elev_scale 12
tux_base_height_value 255
tux_elev elev.png
tux_terrain terrain.png
tux_course_init

View File

@ -3,4 +3,5 @@
[startx] 30 [starty] 3.0 [angle] 28 [scale] 20
[author] Chragi
*[desc-de_DE]Der Autor sagt: "Eine fiese Abfahrt. Fies, fies und nochmal fies. Anfänger sollten zu Hause bleiben!"
*[desc] The author says: a wicked course, wicked, wicked and very wicked indeed! Beginners stay home!
[desc-de_DE]Der Autor sagt: "Eine fiese Abfahrt. Fies, fies und nochmal fies. Anfänger sollten zu Hause bleiben!"

View File

@ -1,12 +0,0 @@
pkgdatadir = $(datadir)/$(PACKAGE)/courses/default/course
pkgdata_DATA = \
course.dim \
items.lst \
elev.rgb \
preview.png \
terrain.rgb \
trees.rgb
EXTRA_DIST = $(pkgdata_DATA)

View File

@ -1,7 +0,0 @@
*[width] 80 [length] 400
[play_width] 75 [play_length] 360
[startx] 40 [starty] 3.5 [angle] 27 [scale] 18
[author] Reinhard Niehoff
[url] http://www.erinacom.de

Binary file not shown.

View File

@ -1,83 +0,0 @@
*[name]tree2[x]19[z]10[height]7.7[diam]7.1
*[name]tree2[x]16[z]11[height]4.2[diam]3.4
*[name]tree2[x]12[z]13[height]6.2[diam]4.8
*[name]tree2[x]22[z]13[height]7.1[diam]4.0
*[name]finish[x]18[z]20[height]6.0[diam]9.0
*[name]tree2[x]25[z]23[height]5.9[diam]5.2
*[name]herring[x]19[z]25[height]1.0[diam]1.0
*[name]herring[x]19[z]27[height]1.0[diam]1.0
*[name]herring[x]19[z]31[height]1.0[diam]1.0
*[name]herring[x]21[z]32[height]1.0[diam]1.0
*[name]tree2[x]27[z]32[height]4.7[diam]2.6
*[name]herring[x]23[z]38[height]1.0[diam]1.0
*[name]tree2[x]25[z]41[height]6.5[diam]4.2
*[name]tree_barren2[x]9[z]42[height]4.2[diam]4.2
*[name]tree_barren2[x]19[z]43[height]5.8[diam]4.4
*[name]tree_barren2[x]7[z]45[height]4.6[diam]3.7
*[name]tree_barren2[x]18[z]46[height]5.3[diam]5.1
*[name]herring[x]26[z]47[height]1.0[diam]1.0
*[name]herring[x]13[z]52[height]1.0[diam]1.0
*[name]tree1[x]28[z]52[height]4.2[diam]3.4
*[name]tree3[x]7[z]53[height]4.0[diam]2.8
*[name]herring[x]12[z]54[height]1.0[diam]1.0
*[name]tree3[x]16[z]54[height]4.6[diam]4.3
*[name]tree_barren2[x]21[z]58[height]5.4[diam]5.4
*[name]tree3[x]16[z]59[height]7.6[diam]7.5
*[name]tree3[x]5[z]60[height]6.1[diam]4.5
*[name]tree3[x]16[z]60[height]7.0[diam]5.8
*[name]herring[x]13[z]61[height]1.0[diam]1.0
*[name]herring[x]26[z]61[height]1.0[diam]1.0
*[name]tree3[x]8[z]65[height]7.8[diam]5.8
*[name]herring[x]15[z]75[height]1.0[diam]1.0
*[name]tree3[x]11[z]76[height]7.3[diam]3.8
*[name]herring[x]27[z]76[height]1.0[diam]1.0
*[name]tree1[x]30[z]83[height]4.5[diam]2.5
*[name]tree1[x]28[z]86[height]4.6[diam]3.2
*[name]tree_barren2[x]22[z]87[height]7.0[diam]4.2
*[name]tree1[x]28[z]90[height]5.5[diam]3.3
*[name]tree3[x]17[z]93[height]6.9[diam]5.2
*[name]tree1[x]28[z]93[height]7.3[diam]3.9
*[name]tree3[x]7[z]94[height]5.7[diam]5.4
*[name]herring[x]25[z]95[height]1.0[diam]1.0
*[name]herring[x]13[z]98[height]1.0[diam]1.0
*[name]herring[x]26[z]98[height]1.0[diam]1.0
*[name]tree3[x]7[z]99[height]6.6[diam]4.7
*[name]herring[x]26[z]101[height]1.0[diam]1.0
*[name]tree3[x]16[z]106[height]5.2[diam]4.7
*[name]herring[x]11[z]110[height]1.0[diam]1.0
*[name]tree1[x]30[z]112[height]5.2[diam]4.3
*[name]tree3[x]17[z]113[height]7.2[diam]4.3
*[name]herring[x]12[z]114[height]1.0[diam]1.0
*[name]herring[x]27[z]115[height]1.0[diam]1.0
*[name]tree3[x]8[z]117[height]6.5[diam]4.3
*[name]herring[x]13[z]117[height]1.0[diam]1.0
*[name]herring[x]27[z]118[height]1.0[diam]1.0
*[name]tree1[x]31[z]118[height]6.6[diam]4.5
*[name]herring[x]26[z]123[height]1.0[diam]1.0
*[name]tree_barren2[x]21[z]127[height]8.0[diam]6.4
*[name]tree1[x]26[z]134[height]7.4[diam]6.8
*[name]tree1[x]30[z]138[height]6.6[diam]6.4
*[name]tree3[x]17[z]140[height]7.9[diam]7.1
*[name]tree3[x]7[z]141[height]5.4[diam]4.6
*[name]herring[x]11[z]142[height]1.0[diam]1.0
*[name]herring[x]26[z]143[height]1.0[diam]1.0
*[name]tree1[x]29[z]143[height]4.0[diam]3.5
*[name]tree_barren2[x]22[z]144[height]7.7[diam]6.6
*[name]herring[x]27[z]146[height]1.0[diam]1.0
*[name]tree3[x]8[z]147[height]5.0[diam]4.4
*[name]tree3[x]8[z]150[height]7.1[diam]6.0
*[name]tree1[x]28[z]153[height]6.5[diam]4.6
*[name]tree1[x]30[z]155[height]4.5[diam]4.3
*[name]tree3[x]17[z]157[height]4.9[diam]3.5
*[name]tree_barren2[x]21[z]158[height]6.3[diam]3.2
*[name]tree1[x]29[z]158[height]6.5[diam]3.8
*[name]tree3[x]16[z]162[height]5.5[diam]3.5
*[name]herring[x]28[z]162[height]1.0[diam]1.0
*[name]tree3[x]6[z]166[height]6.2[diam]4.2
*[name]herring[x]12[z]167[height]1.0[diam]1.0
*[name]tree3[x]8[z]173[height]7.5[diam]5.2
*[name]tree_barren2[x]31[z]178[height]4.7[diam]3.6
*[name]herring[x]14[z]183[height]1.0[diam]1.0
*[name]tree3[x]18[z]183[height]8.4[diam]5.1
*[name]tree3[x]22[z]183[height]7.3[diam]5.5
*[name]herring[x]25[z]183[height]1.0[diam]1.0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

View File

@ -1,65 +1,22 @@
*[name] Bunny Hill [dir] bunny_hill
[desc] Let's start out easy, just collect the herring in the time limit and you'll be fine. The best part is that you don't have to use those stupid T-bar lifts.
*[name] Twisty Slope [dir] twisty_slope
[desc] Tight twists make grabbing herring difficult. Hard turns and not too much braking will lead you to victory.
*[name] Bumpy Ride [dir] bumpy_ride
[desc] This hill has a series of ramps to tackle. Be sure to line yourself up before getting airborne.
*[name] Explore The Mountains [dir] explore_mountains
[desc] If you don't reach time and herring try to find another way through the mountains.
*[name] Frozen Lakes [dir] frozen_lakes
[desc] A cold, silent world of rocks and ice. Regard your speed when you cross the lakes.
*[name] Challenge One [dir] challenge_one
[desc] A dangerous path along the mountains. Try to catch more than 60 herrings. It is possible!
*[name] The Downhill Fear [dir] downhill_fear
[desc] Downward the hill, sliding and jumping ...
*[name] In Search Of Vodka [dir] in_search_of_vodka
[desc] A course with a bit of everything; bumpy ice, fast trenches, jumps, tree dodging and more. Hope you enjoy.
*[name] Hippo Run [dir] hippo_run
[desc] The author says: This is a fast course that makes you think. There are three major sections to the course. The first is a twisty ride over hills and ice. The second is up on top, and the third is the fastest part of all.
*[name] Who Says Penguins Can't Fly? [dir] penguins_cant_fly
[desc] A fast and stupid course but lot of people like it.
*[name] Quiet River [dir] quiet_river
[desc]This one is willingly a very fast and technical ride. Keeping the pace and getting all the herrings will be quite tricky (yes, it _is_ possible) and it's easyer to "fall" of the frosen rivver than to come back on it.
*[name] Frozen River [dir] frozen_river
[desc] Keep your speed down to collect herring. If you rush you will hit the finish before you know it.
*[name] Secret Valleys [dir] secret_valleys
[desc]Hidden places, some of them not easy to discover. There are 10 groups of dead trees - try to find them.
*[name] The Chinese Wall [dir] chinese_wall
[desc] Try to keep the top of the wall. In the case of falling down you need to find a ramp to jump back on the wall.
*[name] Wild Mountains [dir] wild_mountains
[desc] Cleft mountains of ice and snow - bizarre and dangerous. If you like climbing you are encouraged to quit the paths. But be careful!
*[name] Keep Your Country Tidy [dir] keep_country_tidy
[desc] A long way to the end of the world.
*[name] In The Search Of the Holy Grail [dir] holygrail
[desc] Your task is to find the grail, and near the grail there are many herrings. Warning, it's extremely difficult to find the right path and the jumping ramps.
*[name] Milos Castle [dir] milos_castle
[desc] The course starts out with raised icy paths that are difficult to stay on. Keep your speed down to get those herring, but speed up to make those jumps. If you're lined up just right, get ready for a jump.
*[name] Path of Daggers [dir] path_of_daggers
[desc] Big spikes may prove to be the least of your worries on this course. Multiple paths allow you to take low or high roads, each with their own challenges.
*[name] This Means Thomething [dir] this_means_something
[desc] One of the most popular courses from Bellyrub webpage
*[name] Tux At Home [dir] tux_at_home
[desc] Ok, you can take the corridor on the right, the fastest and shortest way. But if you want to catch some herrings, you must enter the labyrinth of rooms on the left.
*[name] Chragi's Gagiwaetter [dir] chragis_gagiwaetter
[desc] The author says: a wicked course, wicked, wicked and very wicked indeed! Beginners stay home!
*[name] Chragi's Gagiwaetter [dir] chragis_gagiwaetter

View File

@ -1,5 +1,5 @@
*[width]60.0[length]1800.0[play_width]60.0[play_length]1800.0
[startx]30.00[starty]3.50[angle]24.00[scale]7.00
*[desc-de_DE]Rutschend und fliegend den Berg hinab...
*[desc] Downward the hill, sliding and jumping ...
[desc-de_DE]Rutschend und fliegend den Berg hinab...

View File

@ -6,4 +6,5 @@
[url] http://www.erinacom.de
*[name-de_DE]Erkunde die Berge[desc-de_DE]Wenn Du keine Heringe findest, oder die Zeit nicht reicht: Such einen anderen Weg.
*[desc] If you don't reach time and herring try to find another way through the mountains.
[name-de_DE]Erkunde die Berge[desc-de_DE]Wenn Du keine Heringe findest, oder die Zeit nicht reicht: Such einen anderen Weg.

View File

@ -2,4 +2,5 @@
[startx]50.00[starty]3.00[angle]25.00[scale]12.00
[env]etr
*[name-de_DE]Gefrorene Seen[desc-de_DE]Eine kalte, stille Welt voller Eis und Felsen. Achte auf deine Geschwindigkeit, wenn Du die Seen überquerst.
*[desc] A cold, silent world of rocks and ice. Regard your speed when you cross the lakes.
[name-de_DE]Gefrorene Seen[desc-de_DE]Eine kalte, stille Welt voller Eis und Felsen. Achte auf deine Geschwindigkeit, wenn Du die Seen überquerst.

View File

@ -5,4 +5,5 @@
[finish_brake] 25
[author] Jasmin Patry
*[name-de_DE]Gefrorener Fluss[desc-de_DE]Rutsch langsam, um Heringe zu kriegen. Wenn Du dich beeilst, bist Du schneller unten als Du glaubst.
*[desc] Keep your speed down to collect herring. If you rush you will hit the finish before you know it.
[name-de_DE]Gefrorener Fluss[desc-de_DE]Rutsch langsam, um Heringe zu kriegen. Wenn Du dich beeilst, bist Du schneller unten als Du glaubst.

View File

@ -2,4 +2,5 @@
[startx]16.00[starty]3.50[angle]25.00[scale]13.50
[env]etr
*[desc-de_DE]Eine schnelle Piste, bei der man Nachdenken muss. Es gibt drei Bereiche: Ein verschlungener Weg über Hügel und Eis, ein Pfad oberhalb davon und ein dritter Weg ist der schnellste.
*[desc] The author says: This is a fast course that makes you think. There are three major sections to the course. The first is a twisty ride over hills and ice. The second is up on top, and the third is the fastest part of all.
[desc-de_DE]Eine schnelle Piste, bei der man Nachdenken muss. Es gibt drei Bereiche: Ein verschlungener Weg über Hügel und Eis, ein Pfad oberhalb davon und ein dritter Weg ist der schnellste.

View File

@ -5,4 +5,5 @@
[url] http://www.erinacom.de
[env]etr
*[name-de_DE]Auf der Suche nach dem heiligen Gral[desc-de_DE]Wo der Gral ist, sind auch die Heringe. Doch sei gewarnt: Es wird schwer, die Absprungrampen und den Weg zu finden.
*[desc] Your task is to find the grail, and near the grail there are many herrings. Warning, it's extremely difficult to find the right path and the jumping ramps.
[name-de_DE]Auf der Suche nach dem heiligen Gral[desc-de_DE]Wo der Gral ist, sind auch die Heringe. Doch sei gewarnt: Es wird schwer, die Absprungrampen und den Weg zu finden.

View File

@ -2,4 +2,5 @@
[startx]30.00[starty]3.50[angle]25.00[scale]10.00
[env]etr
*[name-de_DE]Auf der Suche nach Wodka[desc-de_DE]Von allem etwas: hügliges Eis, rasante Täler, Sprünge, Bäume. Hoffentlich gefällt's!
*[desc] A course with a bit of everything; bumpy ice, fast trenches, jumps, tree dodging and more. Hope you enjoy.
[name-de_DE]Auf der Suche nach Wodka[desc-de_DE]Von allem etwas: hügliges Eis, rasante Täler, Sprünge, Bäume. Hoffentlich gefällt's!

View File

@ -4,4 +4,5 @@
[author] Monsterslayer
[url]
*[desc-de_DE]Ein weiter Weg zum Ende der Welt.
*[desc] A long way to the end of the world.
[desc-de_DE]Ein weiter Weg zum Ende der Welt.

View File

@ -3,4 +3,5 @@
[startx] 20 [starty] 5.0 [angle] 23 [scale] 15
[author] Milo Fungus
*[name-de_DE]Milos Burg[desc-de_DE]Der Weg fängt mit schmalen Klippen an. Fahr so langsam wie nötig, um Heringe zu kriegen, und so schnell wie nötig, um die Sprünge zu schaffen. Halte dich bereit zum Absprung.
*[desc] The course starts out with raised icy paths that are difficult to stay on. Keep your speed down to get those herring, but speed up to make those jumps. If you're lined up just right, get ready for a jump.
[name-de_DE]Milos Burg[desc-de_DE]Der Weg fängt mit schmalen Klippen an. Fahr so langsam wie nötig, um Heringe zu kriegen, und so schnell wie nötig, um die Sprünge zu schaffen. Halte dich bereit zum Absprung.

View File

@ -3,4 +3,5 @@
[startx] 45 [starty] 3.0 [angle] 23 [scale] 12
[author] Jasmin Patry
*[desc-de_DE]Die großen Stacheln werden noch Deine geringste Sorge sein. Mehrere Wege führen ins Tal, jeder mit seinen eigenen Herausforderungen.
*[desc] Big spikes may prove to be the least of your worries on this course. Multiple paths allow you to take low or high roads, each with their own challenges.
[desc-de_DE]Die großen Stacheln werden noch Deine geringste Sorge sein. Mehrere Wege führen ins Tal, jeder mit seinen eigenen Herausforderungen.

View File

@ -4,4 +4,5 @@
[author] Bill Scherer
[url] http://bscherer@bestweb.net
*[name-de_DE]Wer sagt, dass Pinguine nicht fliegen können?[desc-de_DE]Eine rasante und eintönige Rampe, aber die Leute mögen es offenbar.
*[desc] A fast and stupid course but lot of people like it.
[name-de_DE]Wer sagt, dass Pinguine nicht fliegen können?[desc-de_DE]Eine rasante und eintönige Rampe, aber die Leute mögen es offenbar.

View File

@ -5,4 +5,5 @@
[url] http://softpaws@mageos.com
[env]etr
*[name-de_DE]Stiller Fluss[desc-de_DE]Eine schnelle und technisch anspruchsvolle Abfahrt. Ruhe bewahren und alle (!) Heringe sammeln wird schwer, und es ist leichter, hinabzufallen als wieder nach oben zu gelangen.
*[desc]This one is willingly a very fast and technical ride. Keeping the pace and getting all the herrings will be quite tricky (yes, it _is_ possible) and it's easyer to "fall" of the frosen rivver than to come back on it.
[name-de_DE]Stiller Fluss[desc-de_DE]Eine schnelle und technisch anspruchsvolle Abfahrt. Ruhe bewahren und alle (!) Heringe sammeln wird schwer, und es ist leichter, hinabzufallen als wieder nach oben zu gelangen.

View File

@ -5,4 +5,5 @@
[url] http://www.erinacom.de
[env] etr
*[name-de_DE]Geheime Täler[desc-de_DE]Versteckte Orte sind schwer zu finden. Es gibt 10 Gruppen von toten Bäumen - finde diese!
*[desc]Hidden places, some of them not easy to discover. There are 10 groups of dead trees - try to find them.
[name-de_DE]Geheime Täler[desc-de_DE]Versteckte Orte sind schwer zu finden. Es gibt 10 Gruppen von toten Bäumen - finde diese!

View File

@ -3,4 +3,5 @@
[startx] 32 [starty] 2.0 [angle] 23 [scale] 36
[author] Milo Fungus
*[desc-de_DE]Eine der beliebtesten Abfahrten der Bellyrub-Webseite
*[desc] One of the most popular courses from Bellyrub webpage
[desc-de_DE]Eine der beliebtesten Abfahrten der Bellyrub-Webseite

View File

@ -4,4 +4,5 @@
[author] Reinhard Niehoff
[url] http//www.erinacom.de
*[name-de_DE]Tux zuhause[desc-de_DE]Klar, Du kannst den Korridor rechts nehmen. Aber wenn Du irgendwas finden willst, musst Du durchs Labyrinth der Räume links.
*[desc] Ok, you can take the corridor on the right, the fastest and shortest way. But if you want to catch some herrings, you must enter the labyrinth of rooms on the left.
[name-de_DE]Tux zuhause[desc-de_DE]Klar, Du kannst den Korridor rechts nehmen. Aber wenn Du irgendwas finden willst, musst Du durchs Labyrinth der Räume links.

View File

@ -5,4 +5,5 @@
[finish_brake] 15.0
[author] Jasmin Patry
*[name-de_DE]Verschlungene Piste[desc-de_DE]Die verschlungenen Wege erschweren das Fangen von Heringen. Scharfe Wenden und wenig Bremsen wird den Sieg bringen.
*[desc] Tight twists make grabbing herring difficult. Hard turns and not too much braking will lead you to victory.
[name-de_DE]Verschlungene Piste[desc-de_DE]Die verschlungenen Wege erschweren das Fangen von Heringen. Scharfe Wenden und wenig Bremsen wird den Sieg bringen.

View File

@ -4,4 +4,5 @@
[author] Reinhard Niehoff
[url] http://www.erinacom.de
*[name-de_DE]Wilde Berge[desc-de_DE]Zerklüftete Berge aus Eis und Schnee - bizarr und gefährlich. Wenn Du gerne kletterst, verlasse die Wege. Aber sei vorsichtig!
*[desc] Cleft mountains of ice and snow - bizarre and dangerous. If you like climbing you are encouraged to quit the paths. But be careful!
[name-de_DE]Wilde Berge[desc-de_DE]Zerklüftete Berge aus Eis und Schnee - bizarr und gefährlich. Wenn Du gerne kletterst, verlasse die Wege. Aber sei vorsichtig!

View File

@ -48,10 +48,12 @@ void TCourse::SetDescription(const std::string& description) {
}
}
void TCourse::SetTranslatedData(const std::string& line2) {
std::string trans_description = SPStrN(line2, "desc-" + Trans.languages[param.language].lang);
std::string description = SPStrN(line2, "desc-" + Trans.languages[param.language].lang);
std::string trans_name = SPStrN(line2, "name-" + Trans.languages[param.language].lang);
if (!trans_description.empty())
SetDescription(trans_description);
if (description.empty()) // No translated description - fallback to default
description = SPStrN(line2, "desc");
if (!description.empty())
SetDescription(description);
if (!trans_name.empty())
name = trans_name;
}
@ -666,7 +668,6 @@ bool CCourseList::Load(const std::string& dir) {
for (CSPList::const_iterator line1 = list.cbegin(); line1 != list.cend(); ++line1, i++) {
courses[i].name = SPStrN(*line1, "name");
courses[i].dir = SPStrN(*line1, "dir", "nodir");
courses[i].SetDescription(SPStrN(*line1, "desc"));
string coursepath = dir + SEP + courses[i].dir;
if (DirExists(coursepath.c_str())) {

View File

@ -89,6 +89,7 @@ const TScoreList *CScore::GetScorelist(size_t list_idx) const {
bool CScore::SaveHighScore() const {
CSPList splist((int)Scorelist.size()*MAX_SCORES);
const CCourseList* courses = &Course.CourseLists["default"]; // TODO: Save Highscore of all groups
for (size_t li=0; li<Scorelist.size(); li++) {
const TScoreList* lst = &Scorelist[li];
if (lst != nullptr) {
@ -96,8 +97,8 @@ bool CScore::SaveHighScore() const {
if (num > 0) {
for (int sc=0; sc<num; sc++) {
const TScore& score = lst->scores[sc];
string line = "*[group] " + Course.currentCourseList->name; // TODO: Save Highscore of all groups
line += " [course] " + (*Course.currentCourseList)[li].dir;
string line = "*[group] " + courses->name;
line += " [course] " + (*courses)[li].dir;
line += " [plyr] " + score.player;
line += " [pts] " + Int_StrN(score.points);
line += " [herr] " + Int_StrN(score.herrings);
@ -128,13 +129,16 @@ bool CScore::LoadHighScore() {
for (CSPList::const_iterator line = list.cbegin(); line != list.cend(); ++line) {
string group = SPStrN(*line, "group", "default");
string course = SPStrN(*line, "course", "unknown");
TCourse* cidx = Course.GetCourse(group, course);
try {
TCourse* cidx = Course.GetCourse(group, course);
AddScore(cidx, TScore(
SPStrN(*line, "plyr", "unknown"),
SPIntN(*line, "pts", 0),
SPIntN(*line, "herr", 0),
SPFloatN(*line, "time", 0)));
AddScore(cidx, TScore(
SPStrN(*line, "plyr", "unknown"),
SPIntN(*line, "pts", 0),
SPIntN(*line, "herr", 0),
SPFloatN(*line, "time", 0)));
} catch (std::exception&)
{ }
}
return true;
}