00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef __MAP_TILE_H__
00031 #define __MAP_TILE_H__
00032
00034
00035
00036
00037
00038
00039
00127
00128
00129
00130
00131
00132
00133
00134
00135 #ifndef __UNIT_CACHE_H__
00136 #include "unit_cache.h"
00137 #endif
00138
00139
00140
00141
00142
00143
00145 class CMapField
00146 {
00147 public:
00148
00149 CMapField() : Tile(0), SeenTile(0), Flags(0), Cost(0), Value(0), UnitCache()
00150 #ifdef DEBUG
00151 , TilesetTile(0)
00152 #endif
00153 {
00154 memset(Visible, 0, sizeof(Visible));
00155 memset(VisCloak, 0, sizeof(VisCloak));
00156 memset(Radar, 0, sizeof(Radar));
00157 memset(RadarJammer, 0, sizeof(RadarJammer));
00158 }
00159
00160 unsigned short Tile;
00161 unsigned short SeenTile;
00162 unsigned short Flags;
00163 unsigned char Cost;
00164
00165
00166 unsigned char Value;
00167 unsigned short Visible[PlayerMax];
00168 unsigned char VisCloak[PlayerMax];
00169 unsigned char Radar[PlayerMax];
00170 unsigned char RadarJammer[PlayerMax];
00171 CUnitCache UnitCache;
00172 #ifdef DEBUG
00173 unsigned int TilesetTile;
00174 #endif
00175
00177 bool IsExplored(const unsigned int player_index) const {
00178 return !!Visible[player_index];
00179 };
00180
00181 };
00182
00183
00185
00186 #endif // !__MAP_TILE_H__
00187