19 #ifndef OPENXCOM_SAVEDGAME_H 20 #define OPENXCOM_SAVEDGAME_H 37 class SavedBattleGame;
41 class ResearchProject;
43 class RuleManufacture;
54 enum GameDifficulty { DIFF_BEGINNER = 0, DIFF_EXPERIENCED, DIFF_VETERAN, DIFF_GENIUS, DIFF_SUPERHUMAN };
59 enum SaveType { SAVE_DEFAULT, SAVE_QUICK, SAVE_AUTO_GEOSCAPE, SAVE_AUTO_BATTLESCAPE, SAVE_IRONMAN, SAVE_IRONMAN_END };
67 std::wstring displayName;
69 std::wstring isoDate, isoTime;
71 std::vector<std::string> rulesets;
87 std::vector<int> _funds, _maintenance, _researchScores, _incomes, _expenditures;
88 double _globeLon, _globeLat;
90 std::map<std::string, int> _ids;
91 std::vector<Country*> _countries;
92 std::vector<Region*> _regions;
93 std::vector<Base*> _bases;
94 std::vector<Ufo*> _ufos;
95 std::vector<Waypoint*> _waypoints;
96 std::vector<TerrorSite*> _terrorSites;
97 std::vector<AlienBase*> _alienBases;
100 std::vector<const RuleResearch *> _discovered;
101 std::vector<AlienMission*> _activeMissions;
102 bool _debug, _warned;
104 std::string _graphRegionToggles;
105 std::string _graphCountryToggles;
106 std::string _graphFinanceToggles;
107 std::vector<const RuleResearch *> _poppedResearch;
108 std::vector<Soldier*> _deadSoldiers;
109 size_t _selectedBase;
111 void getDependableResearchBasic (std::vector<RuleResearch *> & dependables,
const RuleResearch *research,
const Ruleset * ruleset,
Base * base)
const;
114 static const std::string AUTOSAVE_GEOSCAPE, AUTOSAVE_BATTLESCAPE, QUICKSAVE;
121 static std::vector<SaveInfo> getList(
Language *lang,
bool autoquick);
123 void load(
const std::string &filename,
Ruleset *rule);
125 void save(
const std::string &filename)
const;
127 std::wstring getName()
const;
129 void setName(
const std::wstring &name);
135 bool isIronman()
const;
137 void setIronman(
bool ironman);
139 int getFunds()
const;
141 const std::vector<int> &getFundsList()
const;
143 void setFunds(
int funds);
145 double getGlobeLongitude()
const;
147 void setGlobeLongitude(
double lon);
149 double getGlobeLatitude()
const;
151 void setGlobeLatitude(
double lat);
153 int getGlobeZoom()
const;
155 void setGlobeZoom(
int zoom);
157 void monthlyFunding();
163 int getId(
const std::string &name);
165 std::vector<Country*> *getCountries();
167 int getCountryFunding()
const;
169 std::vector<Region*> *getRegions();
171 std::vector<Base*> *getBases();
173 const std::vector<Base*> *getBases()
const;
175 int getBaseMaintenance()
const;
177 std::vector<Ufo*> *getUfos();
179 std::vector<Waypoint*> *getWaypoints();
181 std::vector<TerrorSite*> *getTerrorSites();
189 const std::vector<const RuleResearch *> & getDiscoveredResearch()
const;
191 void getAvailableResearchProjects (std::vector<RuleResearch *> & projects,
const Ruleset * ruleset,
Base * base)
const;
193 void getAvailableProductions (std::vector<RuleManufacture *> & productions,
const Ruleset * ruleset,
Base * base)
const;
195 void getDependableResearch (std::vector<RuleResearch *> & dependables,
const RuleResearch *research,
const Ruleset * ruleset,
Base * base)
const;
197 void getDependableManufacture (std::vector<RuleManufacture *> & dependables,
const RuleResearch *research,
const Ruleset * ruleset,
Base * base)
const;
199 bool isResearchAvailable (
RuleResearch * r,
const std::vector<const RuleResearch *> & unlocked,
const Ruleset * ruleset)
const;
201 bool isResearched(
const std::string &research)
const;
203 bool isResearched(
const std::vector<std::string> &research)
const;
205 Soldier *getSoldier(
int id)
const;
207 bool handlePromotions(std::vector<Soldier*> &participants);
209 void inspectSoldiers(
Soldier **highestRanked,
size_t *total,
int rank);
211 std::vector<AlienBase*> *getAlienBases();
215 bool getDebugMode()
const;
217 std::vector<int> getMaintenances();
219 void addResearchScore(
int score);
221 std::vector<int> &getResearchScores();
223 std::vector<int> getIncomes();
225 std::vector<int> getExpenditures();
227 bool getWarned()
const;
229 void setWarned(
bool warned);
239 AlienMission *getAlienMission(
const std::string ®ion,
const std::string &type)
const;
241 Region *locateRegion(
double lon,
double lat)
const;
245 int getMonthsPassed()
const;
247 const std::string &getGraphRegionToggles()
const;
249 const std::string &getGraphCountryToggles()
const;
251 const std::string &getGraphFinanceToggles()
const;
253 void setGraphRegionToggles(
const std::string &value);
255 void setGraphCountryToggles(
const std::string &value);
257 void setGraphFinanceToggles(
const std::string &value);
265 void removePoppedResearch(
const RuleResearch* research);
267 std::vector<Soldier*> *getDeadSoldiers();
269 Base *getSelectedBase();
271 void setSelectedBase(
size_t base);
273 int getSoldierScore(
Soldier *soldier);
SaveType
Enumerator for the various save types.
Definition: SavedGame.h:59
Stores the information about alien strategy.
Definition: AlienStrategy.h:32
Represents an ongoing alien mission.
Definition: AlienMission.h:45
const std::vector< AlienMission * > & getAlienMissions() const
Read-only access to the current alien missions.
Definition: SavedGame.h:237
The game data that gets written to disk when the game is saved.
Definition: SavedGame.h:80
AlienStrategy & getAlienStrategy()
Full access to the alien strategy data.
Definition: SavedGame.h:231
const AlienStrategy & getAlienStrategy() const
Read-only access to the alien strategy data.
Definition: SavedGame.h:233
GameDifficulty
Enumerator containing all the possible game difficulties.
Definition: SavedGame.h:54
Contains strings used throughout the game for localization.
Definition: Language.h:42
Set of rules and stats for a game.
Definition: Ruleset.h:69
Stores the current ingame time/date according to GMT.
Definition: GameTime.h:40
Represents a soldier hired by the player.
Definition: Soldier.h:49
Represents a player base on the globe.
Definition: Base.h:47
Represents one research project.
Definition: RuleResearch.h:40
std::vector< AlienMission * > & getAlienMissions()
Full access to the current alien missions.
Definition: SavedGame.h:235
The battlescape data that gets written to disk when the game is saved.
Definition: SavedBattleGame.h:50
Represents a region of the world.
Definition: Region.h:35
Base class for targets on the globe with a set of radian coordinates.
Definition: Target.h:35
Container for savegame info displayed on listings.
Definition: SavedGame.h:64
COPYING:
Definition: BaseInfoState.cpp:40