![]() |
OpenXcom
1.0
Open-source clone of the original X-Com
|
MapData is the smallest piece of a Battlescape terrain, holding info about a certain object, wall, floor, ... More...
#include <MapData.h>
Public Member Functions | |
| MapData (MapDataSet *dataset) | |
| Creates a new Map Data Object. More... | |
| ~MapData () | |
| Destroys the object. | |
| MapDataSet * | getDataset () const |
| Gets the dataset this object belongs to. More... | |
| int | getSprite (int frameID) const |
| Gets the sprite index for a certain frame. More... | |
| void | setSprite (int frameID, int value) |
| Sets the sprite index for a certain frame. More... | |
| bool | isUFODoor () const |
| Gets whether this is an animated ufo door. More... | |
| bool | isNoFloor () const |
| Gets whether this is a floor. More... | |
| int | getBigWall () const |
| Gets whether this is a big wall, which blocks all surrounding paths. More... | |
| bool | isDoor () const |
| Gets whether this is a normal door. More... | |
| bool | isGravLift () const |
| Gets whether this is a grav lift. More... | |
| void | setFlags (bool isUfoDoor, bool stopLOS, bool isNoFloor, int bigWall, bool isGravLift, bool isDoor, bool blockFire, bool blockSmoke, bool baseModule) |
| Sets all kinds of flags. More... | |
| int | getBlock (ItemDamageType type) const |
| Gets the amount of blockage of a certain type. More... | |
| void | setBlockValue (int lightBlock, int visionBlock, int HEBlock, int smokeBlock, int fireBlock, int gasBlock) |
| Sets the amount of blockage for all types. More... | |
| void | setHEBlock (int HEBlock) |
| Sets the amount of HE blockage. More... | |
| int | getYOffset () const |
| Gets the offset on the Y axis when drawing this object. More... | |
| void | setYOffset (int value) |
| Sets the offset on the Y axis for drawing this object. More... | |
| void | setObjectType (TilePart type) |
| Set the type of tile. More... | |
| TilePart | getObjectType () const |
| Get the type of tile. More... | |
| SpecialTileType | getSpecialType () const |
| Gets info about special tile types. More... | |
| void | setSpecialType (int value, TilePart otype) |
| Sets a special tile type and object type. More... | |
| int | getTUCost (MovementType movementType) const |
| Gets the TU cost to move over the object. More... | |
| void | setTUCosts (int walk, int fly, int slide) |
| Sets the TU cost to move over the object. More... | |
| int | getTerrainLevel () const |
| Adds this to the graphical Y offset of units or objects on this tile. More... | |
| void | setTerrainLevel (int value) |
| Sets Y offset for units/objects on this tile. More... | |
| int | getFootstepSound () const |
| Gets the index to the footstep sound. More... | |
| void | setFootstepSound (int value) |
| Sets the index to the footstep sound. More... | |
| int | getAltMCD () const |
| Gets sthe alternative object ID. More... | |
| void | setAltMCD (int value) |
| Sets the alternative object ID. More... | |
| int | getDieMCD () const |
| Gets the dead object ID. More... | |
| void | setDieMCD (int value) |
| Sets the dead object ID. More... | |
| int | getLightSource () const |
| Gets the amount of light the object is emitting. More... | |
| void | setLightSource (int value) |
| Sets the amount of light the object is emitting. More... | |
| int | getArmor () const |
| Gets the amount of armor. More... | |
| void | setArmor (int value) |
| Sets the amount of armor. More... | |
| int | getFlammable () const |
| Gets the amount of flammable. More... | |
| void | setFlammable (int value) |
| Sets the amount of flammable. More... | |
| int | getFuel () const |
| Gets the amount of fuel. More... | |
| void | setFuel (int value) |
| Sets the amount of fuel. More... | |
| int | getLoftID (int layer) const |
| Gets the loft index for a certain layer. More... | |
| void | setLoftID (int loft, int layer) |
| Sets the loft index for a certain layer. More... | |
| int | getExplosive () const |
| Gets the amount of explosive. More... | |
| void | setExplosive (int value) |
| Sets the amount of explosive. More... | |
| int | getExplosiveType () const |
| Gets the type of explosive. More... | |
| void | setExplosiveType (int value) |
| Sets the type of explosive. More... | |
| void | setMiniMapIndex (unsigned short i) |
| Sets the MiniMap index. More... | |
| unsigned short | getMiniMapIndex () const |
| Gets the MiniMap index. More... | |
| void | setBigWall (const int bigWall) |
| Sets the bigwall value. More... | |
| void | setTUWalk (const int TUWalk) |
| Sets the TUWalk value. More... | |
| void | setTUFly (const int TUFly) |
| Sets the TUFly value. More... | |
| void | setTUSlide (const int TUSlide) |
| Sets the TUSlide value. More... | |
| bool | isBaseModule () const |
| Check if this is an xcom base object. More... | |
| void | setNoFloor (bool isNoFloor) |
| Sets this tile as not a floor (water, etc.) More... | |
| void | setStopLOS (bool stopLOS) |
| Sets this tile as not stopping LOS. More... | |
MapData is the smallest piece of a Battlescape terrain, holding info about a certain object, wall, floor, ...
| OpenXcom::MapData::MapData | ( | MapDataSet * | dataset | ) |
Creates a new Map Data Object.
| dataset | The dataset this object belongs to. |
| int OpenXcom::MapData::getAltMCD | ( | ) | const |
Gets sthe alternative object ID.
Gets the alternative object ID.
| int OpenXcom::MapData::getArmor | ( | ) | const |
Gets the amount of armor.
| int OpenXcom::MapData::getBigWall | ( | ) | const |
Gets whether this is a big wall, which blocks all surrounding paths.
Return value key: 0: not a bigWall 1: regular bigWall 2: allows movement in ne/sw direction 3: allows movement in nw/se direction 4: acts as a west wall 5: acts as a north wall 6: acts as an east wall 7: acts as a south wall 8: acts as a south and east wall. 9: acts as a north and west wall.
| int OpenXcom::MapData::getBlock | ( | ItemDamageType | type | ) | const |
Gets the amount of blockage of a certain type.
| type | Type. |
| MapDataSet * OpenXcom::MapData::getDataset | ( | ) | const |
Gets the dataset this object belongs to.
| int OpenXcom::MapData::getDieMCD | ( | ) | const |
Gets the dead object ID.
| int OpenXcom::MapData::getExplosive | ( | ) | const |
Gets the amount of explosive.
| int OpenXcom::MapData::getExplosiveType | ( | ) | const |
Gets the type of explosive.
| int OpenXcom::MapData::getFlammable | ( | ) | const |
Gets the amount of flammable.
Gets the amount of flammable (how flammable this object is).
| int OpenXcom::MapData::getFootstepSound | ( | ) | const |
Gets the index to the footstep sound.
| int OpenXcom::MapData::getFuel | ( | ) | const |
Gets the amount of fuel.
| int OpenXcom::MapData::getLightSource | ( | ) | const |
Gets the amount of light the object is emitting.
| int OpenXcom::MapData::getLoftID | ( | int | layer | ) | const |
Gets the loft index for a certain layer.
| layer | The layer. |
| unsigned short OpenXcom::MapData::getMiniMapIndex | ( | ) | const |
Gets the MiniMap index.
Gets the SCANG.DAT index for minimap.
| TilePart OpenXcom::MapData::getObjectType | ( | ) | const |
Get the type of tile.
Gets the type of object.
| SpecialTileType OpenXcom::MapData::getSpecialType | ( | ) | const |
Gets info about special tile types.
| int OpenXcom::MapData::getSprite | ( | int | frameID | ) | const |
Gets the sprite index for a certain frame.
Gets the sprite index.
| frameID | Animation frame 0-7. |
| int OpenXcom::MapData::getTerrainLevel | ( | ) | const |
Adds this to the graphical Y offset of units or objects on this tile.
| int OpenXcom::MapData::getTUCost | ( | MovementType | movementType | ) | const |
Gets the TU cost to move over the object.
Gets the TU cost to walk over the object.
| movementType | The movement type. |
| int OpenXcom::MapData::getYOffset | ( | ) | const |
Gets the offset on the Y axis when drawing this object.
Gets the Y offset for drawing.
| bool OpenXcom::MapData::isBaseModule | ( | ) | const |
Check if this is an xcom base object.
check if this is an xcom base object.
| bool OpenXcom::MapData::isDoor | ( | ) | const |
Gets whether this is a normal door.
| bool OpenXcom::MapData::isGravLift | ( | ) | const |
Gets whether this is a grav lift.
| bool OpenXcom::MapData::isNoFloor | ( | ) | const |
Gets whether this is a floor.
| bool OpenXcom::MapData::isUFODoor | ( | ) | const |
Gets whether this is an animated ufo door.
| void OpenXcom::MapData::setAltMCD | ( | int | value | ) |
Sets the alternative object ID.
| value | The alternative object ID. |
| void OpenXcom::MapData::setArmor | ( | int | value | ) |
Sets the amount of armor.
| value | The amount of armor. |
| void OpenXcom::MapData::setBigWall | ( | const int | bigWall | ) |
Sets the bigwall value.
Sets the bigWall value.
| bigWall | The new bigWall value. |
| void OpenXcom::MapData::setBlockValue | ( | int | lightBlock, |
| int | visionBlock, | ||
| int | HEBlock, | ||
| int | smokeBlock, | ||
| int | fireBlock, | ||
| int | gasBlock | ||
| ) |
Sets the amount of blockage for all types.
| lightBlock | The light blockage. |
| visionBlock | The vision blockage. |
| HEBlock | The high explosive blockage. |
| smokeBlock | The smoke blockage. |
| fireBlock | The fire blockage. |
| gasBlock | The gas blockage. |
| void OpenXcom::MapData::setDieMCD | ( | int | value | ) |
Sets the dead object ID.
| value | The dead object ID. |
| void OpenXcom::MapData::setExplosive | ( | int | value | ) |
Sets the amount of explosive.
| value | The amount of explosive. |
| void OpenXcom::MapData::setExplosiveType | ( | int | value | ) |
Sets the type of explosive.
| value | The type of explosive. |
| void OpenXcom::MapData::setFlags | ( | bool | isUfoDoor, |
| bool | stopLOS, | ||
| bool | isNoFloor, | ||
| int | bigWall, | ||
| bool | isGravLift, | ||
| bool | isDoor, | ||
| bool | blockFire, | ||
| bool | blockSmoke, | ||
| bool | baseModule | ||
| ) |
Sets all kinds of flags.
| isUfoDoor | True if this is a ufo door. |
| stopLOS | True if this stops line of sight. |
| isNoFloor | True if this is a floor. |
| bigWall | True if this is a bigWall. |
| isGravLift | True if this is a grav lift. |
| isDoor | True if this is a normal door. |
| blockFire | True if this blocks fire. |
| blockSmoke | True if this blocks smoke. |
| baseModule | True if this is a base module item. |
| void OpenXcom::MapData::setFlammable | ( | int | value | ) |
Sets the amount of flammable.
Sets the amount of flammable (how flammable this object is).
| value | The amount of flammable. |
| void OpenXcom::MapData::setFootstepSound | ( | int | value | ) |
Sets the index to the footstep sound.
| value | The sound ID. |
| void OpenXcom::MapData::setFuel | ( | int | value | ) |
Sets the amount of fuel.
| value | The amount of fuel. |
| void OpenXcom::MapData::setHEBlock | ( | int | HEBlock | ) |
Sets the amount of HE blockage.
| HEBlock | The high explosive blockage. |
| void OpenXcom::MapData::setLightSource | ( | int | value | ) |
Sets the amount of light the object is emitting.
| value | The amount of light emitted. |
| void OpenXcom::MapData::setLoftID | ( | int | loft, |
| int | layer | ||
| ) |
Sets the loft index for a certain layer.
| loft | The loft index. |
| layer | The layer. |
| void OpenXcom::MapData::setMiniMapIndex | ( | unsigned short | i | ) |
Sets the MiniMap index.
Sets the SCANG.DAT index for minimap.
| i | The minimap index. |
| void OpenXcom::MapData::setNoFloor | ( | bool | isNoFloor | ) |
Sets this tile as not a floor (water, etc.)
set the "no floor" flag.
| isNoFloor | set the flag to THIS. |
| void OpenXcom::MapData::setObjectType | ( | TilePart | type | ) |
Set the type of tile.
Sets the type of object.
| type | New type of the object. |
| void OpenXcom::MapData::setSpecialType | ( | int | value, |
| TilePart | otype | ||
| ) |
Sets a special tile type and object type.
| value | Special tile type. |
| otype | Object type. |
| void OpenXcom::MapData::setSprite | ( | int | frameID, |
| int | value | ||
| ) |
Sets the sprite index for a certain frame.
| frameID | Animation frame |
| value | The sprite index in the surfaceset of the mapdataset. |
| void OpenXcom::MapData::setStopLOS | ( | bool | stopLOS | ) |
Sets this tile as not stopping LOS.
set the "stops LOS" flag.
| stopLOS | set the flag to THIS. |
| void OpenXcom::MapData::setTerrainLevel | ( | int | value | ) |
Sets Y offset for units/objects on this tile.
Sets the Y offset for units/objects on this tile.
| value | The Y offset. |
| void OpenXcom::MapData::setTUCosts | ( | int | walk, |
| int | fly, | ||
| int | slide | ||
| ) |
Sets the TU cost to move over the object.
| walk | The walking TU cost. |
| fly | The flying TU cost. |
| slide | The sliding TU cost. |
| void OpenXcom::MapData::setTUFly | ( | const int | TUFly | ) |
Sets the TUFly value.
| TUFly | The new TUFly value. |
| void OpenXcom::MapData::setTUSlide | ( | const int | TUSlide | ) |
Sets the TUSlide value.
| TUSlide | The new TUSlide value. |
| void OpenXcom::MapData::setTUWalk | ( | const int | TUWalk | ) |
Sets the TUWalk value.
| TUWalk | The new TUWalk value. |
| void OpenXcom::MapData::setYOffset | ( | int | value | ) |
Sets the offset on the Y axis for drawing this object.
| value | The offset. |
1.8.14