StartInfo.h 738 B

1234567891011121314151617181920212223242526272829303132
  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. int difficulty; //0=easy; 4=impossible
  19. std::vector<PlayerSettings> playerInfos;
  20. int turnTime; //in minutes, 0=unlimited
  21. PlayerSettings & getIthPlayersSettings(int no)
  22. {
  23. for(int i=0; i<playerInfos.size(); ++i)
  24. if(playerInfos[i].color == no)
  25. return playerInfos[i];
  26. }
  27. };
  28. #endif