StartInfo.h 697 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef STARTINFO_H
  2. #define STARTINFO_H
  3. #include "global.h"
  4. #include <vector>
  5. enum Ebonus {brandom=-1,bartifact, bgold, bresource};
  6. struct StartInfo
  7. {
  8. struct PlayerSettings
  9. {
  10. int castle, hero, //ID, if -1 then random, if -2 then none
  11. heroPortrait; //-1 if default, else ID
  12. std::string heroName;
  13. Ebonus bonus;
  14. Ecolor color; //from 0 -
  15. int handicap;//0-no, 1-mild, 2-severe
  16. std::string name;
  17. };
  18. std::vector<PlayerSettings> playerInfos;
  19. int turnTime; //in minutes, 0=unlimited
  20. PlayerSettings & getIthPlayersSettings(int no)
  21. {
  22. for(int i=0; i<playerInfos.size(); ++i)
  23. if(playerInfos[i].color == no)
  24. return playerInfos[i];
  25. }
  26. };
  27. #endif