Files
source/Tactical/Map Information.h
Wanne 14750c6903 **********************************************************
** Big Maps Projects code (incl. Multiplayer v1.5 **
**********************************************************
- Merged Big Maps Project code from BMP+MP trunk (Revision: 3340)
o Complete SVN Revision history: https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
- Before THIS merge, I made a branch of the existing 1.13 source
o SVN Branch: https://81.169.133.124/source/ja2/branches/JA2_rev.3336/src
- Removed old VS 6.0 and VS 2003 project and solutions files, because compilation is broken long time ago
- I will add VS 2010 projects and solution file in the next few days

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3341 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2010-02-28 18:38:52 +00:00

69 lines
2.1 KiB
C++

#ifndef __MAP_INFORMATION_H
#define __MAP_INFORMATION_H
#include "types.h"
extern FLOAT gdMajorMapVersion;
extern UINT8 gubMinorMapVersion;
enum //for use with MAPCREATE_STRUCT.ubEditorSmoothingType
{
SMOOTHING_NORMAL,
SMOOTHING_BASEMENT,
SMOOTHING_CAVES
};
//dnl ch42 250909
// WANNE - BMP: DONE!
typedef struct
{
//These are the mandatory entry points for a map. If any of the values are -1, then that means that
//the point has been specifically not used and that the map is not traversable to or from an adjacent
//sector in that direction. The >0 value points must be validated before saving the map. This is
//done by simply checking if those points are sittable by mercs, and that you can plot a path from
//these points to each other. These values can only be set by the editor : mapinfo tab
INT16 sNorthGridNo;
INT16 sEastGridNo;
INT16 sSouthGridNo;
INT16 sWestGridNo;
//This contains the number of individuals in the map.
//Individuals include NPCs, enemy placements, creatures, civilians, rebels, and animals.
UINT8 ubNumIndividuals;
UINT8 ubMapVersion;
UINT8 ubRestrictedScrollID;
UINT8 ubEditorSmoothingType; //normal, basement, or caves
INT16 sCenterGridNo;
INT16 sIsolatedGridNo;
INT8 bPadding[83]; //I'm sure lots of map info will be added
}_OLD_MAPCREATE_STRUCT; //99 bytes
class MAPCREATE_STRUCT
{
public:
INT32 sNorthGridNo;
INT32 sEastGridNo;
INT32 sSouthGridNo;
INT32 sWestGridNo;
INT32 sCenterGridNo;
INT32 sIsolatedGridNo;
UINT16 ubNumIndividuals;
UINT8 ubMapVersion;
UINT8 ubRestrictedScrollID;
UINT8 ubEditorSmoothingType;
public:
MAPCREATE_STRUCT& operator=(const _OLD_MAPCREATE_STRUCT& src);
BOOLEAN Load(INT8** hBuffer, FLOAT dMajorMapVersion);
BOOLEAN Save(HWFILE hFile, FLOAT dMajorMapVersion, UINT8 ubMinorMapVersion);
};
extern MAPCREATE_STRUCT gMapInformation;
void LoadMapInformation(INT8** hBuffer, FLOAT dMajorMapVersion);
void SaveMapInformation(HWFILE hFile, FLOAT dMajorMapVersion, UINT8 ubMinorMapVersion);
void ValidateAndUpdateMapVersionIfNecessary();
BOOLEAN ValidateEntryPointGridNo( INT32 *sGridNo );
extern BOOLEAN gfWorldLoaded;
#endif