ScummVM API documentation
MM::MM1::Maps::Map Class Referenceabstract
Inheritance diagram for MM::MM1::Maps::Map:
MM::MM1::Game::GameLogic MM::MM1::Maps::Map05 MM::MM1::Maps::Map06 MM::MM1::Maps::Map07 MM::MM1::Maps::Map08 MM::MM1::Maps::Map09 MM::MM1::Maps::Map10 MM::MM1::Maps::Map11 MM::MM1::Maps::Map12 MM::MM1::Maps::Map13 MM::MM1::Maps::Map14 MM::MM1::Maps::Map15 MM::MM1::Maps::Map16 MM::MM1::Maps::Map17 MM::MM1::Maps::Map18 MM::MM1::Maps::Map19 MM::MM1::Maps::Map20 MM::MM1::Maps::Map21 MM::MM1::Maps::Map22 MM::MM1::Maps::Map23 MM::MM1::Maps::Map24 MM::MM1::Maps::Map25 MM::MM1::Maps::Map28 MM::MM1::Maps::Map29 MM::MM1::Maps::Map32 MM::MM1::Maps::Map33 MM::MM1::Maps::Map34 MM::MM1::Maps::Map35 MM::MM1::Maps::Map36 MM::MM1::Maps::Map37 MM::MM1::Maps::Map38 MM::MM1::Maps::Map39 MM::MM1::Maps::Map40 MM::MM1::Maps::Map41 MM::MM1::Maps::Map42 MM::MM1::Maps::Map43 MM::MM1::Maps::Map44 MM::MM1::Maps::Map45 MM::MM1::Maps::Map46 MM::MM1::Maps::Map47 MM::MM1::Maps::Map48 MM::MM1::Maps::Map49 MM::MM1::Maps::Map50 MM::MM1::Maps::Map51 MM::MM1::Maps::Map52 MM::MM1::Maps::Map53 MM::MM1::Maps::Map54 MM::MM1::Maps::Map55 MM::MM1::Maps::MapDesert MM::MM1::Maps::MapTown

Public Member Functions

void encounter (const byte *id1, const byte *id2)
 
 Map (uint index, const Common::String &name, uint16 id, byte defaultSection, const char *desc=nullptr)
 
virtual void load ()
 
virtual void special ()=0
 
virtual bool mappingAllowed () const
 
Common::String getName () const
 
Common::String getDescription () const
 
uint16 getId () const
 
byte getDefaultSection () const
 
const byte & operator[] (uint ofs) const
 
byte & operator[] (uint ofs)
 
byte dataByte (uint ofs) const
 
uint16 dataWord (uint16 ofs) const
 
void dataWord (uint16 ofs, uint16 val)
 
bool checkPartyDead ()
 
template<class T >
bool send (const T &msg)
 
template<class T >
bool send (const Common::String &name, const T &msg)
 
uint getMapIndex () const
 
void unlockDoor ()
 
void visitedSpecial ()
 
void visitedExit ()
 
void visitedBusiness ()
 

Static Public Member Functions

static void reduceHP ()
 
static void none160 ()
 
static void updateGame ()
 
static void redrawGame ()
 
- Static Public Member Functions inherited from MM::MM1::Game::GameLogic
static int getRandomNumber (int minNumber, int maxNumber)
 
static int getRandomNumber (int maxNumber)
 

Public Attributes

byte _walls [(16 *16)]
 
byte _states [(16 *16)]
 
uint8 _visited [(16 *16)]
 

Protected Attributes

Common::String _name
 
Common::String _description
 
uint16 _id
 
uint _mapIndex
 
byte _defaultSection
 
Common::Array< byte > _data
 

Member Function Documentation

◆ reduceHP()

static void MM::MM1::Maps::Map::reduceHP ( )
static

Divides all the party's Hp in half

◆ none160()

static void MM::MM1::Maps::Map::none160 ( )
inlinestatic

Many special methods return a 160 key, but it doesn't look like the game uses. My current assumption is that this is just a convenient 'do nothing' return value

◆ encounter()

void MM::MM1::Maps::Map::encounter ( const byte *  id1,
const byte *  id2 
)

Generates an encounter based on the passed id arrays

◆ load()

virtual void MM::MM1::Maps::Map::load ( )
virtual

Loads the map

Reimplemented in MM::MM1::Maps::Map55.

◆ special()

◆ mappingAllowed()

virtual bool MM::MM1::Maps::Map::mappingAllowed ( ) const
inlinevirtual

Returns true if mapping is allowed in enhanced mode. This is to prevent places like the desert where the players shouldn't be able to see where they are

Reimplemented in MM::MM1::Maps::MapDesert.

◆ getName()

Common::String MM::MM1::Maps::Map::getName ( ) const
inline

Gets the map name

◆ getDescription()

Common::String MM::MM1::Maps::Map::getDescription ( ) const
inline

Gets the map description for the map display

◆ getId()

uint16 MM::MM1::Maps::Map::getId ( ) const
inline

Returns the map Id

◆ getDefaultSection()

byte MM::MM1::Maps::Map::getDefaultSection ( ) const
inline

Returns the map default section

◆ operator[]()

const byte& MM::MM1::Maps::Map::operator[] ( uint  ofs) const
inline

Accesses the map data

◆ checkPartyDead()

bool MM::MM1::Maps::Map::checkPartyDead ( )

Checks whether the party is dead or out of action, and if so, switches to the death screen

◆ send()

template<class T >
bool MM::MM1::Maps::Map::send ( const T &  msg)
inline

Send a message to a UI element

◆ getMapIndex()

uint MM::MM1::Maps::Map::getMapIndex ( ) const
inline

Returns the map's index

◆ updateGame()

static void MM::MM1::Maps::Map::updateGame ( )
static

Updates the game display

◆ redrawGame()

static void MM::MM1::Maps::Map::redrawGame ( )
static

Redraw the game display

◆ unlockDoor()

void MM::MM1::Maps::Map::unlockDoor ( )

Unlocks door

◆ visitedSpecial()

void MM::MM1::Maps::Map::visitedSpecial ( )

Visited a special cell

◆ visitedExit()

void MM::MM1::Maps::Map::visitedExit ( )

Visited an exit cell

◆ visitedBusiness()

void MM::MM1::Maps::Map::visitedBusiness ( )

Visited a business cell


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