00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef _MAP_LOS_H
00013 #define _MAP_LOS_H
00014
00015 #define MAX_SENSORS 2
00016 #define NUMSENSORS(mech) 2
00017
00018 #define MAPLOS_MAXX 70
00019 #define MAPLOS_MAXY 45
00020
00021 #define MAPLOS_FLAG_SLITE 1
00022
00023 #define MAPLOSHEX_NOLOS 0
00024 #define MAPLOSHEX_SEEN 1
00025 #define MAPLOSHEX_SEETERRAIN 2
00026 #define MAPLOSHEX_SEEELEV 4
00027 #define MAPLOSHEX_LIT 8
00028 #define MAPLOSHEX_SEE (MAPLOSHEX_SEETERRAIN | MAPLOSHEX_SEEELEV)
00029
00030 #define LOSMap_GetFlag(losmap, x, y) \
00031 ((losmap)->map[LOSMap_Hex2Index(losmap, x, y)])
00032
00033 typedef struct hexlosmap_info {
00034 int startx;
00035 int starty;
00036 int xsize;
00037 int ysize;
00038 int flags;
00039 unsigned char map[MAPLOS_MAXX * MAPLOS_MAXY];
00040 } hexlosmap_info;
00041
00042
00043 hexlosmap_info *CalculateLOSMap(MAP *, MECH *, int, int, int, int);
00044 int LOSMap_Hex2Index(hexlosmap_info *, int, int);
00045
00046 #endif