X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftile.h;h=f943a2395be5ca826a1275396cb0d02d2c91472c;hb=f41a5719a2dc1a50674c69fa511c38a152cc4b03;hp=cf809aa3074702328b9b3f456782afdd13565623;hpb=c79b901309bf5e0544fef1e92d264f51402f4370;p=supertux.git diff --git a/src/tile.h b/src/tile.h index cf809aa30..f943a2395 100644 --- a/src/tile.h +++ b/src/tile.h @@ -23,10 +23,13 @@ #include #include "SDL.h" -#include "screen/surface.h" +#include "video/surface.h" -class Vector; +using namespace SuperTux; + +namespace SuperTux { class LispReader; +} /** Tile Class @@ -38,9 +41,9 @@ public: ~Tile(); /// parses the tile and returns it's id number - int read(LispReader& reader); + void read(LispReader& reader); - int id; + unsigned int id; std::vector images; std::vector editor_images; @@ -67,7 +70,9 @@ public: * if data is 0 then the endsequence should be triggered, if data is 1 * then we can finish the level instantly. */ - GOAL = 0x0100 + GOAL = 0x0100, + /** slope tile */ + SLOPE = 0x0200 }; /** tile attributes */ @@ -80,10 +85,10 @@ public: been collected or jumped at */ int next_tile; - int anim_speed; - - /** Draw a tile on the screen: */ - static void draw(const Vector& pos, unsigned int c, Uint8 alpha = 255); + float anim_fps; + + /** Draw a tile on the screen */ + void draw(DrawingContext& context, const Vector& pos, int layer) const; /// returns the width of the tile in pixels int getWidth() const