X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftile.h;h=8a0cf8d0bd8bef110f18d78f402d304863c04323;hb=e409aaf88c618c2fc47ff8f9bbe523b8f271c795;hp=ff76569a24c7c03aeb49592f4fe8484dee7dd85e;hpb=2d97548e5cded4b201bbc10d6cec6232df03e9a4;p=supertux.git diff --git a/src/tile.h b/src/tile.h index ff76569a2..8a0cf8d0b 100644 --- a/src/tile.h +++ b/src/tile.h @@ -22,10 +22,8 @@ #include #include "video/surface.h" -#include "utils/lispreader.h" -#include "math/rectangle.h" - -using namespace SuperTux; +#include "math/rect.h" +#include "lisp/lisp.h" /** Tile Class @@ -57,19 +55,29 @@ public: */ GOAL = 0x0100, /** slope tile */ - SLOPE = 0x0200 + SLOPE = 0x0200, + }; + + /// worldmap flags + enum { + WORLDMAP_NORTH = 0x0001, + WORLDMAP_SOUTH = 0x0002, + WORLDMAP_EAST = 0x0004, + WORLDMAP_WEST = 0x0008, + + WORLDMAP_STOP = 0x0010 }; private: unsigned int id; struct ImageSpec { - ImageSpec(const std::string& newfile, const Rectangle& newrect) + ImageSpec(const std::string& newfile, const Rect& newrect) : file(newfile), rect(newrect) { } std::string file; - Rectangle rect; + Rect rect; }; std::vector imagespecs; std::vector images; @@ -82,7 +90,7 @@ private: /** General purpose data attached to a tile (content of a box, type of coin)*/ int data; - + float anim_fps; public: @@ -122,11 +130,11 @@ protected: friend class TileManager; Tile(); - void load_images(); + void load_images(const std::string& tilesetpath); /// parses the tile and returns it's id number - void parse(LispReader& reader); - void parse_images(lisp_object_t* cur); + void parse(const lisp::Lisp& reader); + void parse_images(const lisp::Lisp& cur); }; #endif