OpenXcom  1.0
Open-source clone of the original X-Com
Public Member Functions | List of all members
OpenXcom::MapBlock Class Reference

Represents a Terrain Map Block. More...

#include <MapBlock.h>

Public Member Functions

 MapBlock (const std::string &name)
 MapBlock construction.
 
 ~MapBlock ()
 MapBlock destruction.
 
void load (const YAML::Node &node)
 Loads the map block from YAML. More...
 
std::string getName () const
 Gets the mapblock's name (used for MAP generation). More...
 
int getSizeX () const
 Gets the mapblock's x size. More...
 
int getSizeY () const
 Gets the mapblock's y size. More...
 
int getSizeZ () const
 Gets the mapblock's z size. More...
 
void setSizeZ (int size_z)
 Sets the mapblock's z size. More...
 
bool isInGroup (int group)
 Returns if this mapblock is from the group specified. More...
 
bool isFloorRevealed (int floor)
 Gets if this floor should be revealed or not.
 
std::map< std::string, std::vector< Position > > * getItems ()
 Gets the layout for any items that belong in this map block. More...
 

Detailed Description

Represents a Terrain Map Block.

It contains constant info about this mapblock, like its name, dimensions, attributes... Map blocks are stored in RuleTerrain objects.

See also
http://www.ufopaedia.org/index.php?title=MAPS_Terrain

Member Function Documentation

◆ getItems()

std::map< std::string, std::vector< Position > > * OpenXcom::MapBlock::getItems ( )

Gets the layout for any items that belong in this map block.

Gets the items and their positioning for any items associated with this block.

Returns
the items and their positions.

◆ getName()

std::string OpenXcom::MapBlock::getName ( ) const

Gets the mapblock's name (used for MAP generation).

Gets the MapBlock name (string).

Returns
The name.

◆ getSizeX()

int OpenXcom::MapBlock::getSizeX ( ) const

Gets the mapblock's x size.

Gets the MapBlock size x.

Returns
The size x in tiles.

◆ getSizeY()

int OpenXcom::MapBlock::getSizeY ( ) const

Gets the mapblock's y size.

Gets the MapBlock size y.

Returns
The size y in tiles.

◆ getSizeZ()

int OpenXcom::MapBlock::getSizeZ ( ) const

Gets the mapblock's z size.

Gets the MapBlock size z.

Returns
The size z.

◆ isInGroup()

bool OpenXcom::MapBlock::isInGroup ( int  group)

Returns if this mapblock is from the group specified.

Gets the type of mapblock.

Returns
The mapblock's type.

◆ load()

void OpenXcom::MapBlock::load ( const YAML::Node &  node)

Loads the map block from YAML.

Loads the map block from a YAML file.

Parameters
nodeYAML node.

◆ setSizeZ()

void OpenXcom::MapBlock::setSizeZ ( int  size_z)

Sets the mapblock's z size.

Sets the MapBlock size z.

Parameters
size_zThe size z.

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