OpenXcom
1.0
Open-source clone of the original X-Com
|
Represents a Terrain Map Block. More...
#include <MapBlock.h>
Public Member Functions | |
MapBlock (std::string name, int size_x, int size_y, MapBlockType type) | |
MapBlock construction. | |
~MapBlock () | |
MapBlock desctruction. | |
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... | |
MapBlockType | getType () const |
Returns whether this mapblock is a landingzone. More... | |
MapBlockType | getSubType () const |
Returns whether this mapblock is a landingzone. More... | |
int | getRemainingUses () |
Gets either remaining uses or frequency. More... | |
void | markUsed () |
Decreases remaining uses. More... | |
void | reset () |
Resets remaining uses. More... | |
Represents a Terrain Map Block.
It contains constant info about this mapblock, like its name, dimensions, attributes... Map blocks are stored in RuleTerrain objects.
std::string OpenXcom::MapBlock::getName | ( | ) | const |
Gets the mapblock's name (used for MAP generation).
Gets the MapBlock name (string).
int OpenXcom::MapBlock::getRemainingUses | ( | ) |
Gets either remaining uses or frequency.
Gets either the remaining uses of the mapblock OR THE FREQUENCY! Remaining limits the number of times a mapblock occurs.
Frequency increases the odds of a mapblock occuring.
int OpenXcom::MapBlock::getSizeX | ( | ) | const |
int OpenXcom::MapBlock::getSizeY | ( | ) | const |
int OpenXcom::MapBlock::getSizeZ | ( | ) | const |
MapBlockType OpenXcom::MapBlock::getSubType | ( | ) | const |
Returns whether this mapblock is a landingzone.
Gets the secondary type of the mapblock, if the primary type is occupied.
MapBlockType OpenXcom::MapBlock::getType | ( | ) | const |
Returns whether this mapblock is a landingzone.
Gets the type of mapblock.
void OpenXcom::MapBlock::load | ( | const YAML::Node & | node | ) |
Loads the map block from YAML.
Loads the map block from a YAML file.
node | YAML node. |
void OpenXcom::MapBlock::markUsed | ( | ) |
Decreases remaining uses.
Decreases the remaining uses of a mapblock for this session.
void OpenXcom::MapBlock::reset | ( | ) |
Resets remaining uses.
Resets the remaining uses of a mapblock for this session.
void OpenXcom::MapBlock::setSizeZ | ( | int | size_z | ) |