added some comments and the framework for platforms that travel back and forth on...
[supertux.git] / src / worldmap.cpp
index 9e5c0ee..36e0444 100644 (file)
 #include <sstream>
 #include <unistd.h>
 
-#include "gettext.h"
-#include "video/surface.h"
-#include "video/screen.h"
-#include "video/drawing_context.h"
-#include "sprite/sprite_manager.h"
-#include "audio/sound_manager.h"
-#include "lisp/parser.h"
-#include "lisp/lisp.h"
-#include "lisp/list_iterator.h"
-#include "lisp/writer.h"
-#include "game_session.h"
-#include "sector.h"
-#include "worldmap.h"
-#include "resources.h"
-#include "misc.h"
-#include "player_status.h"
-#include "textscroller.h"
-#include "main.h"
-#include "spawn_point.h"
-#include "file_system.h"
-#include "gui/menu.h"
-#include "gui/mousecursor.h"
-#include "control/joystickkeyboardcontroller.h"
-#include "object/background.h"
-#include "object/tilemap.h"
-#include "scripting/script_interpreter.h"
+#include "gettext.hpp"
+#include "video/surface.hpp"
+#include "video/screen.hpp"
+#include "video/drawing_context.hpp"
+#include "sprite/sprite_manager.hpp"
+#include "audio/sound_manager.hpp"
+#include "lisp/parser.hpp"
+#include "lisp/lisp.hpp"
+#include "lisp/list_iterator.hpp"
+#include "lisp/writer.hpp"
+#include "game_session.hpp"
+#include "sector.hpp"
+#include "worldmap.hpp"
+#include "resources.hpp"
+#include "misc.hpp"
+#include "player_status.hpp"
+#include "textscroller.hpp"
+#include "main.hpp"
+#include "spawn_point.hpp"
+#include "file_system.hpp"
+#include "gui/menu.hpp"
+#include "gui/mousecursor.hpp"
+#include "control/joystickkeyboardcontroller.hpp"
+#include "object/background.hpp"
+#include "object/tilemap.hpp"
+#include "scripting/script_interpreter.hpp"
 
 Menu* worldmap_menu  = 0;
 
@@ -713,7 +713,7 @@ WorldMap::update(float delta)
         if (special_tile->teleport_dest != Vector(-1,-1))
           {
           // TODO: an animation, camera scrolling or a fading would be a nice touch
-          sound_manager->play("sounds/warp.wav");
+          sound_manager->play("sounds/warp.ogg");
           tux->back_direction = D_NONE;
           tux->set_tile_pos(special_tile->teleport_dest);
           SDL_Delay(1000);
@@ -734,6 +734,7 @@ WorldMap::update(float delta)
 
       if (level->pos == tux->get_tile_pos())
         {
+          sound_manager->stop_music();
           PlayerStatus old_player_status = player_status;
 
           // do a shriking fade to the level
@@ -1007,7 +1008,7 @@ WorldMap::display()
   while(!quit) {
     Uint32 ticks = SDL_GetTicks();
     float elapsed_time = float(ticks - lastticks) / 1000;
-    global_time += elapsed_time;
+    game_time += elapsed_time;
     lastticks = ticks;
     
     // 40 fps minimum // TODO use same code as in GameSession here