1 /******************************
2 ** Tsunagari Tile Engine **
4 ** Copyright 2011 OmegaSDG **
5 ******************************/
12 #include <boost/scoped_ptr.hpp>
22 This class handles dynamic game objects, such as monsters, NPCs, and
28 //! Entity Constructor
29 Entity(Resourcer
* rc
, Area
* area
, const std::string
& descriptor
);
34 //! Entity Initializer
41 bool needsRedraw() const;
43 //! Retrieve entity's absolute position.
44 coord_t
getCoordsByPixel();
46 //! Retrieve entity's tile position.
47 coord_t
getCoordsByTile();
49 //! Move the entity by dx, dy.
50 virtual void moveByTile(coord_t delta
);
52 //! Set location to Tile at {x, y, z}.
53 void setCoordsByTile(coord_t pos
);
55 //! Sets the Area object this entity will ask when looking for
56 // nearby Tiles. Doesn't change x,y,z position.
57 void setArea(Area
* area
);
60 bool processDescriptor();
61 bool processPlayerDescriptor(const xmlNode
* root
);
63 virtual void postMove();
74 const std::string descriptor
;
75 std::string spriteDescriptor
;