Removed O.* files for old object descriptors
[sdlbotor.git] / MapObject.h
blob23199b64bc2282c36143f0915555a8d95a41308b
1 #ifndef MAPOBJECT_H
2 #define MAPOBJECT_H
4 //#include "sdlinclude.h"
6 #include "drawable.h"
7 #include "Tile.h"
9 namespace botor
12 class MapObject
15 protected:
17 Uint8 mapX, mapY;
19 Sint8 vX,vY;
20 float movementX, movementY;
21 float speed;
23 bool walking;
24 bool moving;
26 Drawable *graphic;
28 public:
30 MapObject( Uint8 mapX = 0, Uint8 mapY = 0, Drawable *graphic = 0 );
31 virtual ~MapObject();
33 protected:
35 void UpdatePosition();
36 virtual void StartMovement();
38 virtual float SPEED() = 0;
40 public:
42 virtual bool isWalkable( Uint8 X, Uint8 Y );
44 virtual void Initialize();
45 virtual void DeInitialize();
47 virtual void Update();
48 virtual void Draw();
51 //callbacks
52 virtual void OnTile( Tile *t );
54 void Teleport( Uint8 mapX, Uint8 mapY, Uint16 room = 0 );
56 Uint8 getMapX();
57 Uint8 getMapY();
59 bool Walking();
61 void setGraphic( Drawable *graphic );
62 Drawable *getGraphic( );
67 #endif