ScummVM API documentation
Ultima::Ultima3::Data::Map Class Reference

#include <map.h>

Public Member Functions

byte & extra (int index)
 
void load (const char *filename)
 
bool load (Common::SeekableReadStream &src)
 
void save (Common::WriteStream &dest)
 
void synchronize (Common::Serializer &s)
 
byte cell (int x, int y) const
 
void setCell (int x, int y, byte value)
 
const char * text (int index) const
 
byte tile (int x, int y) const
 

Static Public Member Functions

static bool exists (const char *filename)
 

Public Attributes

Creatures _creatures
 

Detailed Description

A 64x64 location map, as used by the overworld, towns and castles. Each cell holds a tile number multiplied by 4. The rest of a location's data, which includes the things said there, follows it

Member Function Documentation

◆ extra()

byte & Ultima::Ultima3::Data::Map::extra ( int  index)
inline

Returns one of the bytes held after the creatures, which on the world map give where the whirlpool is and the way it is heading

◆ exists()

static bool Ultima::Ultima3::Data::Map::exists ( const char *  filename)
static

Returns true if a location data file exists

◆ load() [1/2]

void Ultima::Ultima3::Data::Map::load ( const char *  filename)

Loads a location from a .ULT file

◆ load() [2/2]

bool Ultima::Ultima3::Data::Map::load ( Common::SeekableReadStream &  src)

Loads a location from a stream in the form of a .ULT file

Returns
False if the stream is too short

◆ save()

void Ultima::Ultima3::Data::Map::save ( Common::WriteStream &  dest)

Writes a location out in the form of a .ULT file

◆ cell()

byte Ultima::Ultima3::Data::Map::cell ( int  x,
int  y 
) const
inline

Returns the raw cell value. The coordinates wrap around the map

◆ text()

const char * Ultima::Ultima3::Data::Map::text ( int  index) const

Returns one of the pieces of text kept with a town, which are what its people and signs say, or null if there isn't one

◆ tile()

byte Ultima::Ultima3::Data::Map::tile ( int  x,
int  y 
) const
inline

Returns the number of the tile graphic in a cell


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