ScummVM API documentation
Ultima::Ultima1::Maps::MapBase Class Referenceabstract

#include <map_base.h>

Inheritance diagram for Ultima::Ultima1::Maps::MapBase:
Ultima::Shared::Maps::MapBase Ultima::Ultima1::Maps::MapCityCastle Ultima::Ultima1::Maps::MapDungeon Ultima::Ultima1::Maps::MapOverworld Ultima::Ultima1::Maps::MapCastle Ultima::Ultima1::Maps::MapCity

Public Member Functions

 MapBase (Ultima1Game *game, Ultima1Map *map)
 
 ~MapBase () override
 
void getTileAt (const Point &pt, Shared::Maps::MapTile *tile, bool includePlayer=true) override
 
Shared::Maps::MapWidgetcreateWidget (const Common::String &name) override
 
virtual void drop ()
 
virtual void enter ()
 
virtual void get ()
 
virtual void hyperjump ()
 
virtual void inform ()
 
virtual void climb ()
 
virtual void open ()
 
virtual void steal ()
 
virtual void talk ()
 
virtual void unlock ()
 
virtual void view ()
 
virtual void disembark ()
 
virtual void attack (int direction, int effectId)
 
virtual void attack (int direction, int effectId, uint maxDistance, uint amount, uint agility, const Common::String &hitWidget)=0
 
virtual void board ()
 
virtual void cast ()
 
void castSpell (uint spell) override
 
virtual void dropCoins (uint coins)
 
- Public Member Functions inherited from Ultima::Shared::Maps::MapBase
 MapBase (Game *game, Map *)
 
virtual void synchronize (Common::Serializer &s)
 
void addWidget (MapWidget *widget)
 
void removeWidget (MapWidget *widget)
 
virtual void clear ()
 
virtual void setTileAt (const Point &pt, uint tileId)
 
void resetViewport ()
 
virtual Point getViewportPosition (const Point &viewportSize)
 
virtual void load (MapId mapId)
 
virtual bool changeLevel (int delta)
 
virtual uint getLevel () const
 
virtual bool isMapWrapped () const
 
size_t width () const
 
size_t height () const
 
Point getPosition () const
 
void setPosition (const Point &pt)
 
Direction getDirection () const
 
void setDirection (Direction dir)
 
Point getDirectionDelta () const
 
virtual Point getDeltaPosition (const Point &delta)
 
MapId getMapId () const
 
uint getMapIndex () const
 
uint getMapStyle () const
 
virtual void shiftViewport (const Point &delta)
 
virtual void update ()
 

Protected Attributes

Ultima1Game_game
 
- Protected Attributes inherited from Ultima::Shared::Maps::MapBase
MapId _mapId
 
uint _mapIndex
 
uint _mapStyle
 
ViewportPosition _viewportPos
 
Common::Array< MapCellsRow > _data
 

Additional Inherited Members

- Public Attributes inherited from Ultima::Shared::Maps::MapBase
Point _size
 
Point _tilesPerOrigTile
 
Common::String _name
 
MapWidget_playerWidget
 
WidgetsArray _widgets
 
- Protected Member Functions inherited from Ultima::Shared::Maps::MapBase
void setDimensions (const Point &size)
 
void addInfoMsg (const Common::String &text, bool newLine=true, bool replaceLine=false)
 

Detailed Description

Intermediate base class for Ultima 1 maps

Constructor & Destructor Documentation

◆ MapBase()

Ultima::Ultima1::Maps::MapBase::MapBase ( Ultima1Game game,
Ultima1Map map 
)

Constructor

◆ ~MapBase()

Ultima::Ultima1::Maps::MapBase::~MapBase ( )
inlineoverridevirtual

Destructor

Reimplemented from Ultima::Shared::Maps::MapBase.

Member Function Documentation

◆ getTileAt()

void Ultima::Ultima1::Maps::MapBase::getTileAt ( const Point pt,
Shared::Maps::MapTile tile,
bool  includePlayer = true 
)
overridevirtual

Gets a tile at a given position

Reimplemented from Ultima::Shared::Maps::MapBase.

Reimplemented in Ultima::Ultima1::Maps::MapDungeon, and Ultima::Ultima1::Maps::MapCityCastle.

◆ createWidget()

Shared::Maps::MapWidget* Ultima::Ultima1::Maps::MapBase::createWidget ( const Common::String name)
overridevirtual

Instantiates a widget type by name

Implements Ultima::Shared::Maps::MapBase.

◆ attack() [1/2]

virtual void Ultima::Ultima1::Maps::MapBase::attack ( int  direction,
int  effectId 
)
virtual

Perform an attack

Reimplemented in Ultima::Ultima1::Maps::MapDungeon.

◆ attack() [2/2]

virtual void Ultima::Ultima1::Maps::MapBase::attack ( int  direction,
int  effectId,
uint  maxDistance,
uint  amount,
uint  agility,
const Common::String hitWidget 
)
pure virtual

Perform an attack in a direction

Parameters
directionDirection
effectIdSound effect to play
maxDistanceMaximum distance in the given direction
amountDamage amount
agilityAgility threshold
widgetNa

Implemented in Ultima::Ultima1::Maps::MapDungeon, Ultima::Ultima1::Maps::MapCityCastle, and Ultima::Ultima1::Maps::MapOverworld.

◆ board()

virtual void Ultima::Ultima1::Maps::MapBase::board ( )
virtual

Board a transport

Reimplemented in Ultima::Ultima1::Maps::MapOverworld.

◆ cast()

virtual void Ultima::Ultima1::Maps::MapBase::cast ( )
virtual

Cast a spell

Reimplemented in Ultima::Ultima1::Maps::MapCityCastle.

◆ castSpell()

void Ultima::Ultima1::Maps::MapBase::castSpell ( uint  spell)
overridevirtual

Cast a specific spell

Implements Ultima::Shared::Maps::MapBase.

Reimplemented in Ultima::Ultima1::Maps::MapDungeon.

◆ dropCoins()

virtual void Ultima::Ultima1::Maps::MapBase::dropCoins ( uint  coins)
inlinevirtual

Handles dropping an amount of coins

Reimplemented in Ultima::Ultima1::Maps::MapCastle, and Ultima::Ultima1::Maps::MapCity.


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