1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-30 08:57:00 +02:00
vcmi/StartInfo.h
Michał W. Urbańczyk e34f9a54c9 * it's possible to choose a player
* minor fixes
2008-02-06 07:33:53 +00:00

35 lines
830 B
C++

#ifndef STARTINFO_H
#define STARTINFO_H
#include "global.h"
#include <vector>
enum Ebonus {brandom=-1,bartifact, bgold, bresource};
struct StartInfo
{
struct PlayerSettings
{
int castle, hero, //ID, if -1 then random, if -2 then none
heroPortrait; //-1 if default, else ID
std::string heroName;
Ebonus bonus;
Ecolor color; //from 0 -
int serial;
int handicap;//0-no, 1-mild, 2-severe
std::string name;
bool human;
};
int difficulty; //0=easy; 4=impossible
std::vector<PlayerSettings> playerInfos;
int turnTime; //in minutes, 0=unlimited
PlayerSettings & getIthPlayersSettings(int no)
{
for(int i=0; i<playerInfos.size(); ++i)
if(playerInfos[i].color == no)
return playerInfos[i];
throw new std::exception("Cannot find info about player");
}
};
#endif