X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fworldmap.cpp;h=50a9f64859e52f805bdcc33b6e62fed0a445e9ce;hb=22901c90fe1a4b0d5a6ef8fccb2494699b888e32;hp=a2f8d3b9dd6a17571505085f6d994b28baa2cc87;hpb=c0093d25093395cb62fc2526ab42be65a9f015b8;p=supertux.git diff --git a/src/worldmap.cpp b/src/worldmap.cpp index a2f8d3b9d..50a9f6485 100644 --- a/src/worldmap.cpp +++ b/src/worldmap.cpp @@ -26,13 +26,10 @@ #include #include -#include "app/globals.h" -#include "app/gettext.h" -#include "app/setup.h" +#include "gettext.h" #include "video/surface.h" #include "video/screen.h" #include "video/drawing_context.h" -#include "special/frame_rate.h" #include "sprite/sprite_manager.h" #include "audio/sound_manager.h" #include "lisp/parser.h" @@ -47,6 +44,9 @@ #include "player_status.h" #include "textscroller.h" #include "main.h" +#include "file_system.h" +#include "gui/menu.h" +#include "gui/mousecursor.h" #include "control/joystickkeyboardcontroller.h" Menu* worldmap_menu = 0; @@ -344,7 +344,7 @@ Tux::action(float delta) WorldMap::WorldMap() { - tile_manager = new TileManager("images/worldmap/antarctica.stwt"); + tile_manager = new TileManager("images/worldmap.strf"); width = 20; height = 15; @@ -354,10 +354,10 @@ WorldMap::WorldMap() tux = new Tux(this); - leveldot_green = new Surface(datadir + "/images/worldmap/leveldot_green.png", true); - leveldot_red = new Surface(datadir + "/images/worldmap/leveldot_red.png", true); - messagedot = new Surface(datadir + "/images/worldmap/messagedot.png", true); - teleporterdot = new Surface(datadir + "/images/worldmap/teleporterdot.png", true); + leveldot_green = new Surface(datadir + "/images/tiles/worldmap/leveldot_green.png", true); + leveldot_red = new Surface(datadir + "/images/tiles/worldmap/leveldot_red.png", true); + messagedot = new Surface(datadir + "/images/tiles/worldmap/messagedot.png", true); + teleporterdot = new Surface(datadir + "/images/tiles/worldmap/teleporterdot.png", true); name = ""; music = "salcon.mod"; @@ -688,7 +688,6 @@ WorldMap::update(float delta) { PlayerStatus old_player_status = player_status; - std::cout << "Enter the current level: " << level->name << std::endl; // 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); @@ -732,8 +731,6 @@ WorldMap::update(float delta) tux->set_direction(dir); //tux->update(delta); } - - std::cout << "Walk to dir: " << dir << std::endl; } } @@ -772,8 +769,7 @@ WorldMap::update(float delta) context.do_drawing(); - SDL_Event event; - wait_for_event(event,2000,6000,true); + wait_for_event(2.0, 6.0); quit = true; player_status.reset(); @@ -915,7 +911,7 @@ WorldMap::draw_status(DrawingContext& context) Vector(SCREEN_WIDTH - gold_text->get_text_width(str) - tux_life->w, 0), LEFT_ALLIGN, LAYER_FOREGROUND1); context.draw_surface(tux_life, Vector(SCREEN_WIDTH - - gold_text->get_text_width("9"), 0), LEFT_ALLIGN, LAYER_FOREGROUND1); + gold_text->get_text_width("9"), 0), LAYER_FOREGROUND1); } else {