src/hcode/btech/map.los.h

Go to the documentation of this file.
00001 
00002 /*
00003  * $Id: map.los.h,v 1.1.1.1 2005/01/11 21:18:08 kstevens Exp $
00004  *
00005  * Author: Thomas Wouters <thomas@xs4all.net>
00006  *
00007  *  Copyright (c) 2002 Thomas Wouters
00008  *      All rights reserved
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

Generated on Mon May 28 04:25:21 2007 for BattletechMUX by  doxygen 1.4.7