19 #ifndef OPENXCOM_MAPDATA_H
20 #define OPENXCOM_MAPDATA_H
29 enum SpecialTileType{TILE=0,
45 enum MovementType{ MT_WALK, MT_FLY, MT_SLIDE};
46 enum VoxelType{ V_EMPTY = -1, V_FLOOR, V_WESTWALL, V_NORTHWALL, V_OBJECT, V_UNIT, V_OUTOFBOUNDS };
56 SpecialTileType _specialType;
57 bool _isUfoDoor, _stopLOS, _isNoFloor, _isGravLift, _isDoor, _blockFire, _blockSmoke, _baseModule;
58 int _yOffset, _TUWalk, _TUFly, _TUSlide, _terrainLevel, _footstepSound, _dieMCD, _altMCD, _objectType, _lightSource;
59 int _armor, _flammable, _fuel, _explosive, _bigWall;
63 unsigned short _miniMapIndex;
65 static const int O_FLOOR;
66 static const int O_WESTWALL;
67 static const int O_NORTHWALL;
68 static const int O_OBJECT;
88 void setFlags(
bool isUfoDoor,
bool stopLOS,
bool isNoFloor,
int bigWall,
bool isGravLift,
bool isDoor,
bool blockFire,
bool blockSmoke,
bool baseModule);
90 int getBlock(ItemDamageType type)
const;
92 void setBlockValue(
int lightBlock,
int visionBlock,
int HEBlock,
int smokeBlock,
int fireBlock,
int gasBlock);
106 int getTUCost(MovementType movementType)
const;
108 void setTUCosts(
int walk,
int fly,
int slide);
void setExplosive(int value)
Sets the amount of explosive.
Definition: MapData.cpp:478
SpecialTileType getSpecialType() const
Gets info about special tile types.
Definition: MapData.cpp:237
int getTUCost(MovementType movementType) const
Gets the TU cost to move over the object.
Definition: MapData.cpp:267
bool isNoFloor() const
Gets whether this is a floor.
Definition: MapData.cpp:94
void setDieMCD(int value)
Sets the dead object ID.
Definition: MapData.cpp:364
void setAltMCD(int value)
Sets the alternative object ID.
Definition: MapData.cpp:346
void setArmor(int value)
Sets the amount of armor.
Definition: MapData.cpp:404
void setHEBlock(int HEBlock)
Sets the amount of HE blockage.
Definition: MapData.cpp:210
int getAltMCD() const
Gets sthe alternative object ID.
Definition: MapData.cpp:337
int getFootstepSound() const
Gets the index to the footstep sound.
Definition: MapData.cpp:319
void setBigWall(const int bigWall)
Sets the bigwall value.
Definition: MapData.cpp:505
void setFuel(int value)
Sets the amount of fuel.
Definition: MapData.cpp:440
void setMiniMapIndex(unsigned short i)
Sets the MiniMap index.
Definition: MapData.cpp:487
bool isUFODoor() const
Gets whether this is an animated ufo door.
Definition: MapData.cpp:85
void setTUSlide(const int TUSlide)
Sets the TUSlide value.
Definition: MapData.cpp:532
void setSpecialType(int value, int otype)
Sets a special tile type and object type.
Definition: MapData.cpp:256
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.
Definition: MapData.cpp:150
void setSprite(int frameID, int value)
Sets the sprite index for a certain frame.
Definition: MapData.cpp:76
MapData is the smallest piece of a Battlescape terrain, holding info about a certain object...
Definition: MapData.h:52
bool isDoor() const
Gets whether this is a normal door.
Definition: MapData.cpp:124
int getTerrainLevel() const
Adds this to the graphical Y offset of units or objects on this tile.
Definition: MapData.cpp:301
int getObjectType() const
Get the type of tile.
Definition: MapData.cpp:246
int getBigWall() const
Gets whether this is a big wall, which blocks all surrounding paths.
Definition: MapData.cpp:114
int getArmor() const
Gets the amount of armor.
Definition: MapData.cpp:395
void setYOffset(int value)
Sets the offset on the Y axis for drawing this object.
Definition: MapData.cpp:228
int getDieMCD() const
Gets the dead object ID.
Definition: MapData.cpp:355
void setFootstepSound(int value)
Sets the index to the footstep sound.
Definition: MapData.cpp:328
void setLoftID(int loft, int layer)
Sets the loft index for a certain layer.
Definition: MapData.cpp:460
int getSprite(int frameID) const
Gets the sprite index for a certain frame.
Definition: MapData.cpp:66
unsigned short getMiniMapIndex() const
Gets the MiniMap index.
Definition: MapData.cpp:496
MapDataSet * getDataset() const
Gets the dataset this object belongs to.
Definition: MapData.cpp:56
void setBlockValue(int lightBlock, int visionBlock, int HEBlock, int smokeBlock, int fireBlock, int gasBlock)
Sets the amount of blockage for all types.
Definition: MapData.cpp:196
void setTUFly(const int TUFly)
Sets the TUFly value.
Definition: MapData.cpp:523
void setTUWalk(const int TUWalk)
Sets the TUWalk value.
Definition: MapData.cpp:514
void setTUCosts(int walk, int fly, int slide)
Sets the TU cost to move over the object.
Definition: MapData.cpp:290
void setTerrainLevel(int value)
Sets Y offset for units/objects on this tile.
Definition: MapData.cpp:310
int getLightSource() const
Gets the amount of light the object is emitting.
Definition: MapData.cpp:373
int getExplosive() const
Gets the amount of explosive.
Definition: MapData.cpp:469
int getLoftID(int layer) const
Gets the loft index for a certain layer.
Definition: MapData.cpp:450
void setLightSource(int value)
Sets the amount of light the object is emitting.
Definition: MapData.cpp:386
bool isBaseModule()
Check if this is an xcom base object.
Definition: MapData.cpp:541
void setNoFloor(bool isNoFloor)
Sets this tile as not a floor (water, etc.)
Definition: MapData.cpp:550
MapData(MapDataSet *dataset)
Creates a new Map Data Object.
Definition: MapData.cpp:28
int getFlammable() const
Gets the amount of flammable.
Definition: MapData.cpp:413
void setFlammable(int value)
Sets the amount of flammable.
Definition: MapData.cpp:422
int getFuel() const
Gets the amount of fuel.
Definition: MapData.cpp:431
bool isGravLift() const
Gets whether this is a grav lift.
Definition: MapData.cpp:133
Represents a Terrain Map Datafile.
Definition: MapDataSet.h:40
int getYOffset() const
Gets the offset on the Y axis when drawing this object.
Definition: MapData.cpp:219
~MapData()
Destroys the object.
Definition: MapData.cpp:41
int getBlock(ItemDamageType type) const
Gets the amount of blockage of a certain type.
Definition: MapData.cpp:168