- added more error checking in scenarios

This commit is contained in:
Mark Vejvoda 2012-07-18 00:21:39 +00:00
parent de2e889a4f
commit e4cec7319e
1 changed files with 28 additions and 1 deletions

View File

@ -43,7 +43,34 @@ enum Difficulty {
dInsane
};
struct ScenarioInfo {
class ScenarioInfo {
public:
ScenarioInfo() {
difficulty = 0;
for(unsigned int i = 0; i < GameConstants::maxPlayers; ++i) {
factionControls[i] = ctClosed;
teams[i] = 0;
factionTypeNames[i] = "";
resourceMultipliers[i] = 0;
}
mapName = "";
tilesetName = "";
techTreeName = "";
defaultUnits = false;
defaultResources = false;
defaultVictoryConditions = false;
desc = "";
fogOfWar = false;
fogOfWar_exploredFlag = false;
file = "";
name = "";
}
int difficulty;
ControlType factionControls[GameConstants::maxPlayers];
int teams[GameConstants::maxPlayers];