ScummVM API documentation
Ultima::Ultima1::Widgets::UrbanWidget Class Reference

#include <urban_widget.h>

Inheritance diagram for Ultima::Ultima1::Widgets::UrbanWidget:
Ultima::Shared::Maps::MapWidget Ultima::Shared::MessageTarget Ultima::Shared::BaseObject Ultima::Ultima1::Widgets::Person Ultima::Ultima1::Widgets::Bard Ultima::Ultima1::Widgets::Guard Ultima::Ultima1::Widgets::King Ultima::Ultima1::Widgets::Merchant Ultima::Ultima1::Widgets::UrbanPlayer Ultima::Ultima1::Widgets::Wench Ultima::Ultima1::Widgets::MerchantArmor Ultima::Ultima1::Widgets::MerchantArmour Ultima::Ultima1::Widgets::MerchantGrocer Ultima::Ultima1::Widgets::MerchantMagic Ultima::Ultima1::Widgets::MerchantTavern Ultima::Ultima1::Widgets::MerchantTransport Ultima::Ultima1::Widgets::MerchantWeapons Ultima::Ultima1::Widgets::Princess

Public Member Functions

 UrbanWidget (Shared::Game *game, Shared::Maps::MapBase *map, uint tileNum)
 
 ~UrbanWidget () override
 
uint getTileNum () const override
 
CanMove canMoveTo (const Point &destPos) override
 
void synchronize (Common::Serializer &s) override
 
- Public Member Functions inherited from Ultima::Shared::Maps::MapWidget
 MapWidget (Game *game, MapBase *map)
 
 MapWidget (Game *game, MapBase *map, const Point &pt, Direction dir=DIR_NONE)
 
 MapWidget (Game *game, MapBase *map, const Common::String &name, const Point &pt, Direction dir=DIR_NONE)
 
 ~MapWidget () override
 
virtual const char * getClassName () const
 
void addInfoMsg (const Common::String &text, bool newLine=true, bool replaceLine=false)
 
virtual bool isBlocking () const
 
virtual void update (bool isPreUpdate)
 
virtual void moveTo (const Point &destPos, Direction dir=DIR_NONE)
 
- Public Member Functions inherited from Ultima::Shared::BaseObject
virtual ::Ultima::Shared::ClassDef getType () const
 
bool isInstanceOf (const ClassDef &classDef) const
 

Protected Member Functions

bool moveBy (const Point &delta)
 
- Protected Member Functions inherited from Ultima::Shared::MessageTarget
virtual const Ultima::Shared::MSGMAPgetMessageMap () const
 

Protected Attributes

 CLASSDEF
 
- Protected Attributes inherited from Ultima::Shared::Maps::MapWidget
Game_game
 
MapBase_map
 

Additional Inherited Members

- Public Types inherited from Ultima::Shared::Maps::MapWidget
enum  CanMove { UNSET = 0, YES = 1, NO = 2 }
 
- Static Public Member Functions inherited from Ultima::Shared::Maps::MapWidget
static Direction directionFromKey (Common::KeyCode keycode)
 
- Static Public Member Functions inherited from Ultima::Shared::BaseObject
::Ultima::Shared::ClassDef type ()
 
- Public Attributes inherited from Ultima::Shared::Maps::MapWidget
Point _position
 
Direction _direction
 
Common::String _name
 
 CLASSDEF
 
- Public Attributes inherited from Ultima::Shared::MessageTarget
 CLASSDEF
 
- Static Protected Member Functions inherited from Ultima::Shared::MessageTarget
static const Ultima::Shared::MSGMAPgetThisMessageMap ()
 

Detailed Description

Base class for widgets in urban maps

Constructor & Destructor Documentation

◆ UrbanWidget()

Ultima::Ultima1::Widgets::UrbanWidget::UrbanWidget ( Shared::Game game,
Shared::Maps::MapBase map,
uint  tileNum 
)
inline

Constructor

◆ ~UrbanWidget()

Ultima::Ultima1::Widgets::UrbanWidget::~UrbanWidget ( )
inlineoverride

Destructor

Member Function Documentation

◆ moveBy()

bool Ultima::Ultima1::Widgets::UrbanWidget::moveBy ( const Point delta)
protected

Moves by a given delta if the destination is available

Parameters
deltaDelta to move character by
Returns
True if the move was able to be done

◆ getTileNum()

uint Ultima::Ultima1::Widgets::UrbanWidget::getTileNum ( ) const
inlineoverridevirtual

Get the tile number for the person

Reimplemented from Ultima::Shared::Maps::MapWidget.

◆ canMoveTo()

CanMove Ultima::Ultima1::Widgets::UrbanWidget::canMoveTo ( const Point destPos)
overridevirtual

Returns true if the given widget can move to a given position on the map

Reimplemented from Ultima::Shared::Maps::MapWidget.

◆ synchronize()

void Ultima::Ultima1::Widgets::UrbanWidget::synchronize ( Common::Serializer s)
overridevirtual

Handles loading and saving games

Reimplemented from Ultima::Shared::Maps::MapWidget.


The documentation for this class was generated from the following file: