X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FTile.h;fp=src%2Fmap%2FTile.h;h=d21de56d25fe2afbdacdc8a4735a06550dd8aaf1;hb=59c4aea0762cbc5f1bf74c5b1b35629408fb92af;hp=0000000000000000000000000000000000000000;hpb=2a1d9169e1f6c2dfe0f93ed40d5fb68d3da342af;p=l2e.git diff --git a/src/map/Tile.h b/src/map/Tile.h new file mode 100644 index 0000000..d21de56 --- /dev/null +++ b/src/map/Tile.h @@ -0,0 +1,51 @@ +/* + * Tile.h + * + * Created on: Sep 29, 2012 + * Author: holy + */ + +#ifndef MAP_TILE_H_ +#define MAP_TILE_H_ + +#include "../geometry/Vector.h" + +#include + +namespace map { + +class Tile { + +public: + Tile(); + ~Tile() { } + +public: + enum Flag { + BLOCK_NORTH = 0x01, + BLOCK_EAST = 0x02, + BLOCK_SOUTH = 0x04, + BLOCK_WEST = 0x08, + }; + + const geometry::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; } + +// temporary setters +public: + void SetOffset(const geometry::Vector &o) { offset = o; } + void SetFlags(Uint32 f) { flags = f; } + +private: + geometry::Vector offset; + Uint32 flags; + +}; + +} + +#endif /* MAP_TILE_H_ */