 |
Cytopia
0.3
A city building simulation game
|
Go to the documentation of this file.
11 #include "../Sprite.hxx"
12 #include "../common/enums.hxx"
13 #include "../basics/Point.hxx"
15 #include "../TileManager.hxx"
80 void setBitmask(
unsigned char elevationBitmask, std::vector<uint8_t> tileTypeBitmask);
Sprite * getSprite() const
get Sprite
MapNode(MapNode &&mn) noexcept
Move constructor.
void setZIndex(int zIndex)
Update the Z-Index of this mapNode.
const MapNodeData & getMapNodeDataForLayer(Layer layer) const
const Point & getCoordinates() const
get iso coordinates of this node
Layer getTopMostActiveLayer() const
return topmost active layer.
@ NONE
0- this must be FIRST !!!
~MapNode()=default
Destroys the MapNode object.
const bool isConductive() const
check the conductivity of the node
static const int maxHeight
Maximum height of the node.
bool isPlacementAllowed(const std::string &newTileID) const
const TileData * getTileData(Layer layer) const
std::vector< TileOrientation > m_autotileOrientation
unsigned char m_elevationBitmask
const std::vector< MapNodeData > & getMapNodeData() const
std::unique_ptr< Sprite > m_sprite
void demolishLayer(const Layer &layer)
demolish specific layer of a Node.
void updateTexture(const Layer &layer=Layer::NONE)
Update texture.
void demolishNode(const Layer &layer=Layer::NONE)
Demolish a node.
void render() const
Render MapNode.
bool isSlopeNode(void) const
check if current Node Terrain is Slope Terrain.
Class that holds map nodes.
unsigned char getElevationBitmask() const
@ BUILDINGS
8- Buildings, Streets and everything that goes on the terrain
size_t m_elevationOrientation
static constexpr Point INVALID()
const Point & getOrigCornerPoint(Layer layer) const
Get the Origin Corner Point of a multitile building.
void setElevationBitMask(const unsigned char bitMask)
Set elevation bit mask.
std::vector< MapNodeData > m_mapNodeData
bool isOriginNode(Layer layer=Layer::BUILDINGS) const
If this is the origin node of a multitile building.
void setNodeTransparency(const float transparencyFactor, const Layer &layer) const
Sets a node to be Transparent.
const std::string & getTileID(Layer layer) const
get TileID of specific layer inside NodeData.
std::vector< unsigned char > m_autotileBitmask
std::string m_previousTileID
bool changeHeight(const bool higher)
Change Height.
MapNode(Point isoCoordinates, const std::string &terrainID, const std::string &newTileID="")
void setMapNodeData(std::vector< MapNodeData > &&mapNodeData)
Overwrite m_mapData with the one loaded from a savegame. This function to be used only by loadGame.
bool isPlacableOnSlope(const std::string &tileID) const
check if tileID placeable on slope tile.
void setBitmask(unsigned char elevationBitmask, std::vector< uint8_t > tileTypeBitmask)
void setAutotileBitMask(std::vector< unsigned char > &&bitMask)
Set autotile bit mask.
const MapNodeData & getActiveMapNodeData() const
bool isLayerOccupied(const Layer &layer) const
Holds all releavted information to this specific tile.
void setTileID(const std::string &tileType, const Point &origPoint)
void setCoordinates(const Point &newIsoCoordinates)
sets the iso coordinates of this node