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

Represents the relations between a Geoscape texture and the corresponding Battlescape mission attributes. More...

#include <Texture.h>

Public Member Functions

 Texture (int id)
 Creates a new texture with mission data. More...
 
 ~Texture ()
 Cleans up the texture.
 
void load (const YAML::Node &node)
 Loads the texture from YAML. More...
 
std::vector< TerrainCriteria > * getTerrain ()
 Gets the list of terrain criteria. More...
 
std::string getRandomTerrain (Target *target) const
 Gets a random texture terrain for a given target. More...
 
const std::map< std::string, int > & getDeployments () const
 Gets the alien deployment for this texture. More...
 
std::string getRandomDeployment () const
 Gets a random deployment. More...
 

Detailed Description

Represents the relations between a Geoscape texture and the corresponding Battlescape mission attributes.

Constructor & Destructor Documentation

◆ Texture()

OpenXcom::Texture::Texture ( int  id)

Creates a new texture with mission data.

Initializes a globe texture.

Parameters
idTexture identifier.

Member Function Documentation

◆ getDeployments()

const std::map< std::string, int > & OpenXcom::Texture::getDeployments ( ) const

Gets the alien deployment for this texture.

Returns the list of deployments associated with this texture.

Returns
List of deployments.

◆ getRandomDeployment()

std::string OpenXcom::Texture::getRandomDeployment ( ) const

Gets a random deployment.

Calculates a random deployment for a mission target based on the texture's available deployments.

Returns
the name of the picked deployment.

◆ getRandomTerrain()

std::string OpenXcom::Texture::getRandomTerrain ( Target target) const

Gets a random texture terrain for a given target.

Calculates a random terrain for a mission target based on the texture's available terrain criteria.

Parameters
targetPointer to the mission target.
Returns
the name of the picked terrain.

◆ getTerrain()

std::vector< TerrainCriteria > * OpenXcom::Texture::getTerrain ( )

Gets the list of terrain criteria.

Returns the list of terrain criteria associated with this texture.

Returns
List of terrain.

◆ load()

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

Loads the texture from YAML.

Loads the texture type from a YAML file.

Parameters
nodeYAML node.

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