OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
OpenXcom::MapDataSet Class Reference

Represents a Terrain Map Datafile. More...

#include <MapDataSet.h>

Public Member Functions

 MapDataSet (const std::string &name)
 MapDataSet construction.
 
 ~MapDataSet ()
 MapDataSet destruction.
 
void load (const YAML::Node &node)
 Loads the map data set from YAML. More...
 
std::string getName () const
 Gets the dataset name (used for MAP generation). More...
 
size_t getSize () const
 Gets the dataset size. More...
 
std::vector< MapData * > * getObjects ()
 Gets the objects in this dataset. More...
 
SurfaceSetgetSurfaceset () const
 Gets the surfaces in this dataset. More...
 
void loadData ()
 Loads the objects from an MCD file. More...
 
void unloadData ()
 Unloads to free memory. More...
 

Static Public Member Functions

static void loadLOFTEMPS (const std::string &filename, std::vector< Uint16 > *voxelData)
 Loads voxeldata from a DAT file. More...
 
static MapDatagetBlankFloorTile ()
 Gets a blank floor tile. More...
 
static MapDatagetScorchedEarthTile ()
 Gets a scorched earth tile. More...
 

Detailed Description

Represents a Terrain Map Datafile.

Which corresponds to an XCom MCD & PCK file. The list of map datafiles is stored in RuleSet, but referenced in RuleTerrain.

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

Member Function Documentation

MapData * OpenXcom::MapDataSet::getBlankFloorTile ( )
static

Gets a blank floor tile.

Returns
Pointer to a blank tile.
std::string OpenXcom::MapDataSet::getName ( ) const

Gets the dataset name (used for MAP generation).

Gets the MapDataSet name (string).

Returns
The MapDataSet name.
std::vector< MapData * > * OpenXcom::MapDataSet::getObjects ( )

Gets the objects in this dataset.

Returns
Pointer to the objects.
MapData * OpenXcom::MapDataSet::getScorchedEarthTile ( )
static

Gets a scorched earth tile.

Returns
Pointer to a scorched earth tile.
size_t OpenXcom::MapDataSet::getSize ( ) const

Gets the dataset size.

Gets the MapDataSet size.

Returns
The size in number of records.
SurfaceSet * OpenXcom::MapDataSet::getSurfaceset ( ) const

Gets the surfaces in this dataset.

Returns
Pointer to the surfaceset.
void OpenXcom::MapDataSet::load ( const YAML::Node &  node)

Loads the map data set from YAML.

Loads the map data set from a YAML file.

Parameters
nodeYAML node.
void OpenXcom::MapDataSet::loadData ( )

Loads the objects from an MCD file.

Loads terrain data in XCom format (MCD & PCK files).

See also
http://www.ufopaedia.org/index.php?title=MCD
void OpenXcom::MapDataSet::loadLOFTEMPS ( const std::string &  filename,
std::vector< Uint16 > *  voxelData 
)
static

Loads voxeldata from a DAT file.

Loads the LOFTEMPS.DAT into the ruleset voxeldata.

Parameters
filenameFilename of the DAT file.
voxelDataThe ruleset.
void OpenXcom::MapDataSet::unloadData ( )

Unloads to free memory.

Unloads the terrain data.


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