X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FTile.h;h=34481f315e01119af4ff50fbc2c9ee670a6f274d;hb=d97b7038c28058a76e7214e0dce0394fd8b67cff;hp=06b3b1175b62ae315c5c5c3054e7b4e7eb051bc4;hpb=0ad5ca97b5df217329bc319d62564a9f46ba11d7;p=l2e.git diff --git a/src/map/Tile.h b/src/map/Tile.h index 06b3b11..34481f3 100644 --- a/src/map/Tile.h +++ b/src/map/Tile.h @@ -1,14 +1,7 @@ -/* - * Tile.h - * - * Created on: Sep 29, 2012 - * Author: holy - */ - #ifndef MAP_TILE_H_ #define MAP_TILE_H_ -#include "../geometry/Vector.h" +#include "../math/Vector.h" #include @@ -16,6 +9,9 @@ namespace map { class Tile { +public: + static const int TYPE_ID = 603; + public: Tile(); ~Tile() { } @@ -26,29 +22,38 @@ public: BLOCK_EAST = 0x02, BLOCK_SOUTH = 0x04, BLOCK_WEST = 0x08, + LADDER = 0x10, }; SDL_Surface *BattleBackground() { return battlebg; } - const geometry::Vector &Offset() const { return offset; } + const math::Vector &Offset() const { return offset; } bool BlocksNorth() const { return flags & BLOCK_NORTH; } bool BlocksEast() const { return flags & BLOCK_EAST; } bool BlocksSouth() const { return flags & BLOCK_SOUTH; } bool BlocksWest() const { return flags & BLOCK_WEST; } + bool IsLadder() const { return flags & LADDER; } + + int NumFrames() const { return frames; } + + static void CreateTypeDescription(); + static void Construct(void *); + // temporary setters public: - Tile &SetOffset(const geometry::Vector &o) { offset = o; return *this; } + Tile &SetOffset(const math::Vector &o) { offset = o; return *this; } Tile &SetFlags(Uint32 f) { flags = f; return *this; } private: SDL_Surface *battlebg; - geometry::Vector offset; - Uint32 flags; + math::Vector offset; + int flags; + int frames; }; } -#endif /* MAP_TILE_H_ */ +#endif