typedef struct _map_field_ MapField;
This structure contains all informations about a field on map. It contains it look, properties and content.
The map-field structure members:
Tile is number defining the graphic image display for the map-field. 65535 different tiles are supported. A tile is currently 32x32 pixels. In the future is planned to support animated tiles.
This is the tile number, that the player sitting on the computer currently knows. Idea: Can be uses for illusions.
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. MapFieldHuman human player is the owner of the field used for walls. 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. MapFieldWall field contains wall. MapFieldRocks field contains rocks. MapFieldForest field contains forest. 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.
Extra value for each tile. This currently only used for walls, contains the remaining hit points of the wall and for forest, contains the frames until they grow.
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.
Contains a list of all units currently on this field. Note: currently units are only inserted at the insert point. This means units of the size of 2x2 fields are inserted at the top and right most map coordinate.
Number of the region to that the tile belongs.
|last seen tile (FOW) |
|graphic tile number |
|field flags |