Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CampaignSaveGame.h
Go to the documentation of this file.
1 /* Project Starshatter 4.5
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: Stars.exe
6  FILE: CampaignSaveGame.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  CampaignSaveGame contains the logic needed to save and load
13  campaign games in progress.
14 */
15 
16 #ifndef CampaignSaveGame_h
17 #define CampaignSaveGame_h
18 
19 #include "Types.h"
20 #include "Geometry.h"
21 #include "text.h"
22 #include "term.h"
23 #include "List.h"
24 
25 // +--------------------------------------------------------------------+
26 
27 class Campaign;
28 class CampaignPlan;
29 class Combatant;
30 class CombatGroup;
31 class CombatZone;
32 class DataLoader;
33 class Mission;
34 class Player;
35 class StarSystem;
36 
37 // +--------------------------------------------------------------------+
38 
40 {
41 public:
42  static const char* TYPENAME() { return "CampaignSaveGame"; }
43 
45  virtual ~CampaignSaveGame();
46 
47  virtual Campaign* GetCampaign() { return campaign; }
48 
49  virtual void Load(const char* name);
50  virtual void Save(const char* name);
51  static void Delete(const char* name);
52  static void RemovePlayer(Player* p);
53 
54  virtual void LoadAuto();
55  virtual void SaveAuto();
56 
57  static Text GetResumeFile();
58  static int GetSaveGameList(List<Text>& save_list);
59 
60 private:
61  static Text GetSaveDirectory();
62  static Text GetSaveDirectory(Player* p);
63  static void CreateSaveDirectory();
64 
65  Campaign* campaign;
66 };
67 
68 #endif CampaignSaveGame_h
69