X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fworldmap.h;h=9968ce048b505fdb51901f9814ca783dfa9e9f31;hb=e59a8e5e758978341d5410f09b705c4e969dc9a0;hp=b347bc928c55f03ef9774afce63a8b23bca3e648;hpb=7d3e916fd2af697e7aa24e739d9adfd30aeb58a5;p=supertux.git diff --git a/src/worldmap.h b/src/worldmap.h index b347bc928..9968ce048 100644 --- a/src/worldmap.h +++ b/src/worldmap.h @@ -23,6 +23,8 @@ #include #include +#include + namespace WorldMapNS { struct Point @@ -44,13 +46,6 @@ struct Point int y; }; -struct Level -{ - int x; - int y; - std::string name; -}; - struct Tile { texture_type sprite; @@ -128,6 +123,13 @@ private: int width; int height; + struct Level + { + int x; + int y; + std::string name; + }; + typedef std::vector Levels; Levels levels; @@ -155,7 +157,10 @@ public: Point get_next_tile(Point pos, Direction direction); Tile* at(Point pos); - bool path_ok(Direction direction, Point old_pos, Point* new_pos); + + /** Check if it is possible to walk from \a pos into \a direction, + if possible, write the new position to \a new_pos */ + bool path_ok(Direction direction, Point pos, Point* new_pos); }; } // namespace WorldMapNS