____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
A futuristic real-time strategy game.
This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project.
Distributed under the "GNU General Public License"
#include <map.h>
Public Member Functions | |
| CMapField () | |
Public Attributes | |
| unsigned short | Flags |
| field flags | |
| unsigned char | Cost |
| unit cost to move in this tile | |
| unsigned short | Visible [PlayerMax] |
| Seen counter 0 unexplored. | |
| unsigned char | Radar [PlayerMax] |
| Visiblity for radar. | |
| unsigned char | RadarJammer [PlayerMax] |
| Jamming capabilities. | |
#include "map.h"
This class contains all information about a field on map. It contains its look, properties and content.
The map-field class members:
Contains special information of that tile. What units are on this field, what units could be placed on this field.
This is the list of all flags currently used:
MapFieldVisible field is visible. MapFieldExplored field is explored. MapFieldLandAllowed land units are allowed. MapFieldCoastAllowed coast units (transporter) and coast buildings (shipyard) are allowed. MapFieldWaterAllowed water units allowed. MapFieldNoBuilding no buildings allowed. MapFieldUnpassable field is movement blocked. MapFieldLandUnit land unit on field. MapFieldAirUnit air unit on field. MapFieldSeaUnit water unit on field. MapFieldBuilding building on field.
Note: We want to add support for more unit-types like under ground units.
Unit cost to move in this tile.
Counter how many units of the player can see this field. 0 the field is not explored, 1 explored, n-1 unit see it. Currently no more than 253 units can see a field.
Visiblity for radar.
Jamming capabilities.
Definition at line 148 of file map.h.
| CMapField::CMapField | ( | ) | [inline] |
| unsigned short CMapField::Flags |
field flags
Definition at line 158 of file map.h.
Referenced by AiCheckSurrounding(), CanBuildHere(), CanBuildOn(), CanMoveToMask(), CclStratagusMap(), CheckedCanMoveToMask(), CostMoveTo(), MarkUnitFieldFlags(), CMap::Save(), and UnmarkUnitFieldFlags().
| unsigned char CMapField::Cost |
unit cost to move in this tile
Definition at line 159 of file map.h.
Referenced by CostMoveTo(), and DoActionMove().
| unsigned short CMapField::Visible[PlayerMax] |
Seen counter 0 unexplored.
Definition at line 161 of file map.h.
Referenced by CclStratagusMap(), CMapField(), CommandSharedVision(), CMap::IsTileVisible(), MapMarkTileSight(), MapUnmarkTileSight(), CMap::Reveal(), CMap::Save(), and UnitCountSeen().
| unsigned char CMapField::Radar[PlayerMax] |
Visiblity for radar.
Definition at line 162 of file map.h.
Referenced by CMapField(), IsTileRadarVisible(), MapMarkTileRadar(), and MapUnmarkTileRadar().
| unsigned char CMapField::RadarJammer[PlayerMax] |
Jamming capabilities.
Definition at line 163 of file map.h.
Referenced by CMapField(), IsTileRadarVisible(), MapMarkTileRadarJammer(), and MapUnmarkTileRadarJammer().
1.5.6