19 #ifndef OPENXCOM_MAPBLOCK_H
20 #define OPENXCOM_MAPBLOCK_H
23 #include <yaml-cpp/yaml.h>
28 enum MapBlockType {MT_UNDEFINED = -1, MT_DEFAULT, MT_LANDINGZONE, MT_EWROAD, MT_NSROAD, MT_CROSSING, MT_DIRT, MT_XCOMSPAWN, MT_UBASECOMM, MT_FINALCOMM };
41 int _size_x, _size_y, _size_z;
42 MapBlockType _type, _subType;
43 int _frequency, _timesUsed, _maxCount;
45 MapBlock(std::string name,
int size_x,
int size_y, MapBlockType type);
48 void load(
const YAML::Node& node);
~MapBlock()
MapBlock desctruction.
Definition: MapBlock.cpp:34
MapBlockType getType() const
Returns whether this mapblock is a landingzone.
Definition: MapBlock.cpp:105
Represents a Terrain Map Block.
Definition: MapBlock.h:37
void reset()
Resets remaining uses.
Definition: MapBlock.cpp:153
void setSizeZ(int size_z)
Sets the mapblock's z size.
Definition: MapBlock.cpp:87
MapBlock(std::string name, int size_x, int size_y, MapBlockType type)
MapBlock construction.
Definition: MapBlock.cpp:27
std::string getName() const
Gets the mapblock's name (used for MAP generation).
Definition: MapBlock.cpp:60
int getRemainingUses()
Gets either remaining uses or frequency.
Definition: MapBlock.cpp:125
int getSizeY() const
Gets the mapblock's y size.
Definition: MapBlock.cpp:78
MapBlockType getSubType() const
Returns whether this mapblock is a landingzone.
Definition: MapBlock.cpp:114
void load(const YAML::Node &node)
Loads the map block from YAML.
Definition: MapBlock.cpp:42
int getSizeZ() const
Gets the mapblock's z size.
Definition: MapBlock.cpp:96
void markUsed()
Decreases remaining uses.
Definition: MapBlock.cpp:137
int getSizeX() const
Gets the mapblock's x size.
Definition: MapBlock.cpp:69