From: Matthias Braun Date: Thu, 2 Dec 2004 00:25:27 +0000 (+0000) Subject: changed worldmap to be stored inside the same directory as the levelsubset, fixed... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=45d21c1c59a58aa557b62d3aa22ba89a975e323c;p=supertux.git changed worldmap to be stored inside the same directory as the levelsubset, fixed badguys writing out their current position instead of their startposition when saving levelfile SVN-Revision: 2235 --- diff --git a/data/levels/bonus1/info b/data/levels/bonus1/info index 316eee70a..1060a140f 100644 --- a/data/levels/bonus1/info +++ b/data/levels/bonus1/info @@ -1,14 +1,5 @@ ;SuperTux-Level-Subset (supertux-level-subset - (title "Bonus World 1 levels") + (title "Bonus World 1") (description "Levels from the Bonus World 1") - (levels "abednego-level1.stl" "abednego-level2.stl" "abednego-level3.stl" - "abednego-level4.stl" "bonus-level1.stl" "bonus-level2.stl" - "bonus-level3.stl" "bonus-level4.stl" "bonus-level5.stl" - "matr1x-level1.stl" "matr1x-level2.stl" "matr1x-level3.stl" - "thompson-level1.stl" "thompson-level2.stl" "torfi-level1.stl" - "torfi-level2.stl" "torfi-level3.stl" "wansti-level1.stl" - "wansti-level2.stl" "wansti-level3.stl" "wansti-level4.stl" - "wansti-level5.stl") - (hide-from-contribs #t) - ) \ No newline at end of file +) diff --git a/data/levels/bonus1/worldmap.stwm b/data/levels/bonus1/worldmap.stwm new file mode 100644 index 000000000..47b682efd --- /dev/null +++ b/data/levels/bonus1/worldmap.stwm @@ -0,0 +1,253 @@ +;; Generated with Flexlay Editor +(supertux-worldmap + (properties + (name "Bonus Island I") + (start_pos_x 35) + (start_pos_y 2)) + (tilemap + (width 70) + (height 50) + (data + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 16 16 16 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 24 25 26 58 24 26 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 30 29 28 59 31 27 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 22 19 19 19 47 30 28 19 23 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 19 19 60 47 60 19 19 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 48 40 43 40 45 40 43 40 39 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 47 19 47 19 47 19 47 19 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 47 19 47 19 47 19 47 19 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 68 19 68 19 68 19 68 19 68 19 17 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 18 18 18 18 18 18 18 18 13 9 9 9 9 9 9 9 9 15 58 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 11 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 22 59 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 15 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 15 60 47 60 17 9 9 9 9 11 12 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 15 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 17 9 9 9 9 14 21 47 20 13 9 9 11 16 22 23 12 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 58 17 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 23 12 9 9 11 16 22 47 23 16 12 9 14 21 20 18 13 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 22 59 23 16 16 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 13 9 9 15 19 19 47 19 19 17 9 9 14 13 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 19 47 19 19 48 40 39 17 9 9 9 11 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 19 37 40 39 23 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 21 19 47 19 19 47 19 47 17 9 9 9 14 13 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 19 47 19 20 13 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 37 40 40 42 19 47 17 9 9 9 9 9 9 15 58 17 9 9 9 9 9 9 9 9 9 11 16 16 16 22 19 19 19 47 19 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 22 19 60 19 19 19 47 17 9 9 9 9 11 16 22 59 23 16 12 9 9 9 9 9 9 9 15 48 40 40 40 40 39 19 37 40 39 23 12 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 22 19 19 19 19 19 19 19 47 17 9 9 9 9 15 19 19 47 19 19 23 12 9 9 9 9 9 9 15 47 19 19 19 19 47 19 19 19 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 15 48 40 40 40 40 40 40 40 42 17 9 9 9 9 14 21 19 37 40 40 39 17 9 9 9 9 9 9 15 47 19 19 19 19 37 40 40 40 42 19 17 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 15 19 17 9 15 47 19 19 19 19 20 21 19 20 13 9 9 9 9 9 14 21 19 19 19 47 17 9 9 9 9 9 9 15 37 40 39 19 19 19 19 19 19 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 15 37 40 39 19 20 13 14 18 13 9 9 9 9 9 9 9 15 19 19 19 47 17 9 9 9 9 9 9 15 19 19 37 40 40 40 40 40 39 19 20 13 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 21 47 20 13 9 9 9 9 9 9 9 9 9 9 9 15 19 48 40 42 23 12 9 9 9 9 9 14 21 19 19 19 20 18 18 21 47 20 13 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 9 9 9 9 14 21 47 19 19 19 17 9 9 9 9 9 9 14 18 18 18 13 9 9 15 47 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 15 47 20 18 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 12 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 14 21 17 9 9 9 9 9 9 9 9 9 9 9 9 14 21 20 13 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 12 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 17 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 15 19 19 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 20 13 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 11 16 12 9 15 58 17 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 17 9 9 9 9 9 9 9 15 19 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 11 22 19 23 12 15 59 23 16 16 12 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 14 21 19 20 13 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 15 19 19 19 23 22 47 48 40 39 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 17 9 9 9 9 9 9 9 9 9 9 9 15 58 17 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 15 19 48 40 40 40 42 47 19 47 17 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 11 22 59 23 16 16 16 16 16 12 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 14 21 47 19 19 60 19 47 19 47 23 12 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 22 19 37 40 40 40 39 19 19 17 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 15 37 40 40 40 40 42 19 47 19 17 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 24 25 25 26 19 19 19 47 19 19 17 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 15 19 19 19 19 24 25 26 47 19 17 9 9 9 9 9 9 9 9 9 9 15 58 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 31 32 32 27 48 40 40 42 19 20 13 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 15 19 19 19 19 30 29 28 47 20 13 9 9 9 9 9 9 9 9 9 9 15 59 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 30 29 29 28 47 19 19 20 18 13 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 14 21 48 40 40 40 40 40 42 17 9 9 9 9 9 9 11 16 16 16 16 22 47 17 9 9 9 9 9 9 9 9 9 11 16 16 12 9 9 9 9 9 14 18 21 19 19 47 19 19 23 12 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 11 16 22 47 19 19 19 19 19 19 17 9 9 9 9 9 9 15 69 40 40 40 40 61 64 63 63 63 63 63 63 63 63 63 62 67 19 23 12 9 9 9 9 9 9 14 21 19 47 19 19 19 23 12 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 15 19 19 37 40 40 40 40 40 39 17 9 9 9 9 9 9 14 18 18 18 18 21 47 17 9 9 9 9 9 9 9 9 9 15 19 19 19 17 9 9 9 9 9 9 9 15 19 37 40 40 39 19 17 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 14 21 19 19 19 19 19 19 19 47 23 12 9 9 9 9 9 9 9 9 9 9 15 47 17 9 9 9 9 9 9 9 9 9 14 18 18 18 13 9 9 9 9 9 9 9 15 19 19 19 19 47 19 17 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 14 18 18 18 18 18 18 21 47 20 13 9 9 9 9 9 9 9 11 16 16 22 47 23 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 21 47 20 13 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 15 19 19 19 37 40 39 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 11 16 12 15 19 19 49 50 51 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 22 20 13 15 60 19 52 53 54 47 60 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 17 9 15 19 19 55 56 57 42 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 13 9 15 19 19 19 19 19 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 18 18 18 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + )) + +(special-tiles + (level (name "bonus-level1.stl") + (x 35) + (y 4)) + (level (name "bonus-level2.stl") + (x 32) + (y 41)) + (level (name "/bonus-level3.stl") + (x 30) + (y 39)) + (level (name "/bonus-level4.stl") + (extro-filelevel "extro-bonus.txt") + (x 32) + (y 46)) + (level (name "bonus-level5.stl") + (x 44) + (y 39)) + (level (name "abednego-level1.stl") + (x 12) + (y 33)) + (level (name "abednego-level2.stl") + (x 15) + (y 35)) + (level (name "abednego-level3.stl") + (x 18) + (y 36)) + (level (name "abednego-level4.stl") + (x 16) + (y 40)) + (level (name "matr1x-level1.stl") + (x 21) + (y 17)) + (level (name "matr1x-level2.stl") + (x 25) + (y 18)) + (level (name "matr1x-level3.stl") + (x 20) + (y 20)) + (level (name "thompson-level1.stl") + (x 35) + (y 20)) + (level (name "thompson-level2.stl") + (x 37) + (y 22)) + (level (name "torfi-level1.stl") + (x 58) + (y 34)) + (level (name "torfi-level2.stl") + (x 57) + (y 38)) + (level (name "torfi-level3.stl") + (x 59) + (y 40)) + (level (name "wansti-level1.stl") + (x 51) + (y 14)) + (level (name "wansti-level2.stl") + (x 53) + (y 16)) + (level (name "wansti-level3.stl") + (x 52) + (y 20)) + (level (name "wansti-level4.stl") + (x 47) + (y 18)) + (level (name "wansti-level5.stl") + (x 50) + (y 22)) + + (special-tile (map-message "You found a secret place!") + (x 33) + (y 39) (passive-message #t) + (apply-to-direction "west-north-south")) + + (special-tile (map-message "Hint: Use igloos to get back here.") + (x 35) + (y 5) (passive-message #t) + (apply-to-direction "north")) + + (special-tile + (x 33) + (y 8) + (map-message "Warp to Matr1x' Sector") + (teleport-to-x 20) + (teleport-to-y 14)) + (special-tile + (x 31) + (y 8) + (map-message "Warp to Thompson's Domain") + (teleport-to-x 34) + (teleport-to-y 18)) + (special-tile + (x 35) + (y 8) + (map-message "Warp to the SuperTux Team Island") + (teleport-to-x 51) + (teleport-to-y 10)) + (special-tile + (x 37) + (y 8) + (map-message "Warp to Abednego's Area") + (teleport-to-x 15) + (teleport-to-y 31)) + (special-tile + (x 39) + (y 8) + (map-message "Warp to Torfi's Territory") + (teleport-to-x 56) + (teleport-to-y 33)) + (special-tile + (x 19) + (y 24) + (map-message "Leave Matrix' Sector") + (teleport-to-x 32) + (teleport-to-y 37)) + (special-tile + (x 35) + (y 26) + (map-message "Leave Thompson's Domain") + (teleport-to-x 35) + (teleport-to-y 2)) + (special-tile + (x 54) + (y 25) + (map-message "Leave SuperTux Team Island") + (teleport-to-x 35) + (teleport-to-y 2)) + (special-tile + (x 18) + (y 43) + (map-message "Leave Abednego's Area") + (teleport-to-x 35) + (teleport-to-y 2)) + (special-tile + (x 60) + (y 43) + (map-message "Leave Torfi's Territory") + (teleport-to-x 35) + (teleport-to-y 2)) + + ;;Back from Castle + (special-tile + (x 27) + (y 39) + (map-message "Warp home") + (teleport-to-x 35) + (teleport-to-y 2)) + + ;;Back from Abednego + (special-tile + (x 15) + (y 31) + (invisible-tile #t) + (teleport-to-x 35) + (teleport-to-y 2)) + + ;; Back from Thompson + (special-tile + (x 34) + (y 18) + (invisible-tile #t) + (teleport-to-x 35) + (teleport-to-y 2)) + + ;; Back from Matr1x + (special-tile + (x 20) + (y 14) + (invisible-tile #t) + (teleport-to-x 35) + (teleport-to-y 2)) + + ;; Back from Wansti + (special-tile + (x 51) + (y 10) + (invisible-tile #t) + (teleport-to-x 35) + (teleport-to-y 2)) + + ;; Back from Torfi + (special-tile + (x 56) + (y 33) + (invisible-tile #t) + (teleport-to-x 35) + (teleport-to-y 2)) + + ) +) + diff --git a/data/levels/world1/worldmap.stwm b/data/levels/world1/worldmap.stwm new file mode 100644 index 000000000..d79b09af4 --- /dev/null +++ b/data/levels/world1/worldmap.stwm @@ -0,0 +1,162 @@ +;; Generated with Flexlay Editor +(supertux-worldmap + (properties + (name "Icyisland") + (name-pt_PT "Ilha Gelada") + (name-de "Eisige Insel") + (name-es "Isla de hielo") + (music "salcon.mod") + (start_pos_x 4) + (start_pos_y 5)) + (tilemap + (width 40) + (height 30) + (data + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 12 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 11 16 12 11 16 16 16 16 12 9 9 9 9 11 16 16 12 9 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 11 16 16 16 22 19 17 15 24 25 25 26 23 16 12 9 9 14 18 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 11 22 58 19 19 20 18 13 15 31 32 32 34 26 19 23 16 12 9 9 9 9 9 9 11 16 16 16 16 12 9 9 9 9 9 9 9 9 + 9 9 15 19 59 19 20 13 9 9 15 31 35 29 29 28 19 19 60 23 16 12 9 9 9 11 22 19 24 25 26 23 12 11 16 16 12 9 9 9 + 9 9 15 19 47 19 17 11 16 16 22 30 28 19 48 40 40 39 19 20 18 13 9 9 11 22 19 19 30 36 34 26 23 22 19 19 23 12 9 9 + 9 9 15 19 47 19 23 22 19 19 19 19 24 26 47 24 26 47 19 23 16 16 16 16 22 48 40 40 39 31 32 34 25 25 25 25 26 17 9 9 + 9 9 15 19 37 39 19 48 40 40 40 39 30 28 47 30 28 37 40 40 40 40 40 40 40 42 19 19 47 30 29 29 29 29 29 36 27 17 9 9 + 9 9 15 19 19 47 19 47 24 25 26 37 40 40 42 24 25 25 26 20 18 18 18 21 24 25 25 26 37 40 40 40 40 40 39 31 27 23 12 9 + 9 9 14 18 21 47 19 47 30 29 28 19 24 25 25 33 35 29 28 17 9 9 9 15 30 29 36 27 19 19 19 19 19 60 47 31 34 26 17 9 + 9 9 9 9 15 37 40 42 19 19 24 25 33 35 29 29 28 20 18 13 9 9 9 14 18 21 31 27 48 40 40 40 40 40 42 30 36 27 17 9 + 9 9 9 9 15 19 19 24 25 25 33 32 35 28 20 18 18 13 9 9 9 9 9 9 9 15 31 27 47 24 25 25 25 26 19 19 30 28 17 9 + 9 9 9 9 14 21 19 31 32 32 32 35 28 20 13 9 9 11 16 12 9 9 9 9 9 15 30 28 47 30 36 32 35 28 20 21 19 20 13 9 + 9 9 11 12 9 14 21 30 29 29 29 28 20 13 9 11 16 22 20 13 9 9 9 9 9 14 21 19 37 39 31 32 27 20 13 14 21 17 9 9 + 9 9 14 13 11 12 14 18 18 18 18 18 13 9 9 14 18 18 13 9 9 9 9 9 9 9 14 21 19 47 30 36 27 17 9 9 14 13 9 9 + 9 9 9 9 14 13 9 9 9 9 11 16 16 16 12 9 9 11 16 12 9 9 9 9 9 9 9 14 21 47 19 31 27 17 9 9 9 9 9 9 + 9 9 9 9 9 11 16 16 16 16 22 24 25 26 23 16 16 22 19 23 16 16 12 9 9 9 9 9 15 47 19 30 28 17 9 9 9 9 9 9 + 9 9 9 11 16 22 49 50 51 24 26 30 36 34 25 26 19 24 25 25 25 26 23 16 16 16 16 16 22 47 20 18 18 13 9 9 9 9 9 9 + 9 9 9 15 24 26 52 53 54 30 28 19 30 29 29 28 19 30 29 29 36 34 25 26 24 26 48 40 40 42 17 9 9 9 9 9 9 9 9 9 + 9 9 9 15 31 27 55 56 57 39 19 48 40 40 39 19 48 40 40 39 30 29 29 28 30 28 47 20 18 18 13 9 9 9 9 9 9 9 9 9 + 9 9 9 15 31 34 25 26 19 47 19 47 24 26 47 19 47 24 26 47 19 24 26 48 40 40 42 23 12 9 9 9 9 11 12 9 9 9 9 9 + 9 9 9 15 30 29 29 28 19 37 40 42 31 27 47 19 47 30 28 47 19 30 28 47 19 19 24 26 17 9 9 9 9 14 13 9 9 9 9 9 + 9 9 9 14 18 18 18 18 21 24 26 19 30 28 47 60 47 19 48 42 24 26 48 42 24 25 33 27 17 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 15 30 28 24 25 26 37 40 42 19 47 19 30 28 47 19 30 29 36 27 17 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 11 12 9 9 9 14 18 21 30 36 34 25 26 19 19 37 40 40 40 42 19 20 21 30 28 17 9 9 11 16 16 12 9 9 9 9 9 + 9 9 9 14 13 9 9 9 9 9 14 21 31 32 32 34 25 25 25 25 26 19 19 20 13 14 18 18 13 9 9 14 21 60 23 12 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 15 30 29 29 29 29 29 29 29 28 19 20 13 11 12 9 9 9 9 9 9 14 18 18 13 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 18 18 18 18 18 18 18 13 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 + )) + + + (special-tiles + (level + (x 4) + (y 6) + (name "level1.stl")) + (level + (x 4) + (y 8) + (name "level2.stl")) + (level + (x 5) + (y 11) + (name "level3.stl")) + (level + (x 7) + (y 11) + (name "level4.stl")) + (level + (x 7) + (y 8) + (name "level5.stl")) + (level + (x 11) + (y 9) + (name "level6.stl")) + (level + (x 14) + (y 9) + (name "level7.stl")) + (level + (x 17) + (y 6) + (name "level8.stl")) + (level + (x 14) + (y 6) + (name "level9.stl")) + (level + (x 21) + (y 8) + (name "level10.stl")) + (level + (x 26) + (y 7) + (name "level11.stl")) + (level + (x 28) + (y 9) + (name "level12.stl")) + (level + (x 31) + (y 9) + (name "level13.stl")) + (level + (x 34) + (y 11) + (name "level14.stl")) + (level + (x 29) + (y 11) + (name "level15.stl")) + (level + (x 28) + (y 13) + (name "level16.stl")) + (level + (x 29) + (y 16) + (name "level17.stl")) + (level + (x 27) + (y 19) + (name "level18.stl")) + (level + (x 23) + (y 22) + (name "level19.stl")) + (level + (x 20) + (y 25) + (name "level20.stl")) + (level + (x 18) + (y 23) + (name "level21.stl")) + (level + (x 19) + (y 20) + (name "level22.stl")) + (level + (x 14) + (y 24) + (name "level23.stl")) + (level + (x 14) + (y 20) + (name "level24.stl")) + (level + (x 10) + (y 22) + (name "level25.stl")) + (level + (x 7) + (y 20) + (extro-filename "extro.txt") + (name "level26.stl") + (quit-worldmap #t)) +; In the future, do this to go to another world: +; (next-worldmap "forest.stwt) + + ) + + +) + diff --git a/data/levels/worldmap/bonusisland1.stwm b/data/levels/worldmap/bonusisland1.stwm deleted file mode 100644 index 9ebecc8d8..000000000 --- a/data/levels/worldmap/bonusisland1.stwm +++ /dev/null @@ -1,253 +0,0 @@ -;; Generated with Flexlay Editor -(supertux-worldmap - (properties - (name "Bonus Island I") - (start_pos_x 35) - (start_pos_y 2)) - (tilemap - (width 70) - (height 50) - (data - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 16 16 16 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 24 25 26 58 24 26 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 30 29 28 59 31 27 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 22 19 19 19 47 30 28 19 23 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 19 19 60 47 60 19 19 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 48 40 43 40 45 40 43 40 39 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 47 19 47 19 47 19 47 19 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 47 19 47 19 47 19 47 19 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 68 19 68 19 68 19 68 19 68 19 17 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 18 18 18 18 18 18 18 18 13 9 9 9 9 9 9 9 9 15 58 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 11 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 22 59 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 15 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 15 60 47 60 17 9 9 9 9 11 12 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 15 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 17 9 9 9 9 14 21 47 20 13 9 9 11 16 22 23 12 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 58 17 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 23 12 9 9 11 16 22 47 23 16 12 9 14 21 20 18 13 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 22 59 23 16 16 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 13 9 9 15 19 19 47 19 19 17 9 9 14 13 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 19 47 19 19 48 40 39 17 9 9 9 11 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 19 37 40 39 23 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 21 19 47 19 19 47 19 47 17 9 9 9 14 13 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 19 47 19 20 13 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 37 40 40 42 19 47 17 9 9 9 9 9 9 15 58 17 9 9 9 9 9 9 9 9 9 11 16 16 16 22 19 19 19 47 19 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 22 19 60 19 19 19 47 17 9 9 9 9 11 16 22 59 23 16 12 9 9 9 9 9 9 9 15 48 40 40 40 40 39 19 37 40 39 23 12 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 22 19 19 19 19 19 19 19 47 17 9 9 9 9 15 19 19 47 19 19 23 12 9 9 9 9 9 9 15 47 19 19 19 19 47 19 19 19 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 15 48 40 40 40 40 40 40 40 42 17 9 9 9 9 14 21 19 37 40 40 39 17 9 9 9 9 9 9 15 47 19 19 19 19 37 40 40 40 42 19 17 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 15 19 17 9 15 47 19 19 19 19 20 21 19 20 13 9 9 9 9 9 14 21 19 19 19 47 17 9 9 9 9 9 9 15 37 40 39 19 19 19 19 19 19 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 15 37 40 39 19 20 13 14 18 13 9 9 9 9 9 9 9 15 19 19 19 47 17 9 9 9 9 9 9 15 19 19 37 40 40 40 40 40 39 19 20 13 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 21 47 20 13 9 9 9 9 9 9 9 9 9 9 9 15 19 48 40 42 23 12 9 9 9 9 9 14 21 19 19 19 20 18 18 21 47 20 13 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 9 9 9 9 14 21 47 19 19 19 17 9 9 9 9 9 9 14 18 18 18 13 9 9 15 47 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 15 47 20 18 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 12 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 14 21 17 9 9 9 9 9 9 9 9 9 9 9 9 14 21 20 13 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 12 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 17 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 15 19 19 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 20 13 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 11 16 12 9 15 58 17 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 17 9 9 9 9 9 9 9 15 19 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 11 22 19 23 12 15 59 23 16 16 12 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 14 21 19 20 13 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 15 19 19 19 23 22 47 48 40 39 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 17 9 9 9 9 9 9 9 9 9 9 9 15 58 17 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 15 19 48 40 40 40 42 47 19 47 17 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 11 22 59 23 16 16 16 16 16 12 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 14 21 47 19 19 60 19 47 19 47 23 12 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 22 19 37 40 40 40 39 19 19 17 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 15 37 40 40 40 40 42 19 47 19 17 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 24 25 25 26 19 19 19 47 19 19 17 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 15 19 19 19 19 24 25 26 47 19 17 9 9 9 9 9 9 9 9 9 9 15 58 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 31 32 32 27 48 40 40 42 19 20 13 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 15 19 19 19 19 30 29 28 47 20 13 9 9 9 9 9 9 9 9 9 9 15 59 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 30 29 29 28 47 19 19 20 18 13 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 14 21 48 40 40 40 40 40 42 17 9 9 9 9 9 9 11 16 16 16 16 22 47 17 9 9 9 9 9 9 9 9 9 11 16 16 12 9 9 9 9 9 14 18 21 19 19 47 19 19 23 12 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 11 16 22 47 19 19 19 19 19 19 17 9 9 9 9 9 9 15 69 40 40 40 40 61 64 63 63 63 63 63 63 63 63 63 62 67 19 23 12 9 9 9 9 9 9 14 21 19 47 19 19 19 23 12 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 15 19 19 37 40 40 40 40 40 39 17 9 9 9 9 9 9 14 18 18 18 18 21 47 17 9 9 9 9 9 9 9 9 9 15 19 19 19 17 9 9 9 9 9 9 9 15 19 37 40 40 39 19 17 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 14 21 19 19 19 19 19 19 19 47 23 12 9 9 9 9 9 9 9 9 9 9 15 47 17 9 9 9 9 9 9 9 9 9 14 18 18 18 13 9 9 9 9 9 9 9 15 19 19 19 19 47 19 17 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 14 18 18 18 18 18 18 21 47 20 13 9 9 9 9 9 9 9 11 16 16 22 47 23 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 21 47 20 13 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 15 19 19 19 37 40 39 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 11 16 12 15 19 19 49 50 51 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 22 20 13 15 60 19 52 53 54 47 60 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 17 9 15 19 19 55 56 57 42 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 13 9 15 19 19 19 19 19 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 18 18 18 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - )) - -(special-tiles - (level (name "bonus1/bonus-level1.stl") - (x 35) - (y 4)) - (level (name "bonus1/bonus-level2.stl") - (x 32) - (y 41)) - (level (name "bonus1/bonus-level3.stl") - (x 30) - (y 39)) - (level (name "bonus1/bonus-level4.stl") - (extro-filelevel "extro-bonus.txt") - (x 32) - (y 46)) - (level (name "bonus1/bonus-level5.stl") - (x 44) - (y 39)) - (level (name "bonus1/abednego-level1.stl") - (x 12) - (y 33)) - (level (name "bonus1/abednego-level2.stl") - (x 15) - (y 35)) - (level (name "bonus1/abednego-level3.stl") - (x 18) - (y 36)) - (level (name "bonus1/abednego-level4.stl") - (x 16) - (y 40)) - (level (name "bonus1/matr1x-level1.stl") - (x 21) - (y 17)) - (level (name "bonus1/matr1x-level2.stl") - (x 25) - (y 18)) - (level (name "bonus1/matr1x-level3.stl") - (x 20) - (y 20)) - (level (name "bonus1/thompson-level1.stl") - (x 35) - (y 20)) - (level (name "bonus1/thompson-level2.stl") - (x 37) - (y 22)) - (level (name "bonus1/torfi-level1.stl") - (x 58) - (y 34)) - (level (name "bonus1/torfi-level2.stl") - (x 57) - (y 38)) - (level (name "bonus1/torfi-level3.stl") - (x 59) - (y 40)) - (level (name "bonus1/wansti-level1.stl") - (x 51) - (y 14)) - (level (name "bonus1/wansti-level2.stl") - (x 53) - (y 16)) - (level (name "bonus1/wansti-level3.stl") - (x 52) - (y 20)) - (level (name "bonus1/wansti-level4.stl") - (x 47) - (y 18)) - (level (name "bonus1/wansti-level5.stl") - (x 50) - (y 22)) - - (special-tile (map-message "You found a secret place!") - (x 33) - (y 39) (passive-message #t) - (apply-to-direction "west-north-south")) - - (special-tile (map-message "Hint: Use igloos to get back here.") - (x 35) - (y 5) (passive-message #t) - (apply-to-direction "north")) - - (special-tile - (x 33) - (y 8) - (map-message "Warp to Matr1x' Sector") - (teleport-to-x 20) - (teleport-to-y 14)) - (special-tile - (x 31) - (y 8) - (map-message "Warp to Thompson's Domain") - (teleport-to-x 34) - (teleport-to-y 18)) - (special-tile - (x 35) - (y 8) - (map-message "Warp to the SuperTux Team Island") - (teleport-to-x 51) - (teleport-to-y 10)) - (special-tile - (x 37) - (y 8) - (map-message "Warp to Abednego's Area") - (teleport-to-x 15) - (teleport-to-y 31)) - (special-tile - (x 39) - (y 8) - (map-message "Warp to Torfi's Territory") - (teleport-to-x 56) - (teleport-to-y 33)) - (special-tile - (x 19) - (y 24) - (map-message "Leave Matrix' Sector") - (teleport-to-x 32) - (teleport-to-y 37)) - (special-tile - (x 35) - (y 26) - (map-message "Leave Thompson's Domain") - (teleport-to-x 35) - (teleport-to-y 2)) - (special-tile - (x 54) - (y 25) - (map-message "Leave SuperTux Team Island") - (teleport-to-x 35) - (teleport-to-y 2)) - (special-tile - (x 18) - (y 43) - (map-message "Leave Abednego's Area") - (teleport-to-x 35) - (teleport-to-y 2)) - (special-tile - (x 60) - (y 43) - (map-message "Leave Torfi's Territory") - (teleport-to-x 35) - (teleport-to-y 2)) - - ;;Back from Castle - (special-tile - (x 27) - (y 39) - (map-message "Warp home") - (teleport-to-x 35) - (teleport-to-y 2)) - - ;;Back from Abednego - (special-tile - (x 15) - (y 31) - (invisible-tile #t) - (teleport-to-x 35) - (teleport-to-y 2)) - - ;; Back from Thompson - (special-tile - (x 34) - (y 18) - (invisible-tile #t) - (teleport-to-x 35) - (teleport-to-y 2)) - - ;; Back from Matr1x - (special-tile - (x 20) - (y 14) - (invisible-tile #t) - (teleport-to-x 35) - (teleport-to-y 2)) - - ;; Back from Wansti - (special-tile - (x 51) - (y 10) - (invisible-tile #t) - (teleport-to-x 35) - (teleport-to-y 2)) - - ;; Back from Torfi - (special-tile - (x 56) - (y 33) - (invisible-tile #t) - (teleport-to-x 35) - (teleport-to-y 2)) - - ) -) - diff --git a/data/levels/worldmap/icyisland.stwm b/data/levels/worldmap/icyisland.stwm deleted file mode 100644 index 6051289e2..000000000 --- a/data/levels/worldmap/icyisland.stwm +++ /dev/null @@ -1,162 +0,0 @@ -;; Generated with Flexlay Editor -(supertux-worldmap - (properties - (name "Icyisland") - (name-pt_PT "Ilha Gelada") - (name-de "Eisige Insel") - (name-es "Isla de hielo") - (music "salcon.mod") - (start_pos_x 4) - (start_pos_y 5)) - (tilemap - (width 40) - (height 30) - (data - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 12 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 11 16 12 11 16 16 16 16 12 9 9 9 9 11 16 16 12 9 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 11 16 16 16 22 19 17 15 24 25 25 26 23 16 12 9 9 14 18 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 11 22 58 19 19 20 18 13 15 31 32 32 34 26 19 23 16 12 9 9 9 9 9 9 11 16 16 16 16 12 9 9 9 9 9 9 9 9 - 9 9 15 19 59 19 20 13 9 9 15 31 35 29 29 28 19 19 60 23 16 12 9 9 9 11 22 19 24 25 26 23 12 11 16 16 12 9 9 9 - 9 9 15 19 47 19 17 11 16 16 22 30 28 19 48 40 40 39 19 20 18 13 9 9 11 22 19 19 30 36 34 26 23 22 19 19 23 12 9 9 - 9 9 15 19 47 19 23 22 19 19 19 19 24 26 47 24 26 47 19 23 16 16 16 16 22 48 40 40 39 31 32 34 25 25 25 25 26 17 9 9 - 9 9 15 19 37 39 19 48 40 40 40 39 30 28 47 30 28 37 40 40 40 40 40 40 40 42 19 19 47 30 29 29 29 29 29 36 27 17 9 9 - 9 9 15 19 19 47 19 47 24 25 26 37 40 40 42 24 25 25 26 20 18 18 18 21 24 25 25 26 37 40 40 40 40 40 39 31 27 23 12 9 - 9 9 14 18 21 47 19 47 30 29 28 19 24 25 25 33 35 29 28 17 9 9 9 15 30 29 36 27 19 19 19 19 19 60 47 31 34 26 17 9 - 9 9 9 9 15 37 40 42 19 19 24 25 33 35 29 29 28 20 18 13 9 9 9 14 18 21 31 27 48 40 40 40 40 40 42 30 36 27 17 9 - 9 9 9 9 15 19 19 24 25 25 33 32 35 28 20 18 18 13 9 9 9 9 9 9 9 15 31 27 47 24 25 25 25 26 19 19 30 28 17 9 - 9 9 9 9 14 21 19 31 32 32 32 35 28 20 13 9 9 11 16 12 9 9 9 9 9 15 30 28 47 30 36 32 35 28 20 21 19 20 13 9 - 9 9 11 12 9 14 21 30 29 29 29 28 20 13 9 11 16 22 20 13 9 9 9 9 9 14 21 19 37 39 31 32 27 20 13 14 21 17 9 9 - 9 9 14 13 11 12 14 18 18 18 18 18 13 9 9 14 18 18 13 9 9 9 9 9 9 9 14 21 19 47 30 36 27 17 9 9 14 13 9 9 - 9 9 9 9 14 13 9 9 9 9 11 16 16 16 12 9 9 11 16 12 9 9 9 9 9 9 9 14 21 47 19 31 27 17 9 9 9 9 9 9 - 9 9 9 9 9 11 16 16 16 16 22 24 25 26 23 16 16 22 19 23 16 16 12 9 9 9 9 9 15 47 19 30 28 17 9 9 9 9 9 9 - 9 9 9 11 16 22 49 50 51 24 26 30 36 34 25 26 19 24 25 25 25 26 23 16 16 16 16 16 22 47 20 18 18 13 9 9 9 9 9 9 - 9 9 9 15 24 26 52 53 54 30 28 19 30 29 29 28 19 30 29 29 36 34 25 26 24 26 48 40 40 42 17 9 9 9 9 9 9 9 9 9 - 9 9 9 15 31 27 55 56 57 39 19 48 40 40 39 19 48 40 40 39 30 29 29 28 30 28 47 20 18 18 13 9 9 9 9 9 9 9 9 9 - 9 9 9 15 31 34 25 26 19 47 19 47 24 26 47 19 47 24 26 47 19 24 26 48 40 40 42 23 12 9 9 9 9 11 12 9 9 9 9 9 - 9 9 9 15 30 29 29 28 19 37 40 42 31 27 47 19 47 30 28 47 19 30 28 47 19 19 24 26 17 9 9 9 9 14 13 9 9 9 9 9 - 9 9 9 14 18 18 18 18 21 24 26 19 30 28 47 60 47 19 48 42 24 26 48 42 24 25 33 27 17 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 15 30 28 24 25 26 37 40 42 19 47 19 30 28 47 19 30 29 36 27 17 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 11 12 9 9 9 14 18 21 30 36 34 25 26 19 19 37 40 40 40 42 19 20 21 30 28 17 9 9 11 16 16 12 9 9 9 9 9 - 9 9 9 14 13 9 9 9 9 9 14 21 31 32 32 34 25 25 25 25 26 19 19 20 13 14 18 18 13 9 9 14 21 60 23 12 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 15 30 29 29 29 29 29 29 29 28 19 20 13 11 12 9 9 9 9 9 9 14 18 18 13 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 18 18 18 18 18 18 18 13 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 - )) - - - (special-tiles - (level - (x 4) - (y 6) - (name "world1/level1.stl")) - (level - (x 4) - (y 8) - (name "world1/level2.stl")) - (level - (x 5) - (y 11) - (name "world1/level3.stl")) - (level - (x 7) - (y 11) - (name "world1/level4.stl")) - (level - (x 7) - (y 8) - (name "world1/level5.stl")) - (level - (x 11) - (y 9) - (name "world1/level6.stl")) - (level - (x 14) - (y 9) - (name "world1/level7.stl")) - (level - (x 17) - (y 6) - (name "world1/level8.stl")) - (level - (x 14) - (y 6) - (name "world1/level9.stl")) - (level - (x 21) - (y 8) - (name "world1/level10.stl")) - (level - (x 26) - (y 7) - (name "world1/level11.stl")) - (level - (x 28) - (y 9) - (name "world1/level12.stl")) - (level - (x 31) - (y 9) - (name "world1/level13.stl")) - (level - (x 34) - (y 11) - (name "world1/level14.stl")) - (level - (x 29) - (y 11) - (name "world1/level15.stl")) - (level - (x 28) - (y 13) - (name "world1/level16.stl")) - (level - (x 29) - (y 16) - (name "world1/level17.stl")) - (level - (x 27) - (y 19) - (name "world1/level18.stl")) - (level - (x 23) - (y 22) - (name "world1/level19.stl")) - (level - (x 20) - (y 25) - (name "world1/level20.stl")) - (level - (x 18) - (y 23) - (name "world1/level21.stl")) - (level - (x 19) - (y 20) - (name "world1/level22.stl")) - (level - (x 14) - (y 24) - (name "world1/level23.stl")) - (level - (x 14) - (y 20) - (name "world1/level24.stl")) - (level - (x 10) - (y 22) - (name "world1/level25.stl")) - (level - (x 7) - (y 20) - (extro-filename "extro.txt") - (name "world1/level26.stl") - (quit-worldmap #t)) -; In the future, do this to go to another world: -; (next-worldmap "forest.stwt) - - ) - - -) - diff --git a/lib/app/setup.cpp b/lib/app/setup.cpp index 0a29dc4b9..d8c10af4c 100644 --- a/lib/app/setup.cpp +++ b/lib/app/setup.cpp @@ -67,7 +67,7 @@ void seticon(void); void usage(char * prog, int ret); /* Does the given file exist and is it accessible? */ -int FileSystem::faccessible(const std::string& filename) +bool FileSystem::faccessible(const std::string& filename) { struct stat filestat; if (stat(filename.c_str(), &filestat) == -1) @@ -84,7 +84,7 @@ int FileSystem::faccessible(const std::string& filename) } /* Can we write to this location? */ -int FileSystem::fwriteable(const std::string& filename) +bool FileSystem::fwriteable(const std::string& filename) { FILE* fi; fi = fopen(filename.c_str(), "wa"); @@ -97,7 +97,7 @@ int FileSystem::fwriteable(const std::string& filename) } /* Makes sure a directory is created in either the SuperTux home directory or the SuperTux base directory.*/ -int FileSystem::fcreatedir(const std::string& relative_dir) +bool FileSystem::fcreatedir(const std::string& relative_dir) { std::string path = st_dir + "/" + relative_dir + "/"; if(mkdir(path.c_str(),0755) != 0) diff --git a/lib/app/setup.h b/lib/app/setup.h index f48a4ab14..a918b4b25 100644 --- a/lib/app/setup.h +++ b/lib/app/setup.h @@ -29,9 +29,9 @@ namespace SuperTux { /// File system utility functions struct FileSystem { - static int faccessible(const std::string& filename); - static int fcreatedir(const std::string& relative_dir); - static int fwriteable(const std::string& filename); + static bool faccessible(const std::string& filename); + static bool fcreatedir(const std::string& relative_dir); + static bool fwriteable(const std::string& filename); static std::set read_directory(const std::string& pathname); static std::set dsubdirs(const std::string& rel_path, const std::string& expected_file); static std::set dfiles(const std::string& rel_path, const std::string& glob, const std::string& exception_str); diff --git a/lib/video/font.cpp b/lib/video/font.cpp index 303193b02..3ae918da2 100644 --- a/lib/video/font.cpp +++ b/lib/video/font.cpp @@ -223,6 +223,8 @@ void SuperTux::display_text_file(const std::string& file, float scroll_speed, if(!text_lisp->get("text", text)) throw std::runtime_error("file doesn't contain a text field"); + if(!text_lisp->get("background", background_file)) + throw std::runtime_error("file doesn't contain a background file"); } catch(std::exception& e) { std::cerr << "Couldn't load file '" << filename << "': " << e.what() << "\n"; diff --git a/src/badguy/bouncing_snowball.cpp b/src/badguy/bouncing_snowball.cpp index 06d70f8f0..912e52375 100644 --- a/src/badguy/bouncing_snowball.cpp +++ b/src/badguy/bouncing_snowball.cpp @@ -29,8 +29,8 @@ BouncingSnowball::write(lisp::Writer& writer) { writer.start_list("bouncingsnowball"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("bouncingsnowball"); } diff --git a/src/badguy/dispenser.cpp b/src/badguy/dispenser.cpp index 5f18cc77b..f3445b3f7 100644 --- a/src/badguy/dispenser.cpp +++ b/src/badguy/dispenser.cpp @@ -22,8 +22,8 @@ Dispenser::write(lisp::Writer& writer) { writer.start_list("dispenser"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.write_float("cycle", cycle); writer.write_string("badguy", badguy); diff --git a/src/badguy/jumpy.cpp b/src/badguy/jumpy.cpp index abc48ab6c..6739a54a7 100644 --- a/src/badguy/jumpy.cpp +++ b/src/badguy/jumpy.cpp @@ -17,8 +17,8 @@ Jumpy::write(lisp::Writer& writer) { writer.start_list("jumpy"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("jumpy"); } diff --git a/src/badguy/mrbomb.cpp b/src/badguy/mrbomb.cpp index 563cd6fdc..215284299 100644 --- a/src/badguy/mrbomb.cpp +++ b/src/badguy/mrbomb.cpp @@ -29,8 +29,8 @@ MrBomb::write(lisp::Writer& writer) { writer.start_list("mrbomb"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("mrbomb"); } diff --git a/src/badguy/mriceblock.cpp b/src/badguy/mriceblock.cpp index 9c5ad78e2..6a76d6908 100644 --- a/src/badguy/mriceblock.cpp +++ b/src/badguy/mriceblock.cpp @@ -33,8 +33,8 @@ MrIceBlock::write(lisp::Writer& writer) { writer.start_list("mriceblock"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("mriceblock"); } diff --git a/src/badguy/nolok_01.cpp b/src/badguy/nolok_01.cpp index ac3a8e170..1a5768fe6 100644 --- a/src/badguy/nolok_01.cpp +++ b/src/badguy/nolok_01.cpp @@ -33,8 +33,8 @@ Nolok_01::write(lisp::Writer& writer) { writer.start_list("nolok01"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("nolok01"); } diff --git a/src/badguy/snowball.cpp b/src/badguy/snowball.cpp index 4efd93874..75f68b450 100644 --- a/src/badguy/snowball.cpp +++ b/src/badguy/snowball.cpp @@ -28,8 +28,8 @@ SnowBall::write(lisp::Writer& writer) { writer.start_list("snowball"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("snowball"); } diff --git a/src/badguy/spiky.cpp b/src/badguy/spiky.cpp index b419740df..49d7e4c57 100644 --- a/src/badguy/spiky.cpp +++ b/src/badguy/spiky.cpp @@ -17,8 +17,8 @@ Spiky::write(lisp::Writer& writer) { writer.start_list("spiky"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("spiky"); } diff --git a/src/gameloop.cpp b/src/gameloop.cpp index de7c3b340..e793a1954 100644 --- a/src/gameloop.cpp +++ b/src/gameloop.cpp @@ -978,7 +978,7 @@ bool process_load_game_menu() WorldMapNS::WorldMap worldmap; - worldmap.set_map_filename("icyisland.stwm"); + worldmap.set_map_filename("/levels/world1/worldmap.stwm"); // Load the game or at least set the savegame_file variable worldmap.loadgame(slotfile); diff --git a/src/level_subset.cpp b/src/level_subset.cpp index 5cd4fc9d1..9d1b246b6 100644 --- a/src/level_subset.cpp +++ b/src/level_subset.cpp @@ -102,6 +102,14 @@ void LevelSubset::load(const std::string& subset) throw new std::runtime_error(msg.str()); } + // test is a worldmap exists + has_worldmap = false; + std::string worldmap = get_resource_filename( + std::string("levels/") + subset + "/worldmap.stwm"); + if(worldmap != "") { + has_worldmap = true; + } + if (levels.empty()) { // Level info file doesn't define any levels, so read the // directory to see what we can find @@ -175,6 +183,12 @@ LevelSubset::get_level_filename(unsigned int num) return levels[num]; } +std::string +LevelSubset::get_worldmap_filename() +{ + return std::string("/levels/" + name + "/worldmap.stwm"); +} + int LevelSubset::get_num_levels() const { diff --git a/src/level_subset.h b/src/level_subset.h index 7ae03e25a..c6ed9a995 100644 --- a/src/level_subset.h +++ b/src/level_subset.h @@ -46,12 +46,14 @@ public: void add_level(const std::string& name); std::string get_level_filename(unsigned int i); + std::string get_worldmap_filename(); int get_num_levels() const; std::string name; std::string title; std::string description; bool hide_from_contribs; + bool has_worldmap; private: void read_info_file(const std::string& info_file); diff --git a/src/title.cpp b/src/title.cpp index 1e5449ef3..fad1e8100 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -75,9 +75,6 @@ static GameSession* titlesession; static std::vector contrib_subsets; static LevelSubset* current_contrib_subset = 0; -static int first_level_index; - -static std::set worldmap_list; static FrameRate frame_rate(100); @@ -126,28 +123,17 @@ void generate_contrib_menu() contrib_menu->additem(MN_LABEL,_("Contrib Levels"),0,0); contrib_menu->additem(MN_HL,"",0,0); + int i = 0; - - for(std::set::iterator it = worldmap_list.begin(); - it != worldmap_list.end(); ++it) { - WorldMapNS::WorldMap worldmap; - worldmap.loadmap((*it).c_str()); - contrib_menu->additem(MN_ACTION, worldmap.get_world_title(),0,0, i); - ++i; - } - - contrib_menu->additem(MN_HL,"",0,0); - - first_level_index = i; - for (std::set::iterator it = level_subsets.begin(); it != level_subsets.end(); ++it) + for (std::set::iterator it = level_subsets.begin(); + it != level_subsets.end(); ++it) { LevelSubset* subset = new LevelSubset(); subset->load(*it); - if(subset->hide_from_contribs) - { + if(subset->hide_from_contribs) { delete subset; continue; - } + } contrib_menu->additem(MN_GOTO, subset->title, 0, contrib_subset_menu, i); contrib_subsets.push_back(subset); ++i; @@ -186,68 +172,52 @@ void check_levels_contrib_menu() if (index == -1) return; - if((unsigned)index < worldmap_list.size()) - { + LevelSubset& subset = * (contrib_subsets[index]); + + if(subset.has_worldmap) { WorldMapNS::WorldMap worldmap; - std::set::iterator it = worldmap_list.begin(); - for(int i = index; i > 0; --i) - ++it; - - std::string map_filename = *it; + worldmap.set_map_filename(subset.get_worldmap_filename()); // some fading fadeout(256); DrawingContext context; - context.draw_text(white_text, "Loading...", - Vector(screen->w/2, screen->h/2), CENTER_ALLIGN, LAYER_FOREGROUND1); - context.do_drawing(); - - worldmap.set_map_filename(map_filename); - - // hack to erase the extension - unsigned int ext_pos = it->find_last_of("."); - if(ext_pos != std::string::npos) - map_filename.erase(ext_pos, map_filename.size() - ext_pos); + context.draw_text(white_text, "Loading...", + Vector(screen->w/2, screen->h/2), CENTER_ALLIGN, LAYER_FOREGROUND1); + context.do_drawing(); // TODO: slots should be available for contrib maps - worldmap.loadgame(st_save_dir + "/" + map_filename + "-slot1.stsg"); + worldmap.loadgame(st_save_dir + "/" + subset.name + "-slot1.stsg"); worldmap.display(); // run the map Menu::set_current(main_menu); resume_demo(); - } - else if (index < (int)contrib_subsets.size() + first_level_index) - { - index -= first_level_index; - if (current_subset != index) - { - current_subset = index; - // FIXME: This shouln't be busy looping - LevelSubset& subset = * (contrib_subsets[index]); - - current_contrib_subset = ⊂ - - contrib_subset_menu->clear(); - - contrib_subset_menu->additem(MN_LABEL, subset.title, 0,0); - contrib_subset_menu->additem(MN_HL,"",0,0); - - for (int i = 0; i < subset.get_num_levels(); ++i) - { - /** get level's title */ - std::string filename = subset.get_level_filename(i); - std::string title = get_level_name(filename); - contrib_subset_menu->additem(MN_ACTION, title, 0, 0, i); - } + } else if (current_subset != index) { + current_subset = index; + // FIXME: This shouln't be busy looping + LevelSubset& subset = * (contrib_subsets[index]); - contrib_subset_menu->additem(MN_HL,"",0,0); - contrib_subset_menu->additem(MN_BACK, _("Back"), 0, 0); + current_contrib_subset = ⊂ - titlesession->get_current_sector()->activate(); - titlesession->set_current(); - } + contrib_subset_menu->clear(); + + contrib_subset_menu->additem(MN_LABEL, subset.title, 0,0); + contrib_subset_menu->additem(MN_HL,"",0,0); + + for (int i = 0; i < subset.get_num_levels(); ++i) + { + /** get level's title */ + std::string filename = subset.get_level_filename(i); + std::string title = get_level_name(filename); + contrib_subset_menu->additem(MN_ACTION, title, 0, 0, i); } + + contrib_subset_menu->additem(MN_HL,"",0,0); + contrib_subset_menu->additem(MN_BACK, _("Back"), 0, 0); + + titlesession->get_current_sector()->activate(); + titlesession->set_current(); + } } void check_contrib_subset_menu() @@ -327,9 +297,6 @@ void title(void) logo = new Surface(datadir + "/images/title/logo.png", true); img_choose_subset = new Surface(datadir + "/images/status/choose-level-subset.png", true); - /* Generating contrib maps by only using a string_list */ - worldmap_list = FileSystem::dfiles("levels/worldmap", "", "icyisland.stwm"); - titlesession->get_current_sector()->activate(); titlesession->set_current(); @@ -474,7 +441,6 @@ void title(void) /* Free surfaces: */ free_contrib_menu(); - worldmap_list.clear(); delete titlesession; delete bkg_title; delete logo; diff --git a/src/worldmap.cpp b/src/worldmap.cpp index 1c4ab3e10..53d8fc28c 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -368,17 +368,22 @@ WorldMap::~WorldMap() void WorldMap::load_map() { + std::string::size_type p = map_filename.find_last_of('/'); + if(p == std::string::npos) + levels_path = ""; + else + levels_path = map_filename.substr(0, p+1); + try { lisp::Parser parser; - std::string filename - = get_resource_filename("/levels/worldmap/" + map_filename); + std::string filename = get_resource_filename(map_filename); std::auto_ptr root (parser.parse(filename)); const lisp::Lisp* lisp = root->get_lisp("supertux-worldmap"); if(!lisp) throw new std::runtime_error("file isn't a supertux-worldmap file."); - lisp::ListIterator iter(lisp->get_cdr()); + lisp::ListIterator iter(lisp); while(iter.next()) { if(iter.item() == "tilemap") { if(tilemap.size() > 0) @@ -498,7 +503,7 @@ WorldMap::get_level_title(Level& level) try { lisp::Parser parser; std::auto_ptr root ( - parser.parse(get_resource_filename("levels/" + level.name))); + parser.parse(get_resource_filename(levels_path + level.name))); const lisp::Lisp* level_lisp = root->get_lisp("supertux-level"); if(!level_lisp) @@ -718,8 +723,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( - get_resource_filename(std::string("levels/" + level->name)), + GameSession session(get_resource_filename(levels_path + level->name), ST_GL_LOAD_LEVEL_FILE, &level->statistics); switch (session.run()) diff --git a/src/worldmap.h b/src/worldmap.h index 80585ea22..0403e2f62 100644 --- a/src/worldmap.h +++ b/src/worldmap.h @@ -185,6 +185,7 @@ public: private: std::string map_filename; + std::string levels_path; typedef std::vector SpecialTiles; SpecialTiles special_tiles;