mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
36 lines
1.1 KiB
C++
36 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "../global.h"
|
|
|
|
class CMapHeader;
|
|
class CCampaignHeader;
|
|
struct StartInfo;
|
|
|
|
|
|
class DLL_EXPORT CMapInfo
|
|
{
|
|
public:
|
|
CMapHeader * mapHeader; //may be NULL if campaign
|
|
CCampaignHeader * campaignHeader; //may be NULL if scenario
|
|
StartInfo *scenarioOpts; //options with which scenario has been started (used only with saved games)
|
|
std::string filename;
|
|
bool lodCmpgn; //tells if this campaign is located in Lod file
|
|
std::string date;
|
|
int playerAmnt, //players in map
|
|
humenPlayers; //players ALLOWED to be controlled by human
|
|
int actualHumanPlayers; // >1 if multiplayer game
|
|
CMapInfo(bool map = true);
|
|
~CMapInfo();
|
|
//CMapInfo(const std::string &fname, const unsigned char *map);
|
|
void setHeader(CMapHeader *header);
|
|
void mapInit(const std::string &fname, const unsigned char *map);
|
|
void campaignInit();
|
|
void countPlayers();
|
|
|
|
template <typename Handler> void serialize(Handler &h, const int Version)
|
|
{
|
|
h & mapHeader & campaignHeader & scenarioOpts & filename & lodCmpgn & date & playerAmnt & humenPlayers;
|
|
h & actualHumanPlayers;
|
|
}
|
|
};
|