1 #ifndef __MAP_INFORMATION_H
2 #define __MAP_INFORMATION_H
3 
4 #include "JA2Types.h"
5 
6 extern UINT8 gubMinorMapVersion;
7 
8 enum //for use with MAPCREATE_STRUCT.ubEditorSmoothingType
9 {
10 	SMOOTHING_NORMAL,
11 	SMOOTHING_BASEMENT,
12 	SMOOTHING_CAVES
13 };
14 
15 struct MAPCREATE_STRUCT
16 {
17 	//These are the mandatory entry points for a map.  If any of the values are -1, then that means that
18 	//the point has been specifically not used and that the map is not traversable to or from an adjacent
19 	//sector in that direction.  The >0 value points must be validated before saving the map.  This is
20 	//done by simply checking if those points are sittable by mercs, and that you can plot a path from
21 	//these points to each other.  These values can only be set by the editor : mapinfo tab
22 	INT16 sNorthGridNo;
23 	INT16 sEastGridNo;
24 	INT16 sSouthGridNo;
25 	INT16 sWestGridNo;
26 	//This contains the number of individuals in the map.
27 	//Individuals include NPCs, enemy placements, creatures, civilians, rebels, and animals.
28 	UINT8 ubNumIndividuals;
29 	UINT8 ubMapVersion;
30 	UINT8 ubRestrictedScrollID;
31 	UINT8 ubEditorSmoothingType; //normal, basement, or caves
32 	INT16 sCenterGridNo;
33 	INT16 sIsolatedGridNo;
34 	INT8 bPadding[83]; //I'm sure lots of map info will be added // XXX HACK000B
35 }; //99 bytes
36 
37 
38 extern MAPCREATE_STRUCT gMapInformation;
39 
40 void SaveMapInformation( HWFILE fp );
41 
42 struct SUMMARYFILE;
43 void UpdateSummaryInfo(SUMMARYFILE*);
44 
45 void LoadMapInformation(HWFILE);
46 void ValidateAndUpdateMapVersionIfNecessary(void);
47 BOOLEAN ValidateEntryPointGridNo( INT16 *sGridNo );
48 
49 extern BOOLEAN gfWorldLoaded;
50 
51 #endif
52