-/*
- * 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 <SDL.h>
class Tile {
+public:
+ static const int TYPE_ID = 603;
+
public:
Tile();
~Tile() { }
BLOCK_EAST = 0x02,
BLOCK_SOUTH = 0x04,
BLOCK_WEST = 0x08,
+ LADDER = 0x10,
};
SDL_Surface *BattleBackground() { return battlebg; }
- const geometry::Vector<int> &Offset() const { return offset; }
+ const math::Vector<int> &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<int> &o) { offset = o; return *this; }
+ Tile &SetOffset(const math::Vector<int> &o) { offset = o; return *this; }
Tile &SetFlags(Uint32 f) { flags = f; return *this; }
private:
SDL_Surface *battlebg;
- geometry::Vector<int> offset;
- Uint32 flags;
+ math::Vector<int> offset;
+ int flags;
+ int frames;
};
}
-#endif /* MAP_TILE_H_ */
+#endif