fix redraw at top-left of map
[Tsunagari.git] / src / player.h
blobeba4b67361be5b7ba1afdbc24cb0856f8f3f3446
1 /******************************
2 ** Tsunagari Tile Engine **
3 ** player.h **
4 ** Copyright 2011 OmegaSDG **
5 ******************************/
7 #ifndef PLAYER_H
8 #define PLAYER_H
10 #include "entity.h"
12 class Player : public Entity
14 public:
15 Player(Resourcer* rc, Area* area);
17 //! Smooth continuous movement.
18 void startMovement(coord_t delta);
19 void stopMovement(coord_t delta);
21 //! Move the player by dx, dy. Not guaranteed to be smooth if called
22 // on each update().
23 void moveByTile(coord_t delta);
25 protected:
26 void preMove(coord_t delta);
27 void postMove();
29 private:
30 void normalizeVelocity();
32 //! Stores intent to move continuously in some direction.
33 coord_t velocity;
36 #endif