#include <map.h>
Public Types | |
enum | CanMove { UNSET = 0, YES = 1, NO = 2 } |
Public Member Functions | |
MapWidget (Game *game, Map::MapBase *map) | |
MapWidget (Game *game, Map::MapBase *map, const Point &pt, Direction dir=DIR_NONE) | |
MapWidget (Game *game, Map::MapBase *map, const Common::String &name, const Point &pt, Direction dir=DIR_NONE) | |
virtual | ~MapWidget () |
virtual const char * | getClassName () const |
virtual void | synchronize (Common::Serializer &s) |
void | addInfoMsg (const Common::String &text, bool newLine=true) |
virtual uint | getTileNum () const |
virtual bool | isBlocking () const |
virtual void | update (bool isPreUpdate) |
virtual CanMove | canMoveTo (const Point &destPos) |
virtual void | moveTo (const Point &destPos, Direction dir=DIR_NONE) |
Public Attributes | |
Point | _position |
Direction | _direction |
Common::String | _name |
Protected Attributes | |
Game * | _game |
Map::MapBase * | _map |
Base class for things that appear within a map, such as monsters, transports, or people
|
inline |
Constructor
|
inlinevirtual |
Destructor
|
inlinevirtual |
Return a name for a widget class if it can be synchronized to savegames
|
virtual |
Handles loading and saving games
Reimplemented in Ultima::Shared::Creature.
void Ultima::Shared::MapWidget::addInfoMsg | ( | const Common::String & | text, |
bool | newLine = true |
||
) |
Adds a text string to the info area
text | Text to add |
newLine | Whether to apply a newline at the end |
|
inlinevirtual |
Get the tile for the widget
Reimplemented in Ultima::Ultima1::WidgetPlayer.
|
inlinevirtual |
Returns true if the player can move onto a tile the widget occupies
|
inlinevirtual |
Called to update the widget at the end of a turn
isPreUpdate | Update is called twice in succession during the end of turn update. Once with true for all widgets, then with it false |
Reimplemented in Ultima::Shared::Creature.
|
virtual |
Returns true if the given widget can move to a given position on the map
|
virtual |
Moves the widget to a given position
destPos | Specified new position |
dir | Optional explicit direction to set. If not specified, the direction will be set relative to the position moved from |