Code: Select all
//the following functions are used to get information about the map
//dont modify or delete any of the pointers returned
//the maps are stored from top left and each data position is 8*8 in size
//to get info about a position x,y look at location
//(int(y/8))*GetMapWidth()+(int(x/8))
//some of the maps are stored in a lower resolution than this though
virtual int GetMapWidth()=0;
virtual int GetMapHeight()=0;
virtual const float* GetHeightMap()=0; //this is the height for the center of the squares, this differs slightly from the drawn map since it uses the height at the corners
virtual const unsigned short* GetLosMap()=0; //a square with value zero means you dont have los to the square, this is half the resolution of the standard map
virtual const unsigned short* GetRadarMap()=0; //a square with value zero means you dont have radar to the square, this is 1/8 the resolution of the standard map
virtual const unsigned short* GetJammerMap()=0; //a square with value zero means you dont have radar jamming on the square, this is 1/8 the resolution of the standard map
virtual const unsigned char* GetMetalMap()=0; //this map shows the metal density on the map, this is half the resolution of the standard map
int(y/8))*GetMapWidth()+int(x/8) or is it
(int(y/16))*GetMapWidth()+(int(x/16)) because metal map resolution is half of the standart map ?
And how would you find the radar map value at [x,y] if it's 1/8 resolution of standart map?
Just trying to get the logic here...
I just figured out that metal map array on small divide has approximately 233544 elements...
I need this info for developing my own AI so help is needed...
Alik