ScummVM API documentation
Ultima::Ultima1::Maps::MapDungeon Class Reference

#include <map_dungeon.h>

Inheritance diagram for Ultima::Ultima1::Maps::MapDungeon:
Ultima::Ultima1::Maps::MapBase Ultima::Shared::Maps::MapBase

Public Member Functions

 MapDungeon (Ultima1Game *game, Ultima1Map *map)
 
void synchronize (Common::Serializer &s) override
 
void load (Shared::Maps::MapId mapId) override
 
void getTileAt (const Point &pt, Shared::Maps::MapTile *tile, bool includePlayer=true) override
 
bool changeLevel (int delta) override
 
uint getLevel () const override
 
void update () override
 
void spawnMonster ()
 
void spawnMonsterAt (const Point &pt)
 
Widgets::DungeonMonsterfindCreatureInCurrentDirection (uint maxDistance=5)
 
void attack (int direction, int effectId) override
 
void attack (int direction, int effectId, uint maxDistance, uint amount, uint agility, const Common::String &hitWidget) override
 
void inform () override
 
void climb () override
 
void open () override
 
void unlock () override
 
void castSpell (uint spell) override
 
- Public Member Functions inherited from Ultima::Ultima1::Maps::MapBase
 MapBase (Ultima1Game *game, Ultima1Map *map)
 
 ~MapBase () override
 
Shared::Maps::MapWidgetcreateWidget (const Common::String &name) override
 
virtual void drop ()
 
virtual void enter ()
 
virtual void get ()
 
virtual void hyperjump ()
 
virtual void steal ()
 
virtual void talk ()
 
virtual void view ()
 
virtual void disembark ()
 
virtual void board ()
 
virtual void cast ()
 
virtual void dropCoins (uint coins)
 
- Public Member Functions inherited from Ultima::Shared::Maps::MapBase
 MapBase (Game *game, Map *)
 
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 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)
 

Public Attributes

uint _dungeonExitHitPoints
 
- Public Attributes inherited from Ultima::Shared::Maps::MapBase
Point _size
 
Point _tilesPerOrigTile
 
Common::String _name
 
MapWidget_playerWidget
 
WidgetsArray _widgets
 

Additional Inherited Members

- 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)
 
- Protected Attributes inherited from Ultima::Ultima1::Maps::MapBase
Ultima1Game_game
 
- Protected Attributes inherited from Ultima::Shared::Maps::MapBase
MapId _mapId
 
uint _mapIndex
 
uint _mapStyle
 
ViewportPosition _viewportPos
 
Common::Array< MapCellsRow > _data
 

Detailed Description

Implements the dungeon map

Member Function Documentation

◆ synchronize()

void Ultima::Ultima1::Maps::MapDungeon::synchronize ( Common::Serializer s)
overridevirtual

Handles loading and saving viewport

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

◆ load()

void Ultima::Ultima1::Maps::MapDungeon::load ( Shared::Maps::MapId  mapId)
overridevirtual

Load the map

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

◆ getTileAt()

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

Gets a tile at a given position

Reimplemented from Ultima::Ultima1::Maps::MapBase.

◆ changeLevel()

bool Ultima::Ultima1::Maps::MapDungeon::changeLevel ( int  delta)
overridevirtual

Changes the dungeon level by a given delta amount, and generates a new map

Parameters
deltaDelta to change dungeon level by
Returns
False if dungeon left, true if still within dungeon

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

◆ getLevel()

uint Ultima::Ultima1::Maps::MapDungeon::getLevel ( ) const
inlineoverridevirtual

Get the current map level

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

◆ update()

void Ultima::Ultima1::Maps::MapDungeon::update ( )
overridevirtual

Updates the map at the end of a turn

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

◆ spawnMonster()

void Ultima::Ultima1::Maps::MapDungeon::spawnMonster ( )

Spawns a monster within dungeons

◆ spawnMonsterAt()

void Ultima::Ultima1::Maps::MapDungeon::spawnMonsterAt ( const Point pt)

Spawns a monster at a given position in the dungeon map

◆ findCreatureInCurrentDirection()

Widgets::DungeonMonster* Ultima::Ultima1::Maps::MapDungeon::findCreatureInCurrentDirection ( uint  maxDistance = 5)

Find a monster in the current direction being faced

◆ attack() [1/2]

void Ultima::Ultima1::Maps::MapDungeon::attack ( int  direction,
int  effectId 
)
overridevirtual

Perform an attack in a direction

Parameters
directionDirection
effectIdSound effect to play

Reimplemented from Ultima::Ultima1::Maps::MapBase.

◆ attack() [2/2]

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

Perform an attack in a direction

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

Implements Ultima::Ultima1::Maps::MapBase.

◆ inform()

void Ultima::Ultima1::Maps::MapDungeon::inform ( )
overridevirtual

Do an inform action

Reimplemented from Ultima::Ultima1::Maps::MapBase.

◆ climb()

void Ultima::Ultima1::Maps::MapDungeon::climb ( )
overridevirtual

Do a climb action

Reimplemented from Ultima::Ultima1::Maps::MapBase.

◆ open()

void Ultima::Ultima1::Maps::MapDungeon::open ( )
overridevirtual

Do an open action

Reimplemented from Ultima::Ultima1::Maps::MapBase.

◆ unlock()

void Ultima::Ultima1::Maps::MapDungeon::unlock ( )
inlineoverridevirtual

Do an unlock action

Reimplemented from Ultima::Ultima1::Maps::MapBase.

◆ castSpell()

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

Cast a specific spell

Reimplemented from Ultima::Ultima1::Maps::MapBase.


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