Made lua run under MSWin with Dev-Cpp 4.9.9.2
[sdlbotor.git] / Player.h
blob7e2d20682e4920924950b1ed2d11127577ca60be
1 #ifndef PLAYER_H
2 #define PLAYER_H
4 #include "LivingMapObject.h"
5 #include "DAnimation.h"
6 #include "Inventory.h"
8 namespace botor
11 class Object;
13 class Player : public LivingMapObject
16 private:
18 unsigned int lives;
20 anim_t *p_ani_idle;
21 anim_t *p_ani_walking;
23 anim_t ani_idle;
24 anim_t ani_walking;
26 anim_t ani_immuneIdle;
27 anim_t ani_immuneWalking;
29 DAnimation *ani_player;
31 Inventory inv;
33 static Tileset PLAYER_TILESET;
35 protected:
38 bool immune;
40 public:
42 static const float PLAYER_SPEED = 0.1f;
44 public:
46 Player( Uint8 X = 0, Uint8 Y = 0 );
47 // ~Player();
49 private:
51 void InitWalking( Sint8 X, Sint8 Y );
55 protected:
57 float SPEED();
59 bool isWalkable( Uint8 X, Uint8 Y );
61 public:
63 virtual void Draw( );
65 void HandleInput( SDL_Event *event );
67 void OnTile( Tile *t );
68 void OnDead();
70 void ResetPlayer();
72 void Pickup( Object *o );
73 void Drop( Object *o );
74 void Use( Object *o );
76 void SetImmune( bool newstate );
78 unsigned int getLives();
85 #endif