X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Ftile.h;h=f943a2395be5ca826a1275396cb0d02d2c91472c;hb=763454f90866bd4e7db95e5884c48a25d6b9bda1;hp=d1f929bc78f38e0ae93a9a89f5d9a78db763c76a;hpb=e786c13bee9823a3d346acf309e490d384e45803;p=supertux.git diff --git a/src/tile.h b/src/tile.h index d1f929bc7..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,13 +85,10 @@ public: been collected or jumped at */ int next_tile; - int anim_speed; + float anim_fps; - /** This is the angle of the slope. Set to 0, if this is no slope. */ - float slope_angle; - - /** Draw a tile on the screen: */ - static void draw(const Vector& pos, unsigned int c, Uint8 alpha = 255); + /** 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