From 523d415707de9f777729534f467779d4c5acdf6e Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 10 May 2005 11:29:58 +0000 Subject: [PATCH] changed worldmap format a bit to be more consistent with level format SVN-Revision: 2458 --- data/credits.txt | 3 + data/images/sprites.strf | 6 +- data/levels/bonus1/worldmap.stwm | 493 ++++++++++++++--------------- data/levels/world1/worldmap.stwm | 13 +- src/badguy/badguy.cpp | 10 +- src/badguy/badguy.h | 8 +- src/badguy/bomb.cpp | 5 +- src/badguy/bomb.h | 2 +- src/badguy/dispenser.cpp | 2 +- src/badguy/dispenser.h | 2 +- src/badguy/flame.cpp | 2 +- src/badguy/flame.h | 2 +- src/badguy/flyingsnowball.cpp | 2 +- src/badguy/flyingsnowball.h | 2 +- src/badguy/jumpy.cpp | 10 +- src/badguy/jumpy.h | 2 +- src/badguy/mriceblock.cpp | 4 +- src/badguy/mriceblock.h | 2 +- src/badguy/mrrocket.cpp | 2 +- src/badguy/mrrocket.h | 2 +- src/badguy/nolok_01.cpp | 2 +- src/badguy/nolok_01.h | 2 +- src/badguy/rocketexplosion.cpp | 2 +- src/badguy/rocketexplosion.h | 2 +- src/badguy/spike.cpp | 2 +- src/badguy/spike.h | 2 +- src/badguy/stalactite.cpp | 2 +- src/badguy/stalactite.h | 2 +- src/badguy/yeti.cpp | 6 +- src/badguy/yeti.h | 2 +- src/badguy/yeti_stalactite.cpp | 4 +- src/badguy/yeti_stalactite.h | 2 +- src/control/joystickkeyboardcontroller.cpp | 4 +- src/game_object.h | 2 +- src/game_session.cpp | 10 +- src/game_session.h | 2 +- src/gui/menu.cpp | 6 +- src/gui/menu.h | 4 +- src/gui/mousecursor.h | 2 +- src/object/ambient_sound.cpp | 2 +- src/object/ambient_sound.h | 2 +- src/object/background.cpp | 2 +- src/object/background.h | 2 +- src/object/bell.cpp | 2 +- src/object/bell.h | 2 +- src/object/block.cpp | 2 +- src/object/block.h | 2 +- src/object/bullet.cpp | 2 +- src/object/bullet.h | 2 +- src/object/camera.cpp | 2 +- src/object/camera.h | 2 +- src/object/coin.cpp | 2 +- src/object/coin.h | 2 +- src/object/display_effect.cpp | 2 +- src/object/display_effect.h | 2 +- src/object/fireworks.cpp | 2 +- src/object/fireworks.h | 2 +- src/object/flower.cpp | 2 +- src/object/flower.h | 2 +- src/object/gameobjs.cpp | 10 +- src/object/gameobjs.h | 10 +- src/object/growup.cpp | 2 +- src/object/growup.h | 2 +- src/object/oneup.cpp | 2 +- src/object/oneup.h | 2 +- src/object/particlesystem.cpp | 6 +- src/object/particlesystem.h | 6 +- src/object/platform.cpp | 2 +- src/object/platform.h | 2 +- src/object/player.cpp | 2 +- src/object/player.h | 2 +- src/object/rock.cpp | 2 +- src/object/rock.h | 2 +- src/object/scripted_object.cpp | 2 +- src/object/scripted_object.h | 2 +- src/object/specialriser.cpp | 2 +- src/object/specialriser.h | 2 +- src/object/star.cpp | 2 +- src/object/star.h | 2 +- src/object/text_object.cpp | 2 +- src/object/text_object.h | 2 +- src/object/tilemap.cpp | 2 +- src/object/tilemap.h | 2 +- src/object/unstable_tile.cpp | 2 +- src/object/unstable_tile.h | 2 +- src/scripting/Jamfile | 1 - src/scripting/script_interpreter.cpp | 2 +- src/scripting/script_interpreter.h | 2 +- src/sector.cpp | 6 +- src/sector.h | 4 +- src/title.cpp | 4 +- src/trigger/door.cpp | 2 +- src/trigger/door.h | 2 +- src/trigger/hatch.cpp | 2 +- src/trigger/hatch.h | 2 +- src/trigger/trigger_base.cpp | 2 +- src/trigger/trigger_base.h | 2 +- src/worldmap.cpp | 146 +++++---- src/worldmap.h | 5 +- 99 files changed, 464 insertions(+), 468 deletions(-) diff --git a/data/credits.txt b/data/credits.txt index 52cb95df0..b0e7837d1 100644 --- a/data/credits.txt +++ b/data/credits.txt @@ -29,12 +29,15 @@ Ryan (sik0fewl) Flegel + -Contrib Programming Duong-Khang (neoneurone) NGUYEN Richard Smith + Ondra Hosek + -Graphics diff --git a/data/images/sprites.strf b/data/images/sprites.strf index 9c1642ff0..56211ab12 100644 --- a/data/images/sprites.strf +++ b/data/images/sprites.strf @@ -1555,8 +1555,12 @@ (sprite (name "yeti") (action - (name "normal") + (name "right") (images "creatures/yeti/yeti_b.png") ) + (action + (name "left") + (mirror-action "right") + ) ) ) diff --git a/data/levels/bonus1/worldmap.stwm b/data/levels/bonus1/worldmap.stwm index 34d506f1a..9f606638a 100644 --- a/data/levels/bonus1/worldmap.stwm +++ b/data/levels/bonus1/worldmap.stwm @@ -1,253 +1,248 @@ -;; Generated with Flexlay Editor +; Generated by Flexlay Editor (supertux-worldmap - (properties - (name (_ "Bonus Island I")) + (properties + (name (_ "Bonus Island I")) + (music "salcon.mod") (start_pos_x 35) - (start_pos_y 2)) - (tilemap - (width 70) + (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.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)) - - ) + (layer "interactive") + (solid #t) + (speed 1.000000) + (tiles 9 9 9 9 9 9 9 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) + ) + (level + (x 35) + (y 4) + (name "bonus-level1.stl") + ) + (level + (x 32) + (y 41) + (name "bonus-level2.stl") + ) + (level + (x 30) + (y 39) + (name "/bonus-level3.stl") + ) + (level + (x 32) + (y 46) + (name "/bonus-level4.stl") + ) + (level + (x 44) + (y 39) + (name "bonus-level5.stl") + ) + (level + (x 12) + (y 33) + (name "abednego-level1.stl") + ) + (level + (x 15) + (y 35) + (name "abednego-level2.stl") + ) + (level + (x 18) + (y 36) + (name "abednego-level3.stl") + ) + (level + (x 16) + (y 40) + (name "abednego-level4.stl") + ) + (level + (x 21) + (y 17) + (name "matr1x-level1.stl") + ) + (level + (x 25) + (y 18) + (name "matr1x-level2.stl") + ) + (level + (x 20) + (y 20) + (name "matr1x-level3.stl") + ) + (level + (x 35) + (y 20) + (name "thompson-level1.stl") + ) + (level + (x 37) + (y 22) + (name "thompson-level2.stl") + ) + (level + (x 58) + (y 34) + (name "torfi-level1.stl") + ) + (level + (x 57) + (y 38) + (name "torfi-level2.stl") + ) + (level + (x 59) + (y 40) + (name "torfi-level3.stl") + ) + (level + (x 51) + (y 14) + (name "wansti-level1.stl") + ) + (level + (x 53) + (y 16) + (name "wansti-level2.stl") + ) + (level + (x 52) + (y 20) + (name "wansti-level3.stl") + ) + (level + (x 47) + (y 18) + (name "wansti-level4.stl") + ) + (level + (x 50) + (y 22) + (name "wansti-level5.stl") + ) + (special-tile + (x 33) + (y 39) + (map-message (_ "You found a secret place!")) + (passive-message #t) + (apply-to-direction "west-north-south") + ) + (special-tile + (x 35) + (y 5) + (map-message (_ "Hint: Use igloos to get back here.")) + (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) + ) + (special-tile + (x 27) + (y 39) + (map-message (_ "Warp home")) + (teleport-to-x 35) + (teleport-to-y 2) + ) + (special-tile + (x 15) + (y 31) + (teleport-to-x 35) + (teleport-to-y 2) + ) + (special-tile + (x 34) + (y 18) + (teleport-to-x 35) + (teleport-to-y 2) + ) + (special-tile + (x 20) + (y 14) + (teleport-to-x 35) + (teleport-to-y 2) + ) + (special-tile + (x 51) + (y 10) + (teleport-to-x 35) + (teleport-to-y 2) + ) + (special-tile + (x 56) + (y 33) + (teleport-to-x 35) + (teleport-to-y 2) + ) ) - diff --git a/data/levels/world1/worldmap.stwm b/data/levels/world1/worldmap.stwm index 27ec3ffbb..67c2a9579 100644 --- a/data/levels/world1/worldmap.stwm +++ b/data/levels/world1/worldmap.stwm @@ -2,9 +2,6 @@ (supertux-worldmap (properties (name (_ "Icyisland")) - (name-pt_PT "Ilha Gelada") - (name-de "Eisige Insel") - (name-es "Isla de hielo") (intro-filename "intro.txt") (music "salcon.mod") (start_pos_x 4) @@ -12,7 +9,7 @@ (tilemap (width 40) (height 30) - (data + (tiles 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 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 @@ -45,8 +42,6 @@ 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 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) @@ -153,11 +148,5 @@ (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/src/badguy/badguy.cpp b/src/badguy/badguy.cpp index dd8544ea4..a312986bf 100644 --- a/src/badguy/badguy.cpp +++ b/src/badguy/badguy.cpp @@ -54,7 +54,7 @@ BadGuy::draw(DrawingContext& context) } void -BadGuy::action(float elapsed_time) +BadGuy::update(float elapsed_time) { if(!Sector::current()->inside(bbox)) { remove_me(); @@ -66,11 +66,11 @@ BadGuy::action(float elapsed_time) switch(state) { case STATE_ACTIVE: - active_action(elapsed_time); + active_update(elapsed_time); break; case STATE_INIT: case STATE_INACTIVE: - inactive_action(elapsed_time); + inactive_update(elapsed_time); try_activate(); break; case STATE_SQUISHED: @@ -97,13 +97,13 @@ BadGuy::deactivate() } void -BadGuy::active_action(float elapsed_time) +BadGuy::active_update(float elapsed_time) { movement = physic.get_movement(elapsed_time); } void -BadGuy::inactive_action(float ) +BadGuy::inactive_update(float ) { } diff --git a/src/badguy/badguy.h b/src/badguy/badguy.h index 621466eda..257065c2f 100644 --- a/src/badguy/badguy.h +++ b/src/badguy/badguy.h @@ -49,9 +49,9 @@ public: */ virtual void draw(DrawingContext& context); /** Called each frame. The default implementation checks badguy state and - * calls active_action and inactive_action + * calls active_update and inactive_update */ - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); /** Called when a collision with another object occured. The default * implemetnation calls collision_player, collision_solid, collision_badguy * and collision_squished @@ -98,9 +98,9 @@ protected: virtual bool collision_squished(Player& player); /** called each frame when the badguy is activated. */ - virtual void active_action(float elapsed_time); + virtual void active_update(float elapsed_time); /** called each frame when the badguy is not activated. */ - virtual void inactive_action(float elapsed_time); + virtual void inactive_update(float elapsed_time); /** * called when the badguy has been activated. (As a side effect the dir diff --git a/src/badguy/bomb.cpp b/src/badguy/bomb.cpp index 614bb18d7..2eadc6c1b 100644 --- a/src/badguy/bomb.cpp +++ b/src/badguy/bomb.cpp @@ -70,7 +70,7 @@ Bomb::collision_badguy(BadGuy& badguy, const CollisionHit& ) } void -Bomb::active_action(float ) +Bomb::active_update(float ) { switch(state) { case 0: @@ -99,6 +99,7 @@ Bomb::explode() void Bomb::kill_fall() { - explode(); + if (state != 1) // we don't want it exploding again + explode(); } diff --git a/src/badguy/bomb.h b/src/badguy/bomb.h index edb69f999..4bd322203 100644 --- a/src/badguy/bomb.h +++ b/src/badguy/bomb.h @@ -32,7 +32,7 @@ public: HitResponse collision_solid(GameObject& other, const CollisionHit& hit); HitResponse collision_player(Player& player, const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); - void active_action(float elapsed_time); + void active_update(float elapsed_time); void kill_fall(); void explode(); diff --git a/src/badguy/dispenser.cpp b/src/badguy/dispenser.cpp index b72daae82..0858bc038 100644 --- a/src/badguy/dispenser.cpp +++ b/src/badguy/dispenser.cpp @@ -74,7 +74,7 @@ Dispenser::collision_squished(Player& player) } void -Dispenser::active_action(float ) +Dispenser::active_update(float ) { if (dispense_timer.check()) { launch_badguy(); diff --git a/src/badguy/dispenser.h b/src/badguy/dispenser.h index 31a57d98a..235544491 100644 --- a/src/badguy/dispenser.h +++ b/src/badguy/dispenser.h @@ -31,7 +31,7 @@ public: void activate(); void write(lisp::Writer& writer); - void active_action(float elapsed_time); + void active_update(float elapsed_time); protected: bool collision_squished(Player& player); diff --git a/src/badguy/flame.cpp b/src/badguy/flame.cpp index 4b91960c4..7e98cb4c7 100644 --- a/src/badguy/flame.cpp +++ b/src/badguy/flame.cpp @@ -49,7 +49,7 @@ Flame::write(lisp::Writer& writer) } void -Flame::active_action(float elapsed_time) +Flame::active_update(float elapsed_time) { angle = fmodf(angle + elapsed_time * speed, 2*M_PI); Vector newpos(start_position.x + cos(angle) * radius, diff --git a/src/badguy/flame.h b/src/badguy/flame.h index 8306b20a5..225cef09b 100644 --- a/src/badguy/flame.h +++ b/src/badguy/flame.h @@ -29,7 +29,7 @@ public: Flame(const lisp::Lisp& reader); void write(lisp::Writer& write); - void active_action(float elapsed_time); + void active_update(float elapsed_time); void kill_fall(); private: diff --git a/src/badguy/flyingsnowball.cpp b/src/badguy/flyingsnowball.cpp index 9a958d68e..b95e487f6 100644 --- a/src/badguy/flyingsnowball.cpp +++ b/src/badguy/flyingsnowball.cpp @@ -83,7 +83,7 @@ FlyingSnowBall::collision_solid(GameObject& , const CollisionHit& hit) } void -FlyingSnowBall::active_action(float elapsed_time) +FlyingSnowBall::active_update(float elapsed_time) { if(timer.check()) { if(mode == FLY_UP) { diff --git a/src/badguy/flyingsnowball.h b/src/badguy/flyingsnowball.h index 2573c206f..7e1510b70 100644 --- a/src/badguy/flyingsnowball.h +++ b/src/badguy/flyingsnowball.h @@ -31,7 +31,7 @@ public: void activate(); void write(lisp::Writer& writer); - void active_action(float elapsed_time); + void active_update(float elapsed_time); HitResponse collision_solid(GameObject& other, const CollisionHit& hit); protected: enum FlyingSnowballMode { diff --git a/src/badguy/jumpy.cpp b/src/badguy/jumpy.cpp index 7486ffd75..a90f0a02b 100644 --- a/src/badguy/jumpy.cpp +++ b/src/badguy/jumpy.cpp @@ -79,12 +79,18 @@ Jumpy::hit(const CollisionHit& chit) } void -Jumpy::active_action(float elapsed_time) +Jumpy::active_update(float elapsed_time) { - BadGuy::active_action(elapsed_time); + BadGuy::active_update(elapsed_time); dir = Sector::current()->player->get_pos().x > get_pos().x ? RIGHT : LEFT; + + if (!groundhit_pos_set) + { + sprite->set_action(dir == LEFT ? "left-middle" : "right-middle"); + return; + } if ( get_pos().y < (pos_groundhit.y - JUMPY_MID_TOLERANCE ) ) sprite->set_action(dir == LEFT ? "left-up" : "right-up"); diff --git a/src/badguy/jumpy.h b/src/badguy/jumpy.h index 47fc4ee4e..d4d6d4c6f 100644 --- a/src/badguy/jumpy.h +++ b/src/badguy/jumpy.h @@ -31,7 +31,7 @@ public: HitResponse collision_badguy(BadGuy& other, const CollisionHit& hit); void write(lisp::Writer& writer); - void active_action(float); + void active_update(float); private: HitResponse hit(const CollisionHit& hit); diff --git a/src/badguy/mriceblock.cpp b/src/badguy/mriceblock.cpp index b2555763b..d37a2b5c7 100644 --- a/src/badguy/mriceblock.cpp +++ b/src/badguy/mriceblock.cpp @@ -68,14 +68,14 @@ MrIceBlock::activate() } void -MrIceBlock::active_action(float elapsed_time) +MrIceBlock::active_update(float elapsed_time) { if(ice_state == ICESTATE_FLAT && flat_timer.check()) { ice_state = ICESTATE_NORMAL; physic.set_velocity_x(dir == LEFT ? -WALKSPEED : WALKSPEED); sprite->set_action(dir == LEFT ? "left" : "right"); } - BadGuy::active_action(elapsed_time); + BadGuy::active_update(elapsed_time); } HitResponse diff --git a/src/badguy/mriceblock.h b/src/badguy/mriceblock.h index 9eb8c1737..906b0f49c 100644 --- a/src/badguy/mriceblock.h +++ b/src/badguy/mriceblock.h @@ -34,7 +34,7 @@ public: HitResponse collision_solid(GameObject& object, const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); - void active_action(float elapsed_time); + void active_update(float elapsed_time); protected: bool collision_squished(Player& player); diff --git a/src/badguy/mrrocket.cpp b/src/badguy/mrrocket.cpp index 020083e84..0a77d7f06 100644 --- a/src/badguy/mrrocket.cpp +++ b/src/badguy/mrrocket.cpp @@ -64,7 +64,7 @@ MrRocket::activate() } void -MrRocket::active_action(float elapsed_time) +MrRocket::active_update(float elapsed_time) { if (collision_timer.check()) { Sector::current()->add_object(new RocketExplosion(get_pos(), dir)); diff --git a/src/badguy/mrrocket.h b/src/badguy/mrrocket.h index 181cff3a6..e0385a2fb 100644 --- a/src/badguy/mrrocket.h +++ b/src/badguy/mrrocket.h @@ -32,7 +32,7 @@ public: MrRocket(float pos_x, float pos_y, Direction d); void activate(); - void active_action(float elapsed_time); + void active_update(float elapsed_time); void write(lisp::Writer& writer); HitResponse collision_solid(GameObject& other, const CollisionHit& hit); diff --git a/src/badguy/nolok_01.cpp b/src/badguy/nolok_01.cpp index 045a507e0..f54cabbc9 100644 --- a/src/badguy/nolok_01.cpp +++ b/src/badguy/nolok_01.cpp @@ -72,7 +72,7 @@ Nolok_01::activate() } void -Nolok_01::active_action(float elapsed_time) +Nolok_01::active_update(float elapsed_time) { if (action_timer.check()) { switch (action) { diff --git a/src/badguy/nolok_01.h b/src/badguy/nolok_01.h index 320da70e8..a7cdc43ea 100644 --- a/src/badguy/nolok_01.h +++ b/src/badguy/nolok_01.h @@ -32,7 +32,7 @@ public: void activate(); void write(lisp::Writer& writer); - void active_action(float elapsed_time); + void active_update(float elapsed_time); void kill_fall(); HitResponse collision_solid(GameObject& other, const CollisionHit& hit); diff --git a/src/badguy/rocketexplosion.cpp b/src/badguy/rocketexplosion.cpp index efbb84f94..ded99d37e 100644 --- a/src/badguy/rocketexplosion.cpp +++ b/src/badguy/rocketexplosion.cpp @@ -64,7 +64,7 @@ RocketExplosion::collision_badguy(BadGuy& badguy, const CollisionHit& ) } void -RocketExplosion::active_action(float ) +RocketExplosion::active_update(float ) { if(timer.check()) { remove_me(); diff --git a/src/badguy/rocketexplosion.h b/src/badguy/rocketexplosion.h index c6926601d..60a3f134a 100644 --- a/src/badguy/rocketexplosion.h +++ b/src/badguy/rocketexplosion.h @@ -32,7 +32,7 @@ public: HitResponse collision_solid(GameObject& other, const CollisionHit& hit); HitResponse collision_player(Player& player, const CollisionHit& hit); HitResponse collision_badguy(BadGuy& badguy, const CollisionHit& hit); - void active_action(float elapsed_time); + void active_update(float elapsed_time); void kill_fall(); void explode(); diff --git a/src/badguy/spike.cpp b/src/badguy/spike.cpp index e012d25b7..b2ca23735 100644 --- a/src/badguy/spike.cpp +++ b/src/badguy/spike.cpp @@ -79,7 +79,7 @@ Spike::kill_fall() } void -Spike::active_action(float ) +Spike::active_update(float ) { } diff --git a/src/badguy/spike.h b/src/badguy/spike.h index 93e6abf08..2cada0736 100644 --- a/src/badguy/spike.h +++ b/src/badguy/spike.h @@ -32,7 +32,7 @@ public: Spike(const Vector& pos, Direction dir); Spike(const lisp::Lisp& reader); - void active_action(float elapsed_time); + void active_update(float elapsed_time); void write(lisp::Writer& writer); void kill_fall(); private: diff --git a/src/badguy/stalactite.cpp b/src/badguy/stalactite.cpp index 784d262d6..d8e3f4eb0 100644 --- a/src/badguy/stalactite.cpp +++ b/src/badguy/stalactite.cpp @@ -45,7 +45,7 @@ Stalactite::write(lisp::Writer& writer) } void -Stalactite::active_action(float elapsed_time) +Stalactite::active_update(float elapsed_time) { if(state == STALACTITE_HANGING) { Player* player = Sector::current()->player; diff --git a/src/badguy/stalactite.h b/src/badguy/stalactite.h index 8b9fbf485..f193f5407 100644 --- a/src/badguy/stalactite.h +++ b/src/badguy/stalactite.h @@ -28,7 +28,7 @@ class Stalactite : public BadGuy public: Stalactite(const lisp::Lisp& reader); - void active_action(float elapsed_time); + void active_update(float elapsed_time); void write(lisp::Writer& writer); HitResponse collision_solid(GameObject& other, const CollisionHit& hit); HitResponse collision_player(Player& player, const CollisionHit& hit); diff --git a/src/badguy/yeti.cpp b/src/badguy/yeti.cpp index 8e9f72c76..b0d022cc7 100644 --- a/src/badguy/yeti.cpp +++ b/src/badguy/yeti.cpp @@ -17,7 +17,6 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. - #include #include @@ -43,6 +42,7 @@ Yeti::Yeti(const lisp::Lisp& reader) reader.get("y", start_position.y); bbox.set_size(80, 120); sprite = sprite_manager->create("yeti"); + sprite->set_action("right"); state = INIT; side = LEFT; sound_manager->preload_sound("yeti_gna"); @@ -66,7 +66,7 @@ Yeti::draw(DrawingContext& context) } void -Yeti::active_action(float elapsed_time) +Yeti::active_update(float elapsed_time) { switch(state) { case INIT: @@ -207,10 +207,12 @@ Yeti::collision_solid(GameObject& , const CollisionHit& hit) } else if(state == GO_LEFT && !timer.started()) { side = LEFT; summon_snowball(); + sprite->set_action("right"); angry_jumping(); } else if(state == GO_RIGHT && !timer.started()) { side = RIGHT; summon_snowball(); + sprite->set_action("left"); angry_jumping(); } else if(state == ANGRY_JUMPING) { if(!timer.started()) { diff --git a/src/badguy/yeti.h b/src/badguy/yeti.h index f62b5164a..1f14a6b98 100644 --- a/src/badguy/yeti.h +++ b/src/badguy/yeti.h @@ -30,7 +30,7 @@ public: void draw(DrawingContext& context); void write(lisp::Writer& writer); - void active_action(float elapsed_time); + void active_update(float elapsed_time); HitResponse collision_solid(GameObject& object, const CollisionHit& hit); bool collision_squished(Player& player); void kill_fall(); diff --git a/src/badguy/yeti_stalactite.cpp b/src/badguy/yeti_stalactite.cpp index d3f2b9000..0d1545bc1 100644 --- a/src/badguy/yeti_stalactite.cpp +++ b/src/badguy/yeti_stalactite.cpp @@ -45,12 +45,12 @@ YetiStalactite::is_hanging() } void -YetiStalactite::active_action(float elapsed_time) +YetiStalactite::active_update(float elapsed_time) { if(state == STALACTITE_HANGING) return; - Stalactite::active_action(elapsed_time); + Stalactite::active_update(elapsed_time); } IMPLEMENT_FACTORY(YetiStalactite, "yeti_stalactite") diff --git a/src/badguy/yeti_stalactite.h b/src/badguy/yeti_stalactite.h index a7f672f45..baca48ff8 100644 --- a/src/badguy/yeti_stalactite.h +++ b/src/badguy/yeti_stalactite.h @@ -29,7 +29,7 @@ public: YetiStalactite(const lisp::Lisp& lisp); virtual ~YetiStalactite(); - void active_action(float elapsed_time); + void active_update(float elapsed_time); void start_shaking(); bool is_hanging(); }; diff --git a/src/control/joystickkeyboardcontroller.cpp b/src/control/joystickkeyboardcontroller.cpp index 4f930917f..09220c99d 100644 --- a/src/control/joystickkeyboardcontroller.cpp +++ b/src/control/joystickkeyboardcontroller.cpp @@ -17,7 +17,6 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. - #include #include @@ -53,7 +52,8 @@ public: }; JoystickKeyboardController::JoystickKeyboardController() - : wait_for_key(-1), wait_for_joybutton(-1) + : wait_for_key(-1), wait_for_joybutton(-1), key_options_menu(0), + joystick_options_menu(0) { memset(last_keys, 0, sizeof(last_keys)); diff --git a/src/game_object.h b/src/game_object.h index b5b986041..1131847fb 100644 --- a/src/game_object.h +++ b/src/game_object.h @@ -46,7 +46,7 @@ public: * seconds and should be the base for all timed calculations (don't use * SDL_GetTicks directly as this will fail in pause mode) */ - virtual void action(float elapsed_time) = 0; + virtual void update(float elapsed_time) = 0; /** The GameObject should draw itself onto the provided DrawingContext if this * function is called. diff --git a/src/game_session.cpp b/src/game_session.cpp index edf057fef..86b38e3d9 100644 --- a/src/game_session.cpp +++ b/src/game_session.cpp @@ -405,7 +405,7 @@ GameSession::check_end_conditions() } void -GameSession::action(float elapsed_time) +GameSession::update(float elapsed_time) { // handle controller if(main_controller->pressed(Controller::PAUSE_MENU)) @@ -414,7 +414,7 @@ GameSession::action(float elapsed_time) // advance timers if(!currentsector->player->growing_timer.started()) { // Update Tux and the World - currentsector->action(elapsed_time); + currentsector->update(elapsed_time); } // respawning in new sector? @@ -485,7 +485,7 @@ GameSession::process_menu() { Menu* menu = Menu::current(); if(menu) { - menu->action(); + menu->update(); if(menu == game_menu) { switch (game_menu->check()) { @@ -581,9 +581,9 @@ GameSession::run() // Update the world check_end_conditions(); if (end_sequence == ENDSEQUENCE_RUNNING) - action(elapsed_time/2); + update(elapsed_time/2); else if(end_sequence == NO_ENDSEQUENCE) - action(elapsed_time); + update(elapsed_time); } else { diff --git a/src/game_session.h b/src/game_session.h index 3357fd18a..5fc2f681c 100644 --- a/src/game_session.h +++ b/src/game_session.h @@ -71,7 +71,7 @@ public: void record_demo(const std::string& filename); void play_demo(const std::string& filename); void draw(); - void action(float frame_ratio); + void update(float frame_ratio); void set_current() { current_ = this; } diff --git a/src/gui/menu.cpp b/src/gui/menu.cpp index d70b16a9c..87d083d08 100644 --- a/src/gui/menu.cpp +++ b/src/gui/menu.cpp @@ -90,7 +90,7 @@ bool confirm_dialog(Surface *background, std::string text) context.draw_surface(background, Vector(0,0), LAYER_BACKGROUND0); dialog->draw(context); - dialog->action(); + dialog->update(); switch (dialog->check()) { @@ -315,7 +315,7 @@ Menu::clear() /* Process actions done on the menu */ void -Menu::action() +Menu::update() { /** check main input controller... */ Uint32 ticks = SDL_GetTicks(); @@ -420,7 +420,7 @@ Menu::action() case MN_TEXTFIELD: case MN_NUMFIELD: menuaction = MENU_ACTION_DOWN; - action(); + update(); break; case MN_BACK: diff --git a/src/gui/menu.h b/src/gui/menu.h index dba01bc47..f3e621e76 100644 --- a/src/gui/menu.h +++ b/src/gui/menu.h @@ -117,7 +117,7 @@ private: }; /** Number of the item that got 'hit' (ie. pressed) in the last - event()/action() call, -1 if none */ + event()/update() call, -1 if none */ int hit_item; // position of the menu (ie. center of the menu, not top/left) @@ -156,7 +156,7 @@ public: virtual void menu_action(MenuItem* item); - void action(); + void update(); /** Remove all entries from the menu */ void clear(); diff --git a/src/gui/mousecursor.h b/src/gui/mousecursor.h index 4bebe5327..95a63a6a0 100644 --- a/src/gui/mousecursor.h +++ b/src/gui/mousecursor.h @@ -26,7 +26,7 @@ #define MC_STATES_NB 3 enum { - MC_NORMAL, + MC_NORMAL = 0, MC_CLICK, MC_LINK, MC_HIDE diff --git a/src/object/ambient_sound.cpp b/src/object/ambient_sound.cpp index 0307813cd..ea7a9aa0f 100644 --- a/src/object/ambient_sound.cpp +++ b/src/object/ambient_sound.cpp @@ -84,7 +84,7 @@ AmbientSound::start_playing() } void -AmbientSound::action(float deltat) +AmbientSound::update(float deltat) { if (latency--<=0) { diff --git a/src/object/ambient_sound.h b/src/object/ambient_sound.h index 433e60ece..00e43cfc2 100644 --- a/src/object/ambient_sound.h +++ b/src/object/ambient_sound.h @@ -49,7 +49,7 @@ public: ~AmbientSound(); protected: virtual void hit(Player& player); - virtual void action(float time); + virtual void update(float time); virtual void draw(DrawingContext&); virtual void start_playing(); virtual void stop_playing(); diff --git a/src/object/background.cpp b/src/object/background.cpp index 4995e97a8..a35376327 100644 --- a/src/object/background.cpp +++ b/src/object/background.cpp @@ -80,7 +80,7 @@ Background::write(lisp::Writer& writer) } void -Background::action(float) +Background::update(float) { } diff --git a/src/object/background.h b/src/object/background.h index 233d85879..30e86f175 100644 --- a/src/object/background.h +++ b/src/object/background.h @@ -52,7 +52,7 @@ public: Color get_gradient_bottom() const { return gradient_bottom; } - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); diff --git a/src/object/bell.cpp b/src/object/bell.cpp index 26733f7a2..e95a539f5 100644 --- a/src/object/bell.cpp +++ b/src/object/bell.cpp @@ -52,7 +52,7 @@ Bell::write(lisp::Writer& writer) } void -Bell::action(float ) +Bell::update(float ) { } diff --git a/src/object/bell.h b/src/object/bell.h index 6241c6cf4..0521e6a09 100644 --- a/src/object/bell.h +++ b/src/object/bell.h @@ -36,7 +36,7 @@ public: ~Bell(); void write(lisp::Writer& writer); - void action(float elapsed_time); + void update(float elapsed_time); void draw(DrawingContext& context); HitResponse collision(GameObject& other, const CollisionHit& hit); diff --git a/src/object/block.cpp b/src/object/block.cpp index 08f04fc22..ae016480b 100644 --- a/src/object/block.cpp +++ b/src/object/block.cpp @@ -81,7 +81,7 @@ Block::collision(GameObject& other, const CollisionHit& hitdata) } void -Block::action(float elapsed_time) +Block::update(float elapsed_time) { if(!bouncing) return; diff --git a/src/object/block.h b/src/object/block.h index 43321f14c..1650dbd5b 100644 --- a/src/object/block.h +++ b/src/object/block.h @@ -33,7 +33,7 @@ public: ~Block(); virtual HitResponse collision(GameObject& other, const CollisionHit& hit); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); protected: diff --git a/src/object/bullet.cpp b/src/object/bullet.cpp index 1b8279f1c..3d1b2282f 100644 --- a/src/object/bullet.cpp +++ b/src/object/bullet.cpp @@ -55,7 +55,7 @@ Bullet::~Bullet() } void -Bullet::action(float elapsed_time) +Bullet::update(float elapsed_time) { if(kind == FIRE_BULLET) { // @not completely framerate independant :-/ diff --git a/src/object/bullet.h b/src/object/bullet.h index 6c49f843c..ea176d36a 100644 --- a/src/object/bullet.h +++ b/src/object/bullet.h @@ -35,7 +35,7 @@ public: Bullet(const Vector& pos, float xm, int dir, int kind); ~Bullet(); - void action(float elapsed_time); + void update(float elapsed_time); void draw(DrawingContext& context); HitResponse collision(GameObject& other, const CollisionHit& hit); diff --git a/src/object/camera.cpp b/src/object/camera.cpp index 476ca4123..cb31c4a28 100644 --- a/src/object/camera.cpp +++ b/src/object/camera.cpp @@ -148,7 +148,7 @@ static const float EPSILON = .00001; static const float max_speed_y = 140; void -Camera::action(float elapsed_time) +Camera::update(float elapsed_time) { if(mode == NORMAL) scroll_normal(elapsed_time); diff --git a/src/object/camera.h b/src/object/camera.h index ac762984f..0ae033a17 100644 --- a/src/object/camera.h +++ b/src/object/camera.h @@ -51,7 +51,7 @@ public: /** @deprecated@ */ const Vector& get_translation() const; - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& ) { diff --git a/src/object/coin.cpp b/src/object/coin.cpp index c48292b39..498b56557 100644 --- a/src/object/coin.cpp +++ b/src/object/coin.cpp @@ -52,7 +52,7 @@ Coin::~Coin() } void -Coin::action(float ) +Coin::update(float ) { } diff --git a/src/object/coin.h b/src/object/coin.h index 3befd26b3..cdb86fc96 100644 --- a/src/object/coin.h +++ b/src/object/coin.h @@ -33,7 +33,7 @@ public: ~Coin(); HitResponse collision(GameObject& other, const CollisionHit& hit); - void action(float elapsed_time); + void update(float elapsed_time); void draw(DrawingContext& context); void collect(); diff --git a/src/object/display_effect.cpp b/src/object/display_effect.cpp index 0d85a8037..3268e9a28 100644 --- a/src/object/display_effect.cpp +++ b/src/object/display_effect.cpp @@ -15,7 +15,7 @@ DisplayEffect::~DisplayEffect() } void -DisplayEffect::action(float elapsed_time) +DisplayEffect::update(float elapsed_time) { switch(type) { case NO_FADE: diff --git a/src/object/display_effect.h b/src/object/display_effect.h index 0d0da2741..b1753bf63 100644 --- a/src/object/display_effect.h +++ b/src/object/display_effect.h @@ -10,7 +10,7 @@ public: DisplayEffect(); virtual ~DisplayEffect(); - void action(float elapsed_time); + void update(float elapsed_time); void draw(DrawingContext& context); void fade_out(float fadetime); diff --git a/src/object/fireworks.cpp b/src/object/fireworks.cpp index 69244bfcf..f8ae8cf1f 100644 --- a/src/object/fireworks.cpp +++ b/src/object/fireworks.cpp @@ -38,7 +38,7 @@ Fireworks::~Fireworks() } void -Fireworks::action(float ) +Fireworks::update(float ) { if(timer.check()) { Sector* sector = Sector::current(); diff --git a/src/object/fireworks.h b/src/object/fireworks.h index 575dae3ef..7afd200a1 100644 --- a/src/object/fireworks.h +++ b/src/object/fireworks.h @@ -31,7 +31,7 @@ public: Fireworks(); ~Fireworks(); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); private: diff --git a/src/object/flower.cpp b/src/object/flower.cpp index d07f71f4f..9216d4e14 100644 --- a/src/object/flower.cpp +++ b/src/object/flower.cpp @@ -45,7 +45,7 @@ Flower::~Flower() } void -Flower::action(float ) +Flower::update(float ) { } diff --git a/src/object/flower.h b/src/object/flower.h index 7e2956fa9..bfa950bb5 100644 --- a/src/object/flower.h +++ b/src/object/flower.h @@ -33,7 +33,7 @@ public: Flower(const Vector& pos, Type type); ~Flower(); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); virtual HitResponse collision(GameObject& other, const CollisionHit& hit); diff --git a/src/object/gameobjs.cpp b/src/object/gameobjs.cpp index e863be38c..8992fa446 100644 --- a/src/object/gameobjs.cpp +++ b/src/object/gameobjs.cpp @@ -50,7 +50,7 @@ BouncyCoin::~BouncyCoin() } void -BouncyCoin::action(float elapsed_time) +BouncyCoin::update(float elapsed_time) { position.y += -200 * elapsed_time; @@ -79,7 +79,7 @@ BrokenBrick::~BrokenBrick() } void -BrokenBrick::action(float elapsed_time) +BrokenBrick::update(float elapsed_time) { position += movement * elapsed_time; @@ -118,7 +118,7 @@ FloatingText::FloatingText(const Vector& pos, int score) } void -FloatingText::action(float elapsed_time) +FloatingText::update(float elapsed_time) { position.y -= 1.4 * elapsed_time; @@ -155,7 +155,7 @@ SmokeCloud::SmokeCloud(const Vector& pos) } void -SmokeCloud::action(float elapsed_time) +SmokeCloud::update(float elapsed_time) { position.y -= 120 * elapsed_time; @@ -209,7 +209,7 @@ Particles::~Particles() } void -Particles::action(float elapsed_time) +Particles::update(float elapsed_time) { Vector camera = Sector::current()->camera->get_translation(); diff --git a/src/object/gameobjs.h b/src/object/gameobjs.h index 69b0f260b..886c5243a 100644 --- a/src/object/gameobjs.h +++ b/src/object/gameobjs.h @@ -39,7 +39,7 @@ class BouncyCoin : public GameObject public: BouncyCoin(const Vector& pos); ~BouncyCoin(); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); private: @@ -54,7 +54,7 @@ public: BrokenBrick(Sprite* sprite, const Vector& pos, const Vector& movement); ~BrokenBrick(); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); private: @@ -70,7 +70,7 @@ public: FloatingText(const Vector& pos, const std::string& text_); FloatingText(const Vector& pos, int s); // use this for score, for instance - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); private: @@ -86,7 +86,7 @@ class SmokeCloud : public GameObject public: SmokeCloud(const Vector& pos); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); private: @@ -102,7 +102,7 @@ public: int number, Color color, int size, float life_time, int drawing_layer); ~Particles(); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); private: diff --git a/src/object/growup.cpp b/src/object/growup.cpp index 32420f14d..0499c8572 100644 --- a/src/object/growup.cpp +++ b/src/object/growup.cpp @@ -43,7 +43,7 @@ GrowUp::~GrowUp() } void -GrowUp::action(float elapsed_time) +GrowUp::update(float elapsed_time) { movement = physic.get_movement(elapsed_time); } diff --git a/src/object/growup.h b/src/object/growup.h index b2407d82f..7976531fb 100644 --- a/src/object/growup.h +++ b/src/object/growup.h @@ -30,7 +30,7 @@ public: GrowUp(const Vector& pos); ~GrowUp(); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); virtual HitResponse collision(GameObject& other, const CollisionHit& hit); diff --git a/src/object/oneup.cpp b/src/object/oneup.cpp index bebe02419..0d867f1cf 100644 --- a/src/object/oneup.cpp +++ b/src/object/oneup.cpp @@ -42,7 +42,7 @@ OneUp::~OneUp() } void -OneUp::action(float elapsed_time) +OneUp::update(float elapsed_time) { if(!Sector::current()->inside(bbox)) remove_me(); diff --git a/src/object/oneup.h b/src/object/oneup.h index 4c5794e39..846caa7d8 100644 --- a/src/object/oneup.h +++ b/src/object/oneup.h @@ -30,7 +30,7 @@ public: OneUp(const Vector& pos); ~OneUp(); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); virtual HitResponse collision(GameObject& other, const CollisionHit& hit); diff --git a/src/object/particlesystem.cpp b/src/object/particlesystem.cpp index 8782d1360..14a7a8ff6 100644 --- a/src/object/particlesystem.cpp +++ b/src/object/particlesystem.cpp @@ -116,7 +116,7 @@ SnowParticleSystem::~SnowParticleSystem() delete snowimages[i]; } -void SnowParticleSystem::action(float elapsed_time) +void SnowParticleSystem::update(float elapsed_time) { std::vector::iterator i; for(i = particles.begin(); i != particles.end(); ++i) { @@ -173,7 +173,7 @@ RainParticleSystem::~RainParticleSystem() delete rainimages[i]; } -void RainParticleSystem::action(float elapsed_time) +void RainParticleSystem::update(float elapsed_time) { std::vector::iterator i; for(i = particles.begin(); i != particles.end(); ++i) { @@ -224,7 +224,7 @@ CloudParticleSystem::~CloudParticleSystem() delete cloudimage; } -void CloudParticleSystem::action(float elapsed_time) +void CloudParticleSystem::update(float elapsed_time) { std::vector::iterator i; for(i = particles.begin(); i != particles.end(); ++i) { diff --git a/src/object/particlesystem.h b/src/object/particlesystem.h index 23d9e293c..f90399fc8 100644 --- a/src/object/particlesystem.h +++ b/src/object/particlesystem.h @@ -80,7 +80,7 @@ public: void parse(const lisp::Lisp& lisp); void write(lisp::Writer& writer); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); std::string type() const { return "SnowParticleSystem"; } @@ -104,7 +104,7 @@ public: void parse(const lisp::Lisp& lisp); void write(lisp::Writer& writer); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); std::string type() const { return "RainParticleSystem"; } @@ -128,7 +128,7 @@ public: void parse(const lisp::Lisp& lisp); void write(lisp::Writer& writer); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); std::string type() const { return "SnowParticleSystem"; } diff --git a/src/object/platform.cpp b/src/object/platform.cpp index 77d428fbf..0a83e15fa 100644 --- a/src/object/platform.cpp +++ b/src/object/platform.cpp @@ -60,7 +60,7 @@ Platform::collision(GameObject& , const CollisionHit& ) } void -Platform::action(float ) +Platform::update(float ) { // just some test code... if(state == 0) { diff --git a/src/object/platform.h b/src/object/platform.h index 71200f940..d256fd1d4 100644 --- a/src/object/platform.h +++ b/src/object/platform.h @@ -33,7 +33,7 @@ public: ~Platform(); virtual HitResponse collision(GameObject& other, const CollisionHit& hit); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); private: diff --git a/src/object/player.cpp b/src/object/player.cpp index f2bc78a7e..1a2d6c110 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -153,7 +153,7 @@ Player::set_controller(Controller* controller) } void -Player::action(float elapsed_time) +Player::update(float elapsed_time) { if(dying && dying_timer.check()) { dead = true; diff --git a/src/object/player.h b/src/object/player.h index 8a4c6c5c9..731b44363 100644 --- a/src/object/player.h +++ b/src/object/player.h @@ -133,7 +133,7 @@ public: void set_controller(Controller* controller); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); virtual HitResponse collision(GameObject& other, const CollisionHit& hit); diff --git a/src/object/rock.cpp b/src/object/rock.cpp index 121fc4c82..7c010a28b 100644 --- a/src/object/rock.cpp +++ b/src/object/rock.cpp @@ -62,7 +62,7 @@ Rock::draw(DrawingContext& context) } void -Rock::action(float elapsed_time) +Rock::update(float elapsed_time) { if(!grabbed) { flags |= FLAG_SOLID; diff --git a/src/object/rock.h b/src/object/rock.h index f0ab98a2a..5f8e4a22e 100644 --- a/src/object/rock.h +++ b/src/object/rock.h @@ -36,7 +36,7 @@ public: virtual ~Rock(); HitResponse collision(GameObject& other, const CollisionHit& hit); - void action(float elapsed_time); + void update(float elapsed_time); void draw(DrawingContext& context); void write(lisp::Writer& writer); diff --git a/src/object/scripted_object.cpp b/src/object/scripted_object.cpp index db7295797..cc3777476 100644 --- a/src/object/scripted_object.cpp +++ b/src/object/scripted_object.cpp @@ -116,7 +116,7 @@ ScriptedObject::get_name() } void -ScriptedObject::action(float elapsed_time) +ScriptedObject::update(float elapsed_time) { if(!physic_enabled) return; diff --git a/src/object/scripted_object.h b/src/object/scripted_object.h index 7d3031f2d..70b4dc2dc 100644 --- a/src/object/scripted_object.h +++ b/src/object/scripted_object.h @@ -14,7 +14,7 @@ public: ScriptedObject(const lisp::Lisp& lisp); virtual ~ScriptedObject(); - void action(float elapsed_time); + void update(float elapsed_time); void draw(DrawingContext& context); HitResponse collision(GameObject& other, const CollisionHit& hit); diff --git a/src/object/specialriser.cpp b/src/object/specialriser.cpp index 0058d6d76..ce14ad5c0 100644 --- a/src/object/specialriser.cpp +++ b/src/object/specialriser.cpp @@ -37,7 +37,7 @@ SpecialRiser::~SpecialRiser() } void -SpecialRiser::action(float elapsed_time) +SpecialRiser::update(float elapsed_time) { offset += 50 * elapsed_time; if(offset > 32) { diff --git a/src/object/specialriser.h b/src/object/specialriser.h index 51932564d..fe5a9d4d1 100644 --- a/src/object/specialriser.h +++ b/src/object/specialriser.h @@ -32,7 +32,7 @@ public: SpecialRiser(MovingObject* child); ~SpecialRiser(); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); private: diff --git a/src/object/star.cpp b/src/object/star.cpp index e9090316e..0b7ea7e6d 100644 --- a/src/object/star.cpp +++ b/src/object/star.cpp @@ -45,7 +45,7 @@ Star::~Star() } void -Star::action(float elapsed_time) +Star::update(float elapsed_time) { movement = physic.get_movement(elapsed_time); } diff --git a/src/object/star.h b/src/object/star.h index 2ad8da626..0e5fe7556 100644 --- a/src/object/star.h +++ b/src/object/star.h @@ -30,7 +30,7 @@ public: Star(const Vector& pos); ~Star(); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); virtual HitResponse collision(GameObject& other, const CollisionHit& hit); diff --git a/src/object/text_object.cpp b/src/object/text_object.cpp index a623a3498..0cf7f8a05 100644 --- a/src/object/text_object.cpp +++ b/src/object/text_object.cpp @@ -86,7 +86,7 @@ TextObject::draw(DrawingContext& context) } void -TextObject::action(float elapsed_time) +TextObject::update(float elapsed_time) { if(fading > 0) { fading -= elapsed_time; diff --git a/src/object/text_object.h b/src/object/text_object.h index c78945a8a..0bc3e7e34 100644 --- a/src/object/text_object.h +++ b/src/object/text_object.h @@ -21,7 +21,7 @@ public: bool is_visible(); void draw(DrawingContext& context); - void action(float elapsed_time); + void update(float elapsed_time); private: Font* font; diff --git a/src/object/tilemap.cpp b/src/object/tilemap.cpp index e845a2dbf..a8ca571c1 100644 --- a/src/object/tilemap.cpp +++ b/src/object/tilemap.cpp @@ -131,7 +131,7 @@ TileMap::write(lisp::Writer& writer) } void -TileMap::action(float ) +TileMap::update(float ) { } diff --git a/src/object/tilemap.h b/src/object/tilemap.h index b56ce0bce..2aaf3ce42 100644 --- a/src/object/tilemap.h +++ b/src/object/tilemap.h @@ -47,7 +47,7 @@ public: virtual void write(lisp::Writer& writer); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); void set(int width, int height, const std::vector& vec, diff --git a/src/object/unstable_tile.cpp b/src/object/unstable_tile.cpp index 9f22448c1..38f938627 100644 --- a/src/object/unstable_tile.cpp +++ b/src/object/unstable_tile.cpp @@ -73,7 +73,7 @@ UnstableTile::draw(DrawingContext& context) } void -UnstableTile::action(float elapsed_time) +UnstableTile::update(float elapsed_time) { if(falling) { movement = physic.get_movement(elapsed_time); diff --git a/src/object/unstable_tile.h b/src/object/unstable_tile.h index f6ffb9676..939eda57e 100644 --- a/src/object/unstable_tile.h +++ b/src/object/unstable_tile.h @@ -36,7 +36,7 @@ public: ~UnstableTile(); HitResponse collision(GameObject& other, const CollisionHit& hit); - void action(float elapsed_time); + void update(float elapsed_time); void draw(DrawingContext& context); private: diff --git a/src/scripting/Jamfile b/src/scripting/Jamfile index bf12c152a..64d4e0934 100644 --- a/src/scripting/Jamfile +++ b/src/scripting/Jamfile @@ -39,7 +39,6 @@ if ! $(MINISWIG) { wrapper_sources += [ SearchSource wrapper.cpp ] ; } - echo $(wrapper_sources) ; wrapper_objects = [ CompileObjects $(wrapper_sources) ] ; if $(MINISWIG) { diff --git a/src/scripting/script_interpreter.cpp b/src/scripting/script_interpreter.cpp index cf3937e90..095c6afca 100644 --- a/src/scripting/script_interpreter.cpp +++ b/src/scripting/script_interpreter.cpp @@ -170,7 +170,7 @@ ScriptInterpreter::set_wakeup_time(float seconds) } void -ScriptInterpreter::action(float ) +ScriptInterpreter::update(float ) { if(!wakeup_timer.check()) return; diff --git a/src/scripting/script_interpreter.h b/src/scripting/script_interpreter.h index 73f596bd9..df0003283 100644 --- a/src/scripting/script_interpreter.h +++ b/src/scripting/script_interpreter.h @@ -17,7 +17,7 @@ public: ~ScriptInterpreter(); void draw(DrawingContext& ); - void action(float ); + void update(float ); void load_script(std::istream& in, const std::string& sourcename = ""); void start_script(); diff --git a/src/sector.cpp b/src/sector.cpp index 80f76c83e..cc1689b0d 100644 --- a/src/sector.cpp +++ b/src/sector.cpp @@ -453,7 +453,7 @@ Sector::get_active_region() } void -Sector::action(float elapsed_time) +Sector::update(float elapsed_time) { player->check_bounds(camera); @@ -463,7 +463,7 @@ Sector::action(float elapsed_time) if(!object->is_valid()) continue; - object->action(elapsed_time); + object->update(elapsed_time); } #else /* update objects */ @@ -473,7 +473,7 @@ Sector::action(float elapsed_time) if(!object->is_valid()) continue; - object->action(elapsed_time); + object->update(elapsed_time); } #endif diff --git a/src/sector.h b/src/sector.h index ad735f48d..7c33741c5 100644 --- a/src/sector.h +++ b/src/sector.h @@ -73,7 +73,7 @@ public: void activate(const std::string& spawnpoint); void activate(const Vector& player_pos); - void action(float elapsed_time); + void update(float elapsed_time); void update_game_objects(); void draw(DrawingContext& context); @@ -148,7 +148,7 @@ public: // TODO make this private again private: void fix_old_tiles(); - /// container for newly created objects, they'll be added in Sector::action + /// container for newly created objects, they'll be added in Sector::update GameObjects gameobjects_new; MusicType currentmusic; diff --git a/src/title.cpp b/src/title.cpp index f74dde61b..255b38d98 100644 --- a/src/title.cpp +++ b/src/title.cpp @@ -265,7 +265,7 @@ void draw_demo(float elapsed_time) sector->camera->reset(tux->get_pos()); } - sector->action(elapsed_time); + sector->update(elapsed_time); sector->draw(*titlesession->context); } @@ -350,7 +350,7 @@ void title() if(menu) { menu->draw(context); - menu->action(); + menu->update(); if(menu == main_menu) { diff --git a/src/trigger/door.cpp b/src/trigger/door.cpp index 760d3d08a..28550c225 100644 --- a/src/trigger/door.cpp +++ b/src/trigger/door.cpp @@ -72,7 +72,7 @@ Door::write(lisp::Writer& writer) } void -Door::action(float ) +Door::update(float ) { //Check if door animation is complete if(sprite->check_animation()) { diff --git a/src/trigger/door.h b/src/trigger/door.h index 0dfea85c8..830d3fcea 100644 --- a/src/trigger/door.h +++ b/src/trigger/door.h @@ -36,7 +36,7 @@ public: virtual void write(lisp::Writer& writer); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); virtual void event(Player& player, EventType type); diff --git a/src/trigger/hatch.cpp b/src/trigger/hatch.cpp index 8e264dfb4..2f2910894 100644 --- a/src/trigger/hatch.cpp +++ b/src/trigger/hatch.cpp @@ -72,7 +72,7 @@ Hatch::write(lisp::Writer& writer) } void -Hatch::action(float ) +Hatch::update(float ) { //Check if hatch animation is complete if(sprite->check_animation()) { diff --git a/src/trigger/hatch.h b/src/trigger/hatch.h index 90aab396c..d0cc73e0d 100644 --- a/src/trigger/hatch.h +++ b/src/trigger/hatch.h @@ -36,7 +36,7 @@ public: virtual void write(lisp::Writer& writer); - virtual void action(float elapsed_time); + virtual void update(float elapsed_time); virtual void draw(DrawingContext& context); virtual void event(Player& player, EventType type); diff --git a/src/trigger/trigger_base.cpp b/src/trigger/trigger_base.cpp index 608b784a3..95814a1cd 100644 --- a/src/trigger/trigger_base.cpp +++ b/src/trigger/trigger_base.cpp @@ -32,7 +32,7 @@ TriggerBase::~TriggerBase() } void -TriggerBase::action(float ) +TriggerBase::update(float ) { lasthit = hit; hit = false; diff --git a/src/trigger/trigger_base.h b/src/trigger/trigger_base.h index 9038a55ee..fc159c662 100644 --- a/src/trigger/trigger_base.h +++ b/src/trigger/trigger_base.h @@ -38,7 +38,7 @@ public: TriggerBase(); ~TriggerBase(); - void action(float elapsed_time); + void update(float elapsed_time); void draw(DrawingContext& context); HitResponse collision(GameObject& other, const CollisionHit& hit); diff --git a/src/worldmap.cpp b/src/worldmap.cpp index 50a9f6485..d90afe776 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -195,7 +195,7 @@ Tux::set_direction(Direction dir) } void -Tux::action(float delta) +Tux::update(float delta) { // check controller if(main_controller->pressed(Controller::UP)) @@ -401,7 +401,7 @@ WorldMap::load_map() const lisp::Lisp* tilemap_lisp = iter.lisp(); tilemap_lisp->get("width", width); tilemap_lisp->get("height", height); - tilemap_lisp->get_vector("data", tilemap); + tilemap_lisp->get_vector("tiles", tilemap); } else if(iter.item() == "properties") { const lisp::Lisp* props = iter.lisp(); props->get("name", name); @@ -409,8 +409,10 @@ WorldMap::load_map() props->get("intro-filename", intro_filename); props->get("start_pos_x", start_x); props->get("start_pos_y", start_y); - } else if(iter.item() == "special-tiles") { - parse_special_tiles(iter.lisp()); + } else if(iter.item() == "level") { + parse_level_tile(iter.lisp()); + } else if(iter.item() == "special-tile") { + parse_special_tile(iter.lisp()); } else { std::cerr << "Unknown token '" << iter.item() << "' in worldmap.\n"; } @@ -427,81 +429,75 @@ WorldMap::load_map() } void -WorldMap::parse_special_tiles(const lisp::Lisp* lisp) +WorldMap::parse_special_tile(const lisp::Lisp* lisp) { - lisp::ListIterator iter(lisp); - while(iter.next()) { - if(iter.item() == "special-tile") { - SpecialTile special_tile; - - const lisp::Lisp* lisp = iter.lisp(); - lisp->get("x", special_tile.pos.x); - lisp->get("y", special_tile.pos.y); - lisp->get("map-message", special_tile.map_message); - special_tile.passive_message = false; - lisp->get("passive-message", special_tile.passive_message); - special_tile.teleport_dest = Vector(-1,-1); - lisp->get("teleport-to-x", special_tile.teleport_dest.x); - lisp->get("teleport-to-y", special_tile.teleport_dest.y); - special_tile.invisible = false; - lisp->get("invisible-tile", special_tile.invisible); - + SpecialTile special_tile; + + lisp->get("x", special_tile.pos.x); + lisp->get("y", special_tile.pos.y); + lisp->get("map-message", special_tile.map_message); + special_tile.passive_message = false; + lisp->get("passive-message", special_tile.passive_message); + special_tile.teleport_dest = Vector(-1,-1); + lisp->get("teleport-to-x", special_tile.teleport_dest.x); + lisp->get("teleport-to-y", special_tile.teleport_dest.y); + special_tile.invisible = false; + lisp->get("invisible-tile", special_tile.invisible); + + special_tile.apply_action_north = true; + special_tile.apply_action_south = true; + special_tile.apply_action_east = true; + special_tile.apply_action_west = true; + + std::string apply_direction; + lisp->get("apply-to-direction", apply_direction); + if(!apply_direction.empty()) { + special_tile.apply_action_north = false; + special_tile.apply_action_south = false; + special_tile.apply_action_east = false; + special_tile.apply_action_west = false; + if(apply_direction.find("north") != std::string::npos) special_tile.apply_action_north = true; + if(apply_direction.find("south") != std::string::npos) special_tile.apply_action_south = true; + if(apply_direction.find("east") != std::string::npos) special_tile.apply_action_east = true; + if(apply_direction.find("west") != std::string::npos) special_tile.apply_action_west = true; - - std::string apply_direction; - lisp->get("apply-to-direction", apply_direction); - if(!apply_direction.empty()) { - special_tile.apply_action_north = false; - special_tile.apply_action_south = false; - special_tile.apply_action_east = false; - special_tile.apply_action_west = false; - if(apply_direction.find("north") != std::string::npos) - special_tile.apply_action_north = true; - if(apply_direction.find("south") != std::string::npos) - special_tile.apply_action_south = true; - if(apply_direction.find("east") != std::string::npos) - special_tile.apply_action_east = true; - if(apply_direction.find("west") != std::string::npos) - special_tile.apply_action_west = true; - } - - special_tiles.push_back(special_tile); - } else if(iter.item() == "level") { - Level level; - - lisp::Lisp* level_lisp = iter.lisp(); - level.solved = false; - - level.north = true; - level.east = true; - level.south = true; - level.west = true; - - level_lisp->get("extro-filename", level.extro_filename); - level_lisp->get("next-worldmap", level.next_worldmap); - - level.quit_worldmap = false; - level_lisp->get("quit-worldmap", level.quit_worldmap); - - level_lisp->get("name", level.name); - level_lisp->get("x", level.pos.x); - level_lisp->get("y", level.pos.y); - - level.auto_path = true; - level_lisp->get("auto-path", level.auto_path); - - level.vertical_flip = false; - level_lisp->get("vertical-flip", level.vertical_flip); - - levels.push_back(level); - } else { - std::cerr << "Unknown token '" << iter.item() << - "' in worldmap special-tiles list."; - } } + + special_tiles.push_back(special_tile); +} + +void +WorldMap::parse_level_tile(const lisp::Lisp* level_lisp) +{ + Level level; + + level.solved = false; + + level.north = true; + level.east = true; + level.south = true; + level.west = true; + + level_lisp->get("extro-filename", level.extro_filename); + level_lisp->get("next-worldmap", level.next_worldmap); + + level.quit_worldmap = false; + level_lisp->get("quit-worldmap", level.quit_worldmap); + + level_lisp->get("name", level.name); + level_lisp->get("x", level.pos.x); + level_lisp->get("y", level.pos.y); + + level.auto_path = true; + level_lisp->get("auto-path", level.auto_path); + + level.vertical_flip = false; + level_lisp->get("vertical-flip", level.vertical_flip); + + levels.push_back(level); } void @@ -629,7 +625,7 @@ WorldMap::update(float delta) { Menu* menu = Menu::current(); if(menu) { - menu->action(); + menu->update(); if(menu == worldmap_menu) { switch (worldmap_menu->check()) @@ -806,7 +802,7 @@ WorldMap::update(float delta) } else { - tux->action(delta); + tux->update(delta); // tux->set_direction(input_direction); } } diff --git a/src/worldmap.h b/src/worldmap.h index 8c19d74c2..dd5d03a99 100644 --- a/src/worldmap.h +++ b/src/worldmap.h @@ -82,7 +82,7 @@ public: ~Tux(); void draw(DrawingContext& context); - void action(float elapsed_time); + void update(float elapsed_time); void set_direction(Direction dir); @@ -257,7 +257,8 @@ public: private: void on_escape_press(); - void parse_special_tiles(const lisp::Lisp* lisp); + void parse_special_tile(const lisp::Lisp* lisp); + void parse_level_tile(const lisp::Lisp* lisp); }; } // namespace WorldMapNS -- 2.11.0