ScummVM API documentation
Ultima::Ultima4::Location Class Reference
Inheritance diagram for Ultima::Ultima4::Location:
Ultima::Ultima4::Observable< Location *, MoveEvent &>

Public Member Functions

 Location (MapCoords coords, Map *map, int viewmode, LocationContext ctx, TurnCompleter *turnCompleter, Location *prev)
 
Std::vector< MapTiletilesAt (MapCoords coords, bool &focus)
 
TileId getReplacementTile (MapCoords atCoords, Tile const *forTile)
 
int getCurrentPosition (MapCoords *coords)
 
MoveResult move (Direction dir, bool userEvent)
 
- Public Member Functions inherited from Ultima::Ultima4::Observable< Location *, MoveEvent &>
void addObserver (Observer< Location *, MoveEvent & > *o)
 
int countObservers () const
 
void deleteObserver (Observer< Location *, MoveEvent & > *o)
 
void deleteObservers ()
 
bool hasChanged () const
 
void notifyObservers (MoveEvent & arg)
 

Public Attributes

MapCoords _coords
 
Map_map
 
int _viewMode
 
LocationContext _context
 
TurnCompleter_turnCompleter
 
Location_prev
 

Additional Inherited Members

- Protected Member Functions inherited from Ultima::Ultima4::Observable< Location *, MoveEvent &>
void clearChanged ()
 
void setChanged ()
 

Constructor & Destructor Documentation

◆ Location()

Ultima::Ultima4::Location::Location ( MapCoords  coords,
Map map,
int  viewmode,
LocationContext  ctx,
TurnCompleter turnCompleter,
Location prev 
)

Add a new location to the stack, or start a new stack if 'prev' is nullptr

Member Function Documentation

◆ tilesAt()

Std::vector<MapTile> Ultima::Ultima4::Location::tilesAt ( MapCoords  coords,
bool &  focus 
)

Return the entire stack of objects at the given location.

◆ getReplacementTile()

TileId Ultima::Ultima4::Location::getReplacementTile ( MapCoords  atCoords,
Tile const *  forTile 
)

Finds a valid replacement tile for the given location, using surrounding tiles as guidelines to choose the new tile. The new tile will only be chosen if it is marked as a valid replacement (or waterReplacement) tile in tiles.xml. If a valid replacement cannot be found, it returns a "best guess" tile.

◆ getCurrentPosition()

int Ultima::Ultima4::Location::getCurrentPosition ( MapCoords coords)

Returns the current coordinates of the location given: If in combat - returns the coordinates of party member with focus If elsewhere - returns the coordinates of the avatar


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