Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
CampaignMissionRequest.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: CampaignMissionRequest.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  CampaignMissionRequest
13 */
14 
15 #ifndef CampaignMissionRequest_h
16 #define CampaignMissionRequest_h
17 
18 #include "Types.h"
19 #include "Geometry.h"
20 #include "List.h"
21 #include "Text.h"
22 
23 // +--------------------------------------------------------------------+
24 
25 class Campaign;
26 class CombatGroup;
27 class CombatUnit;
28 class CombatZone;
29 class Mission;
30 class MissionElement;
31 class MissionInfo;
32 
33 // +--------------------------------------------------------------------+
34 
36 {
37 public:
38  static const char* TYPENAME() { return "CampaignMissionRequest"; }
39 
40  CampaignMissionRequest(Campaign* c, int type, int start,
41  CombatGroup* primary, CombatGroup* tgt=0);
42 
43  Campaign* GetCampaign() { return campaign; }
44  int Type() { return type; }
45  int OpposingType() { return opp_type; }
46  int StartTime() { return start; }
47  CombatGroup* GetPrimaryGroup() { return primary_group; }
48  CombatGroup* GetSecondaryGroup() { return secondary_group; }
49  CombatGroup* GetObjective() { return objective; }
50 
51  bool IsLocSpecified() { return use_loc; }
52  const Text& RegionName() { return region; }
53  Point Location() { return location; }
54  const Text& Script() { return script; }
55 
56  void SetType(int t) { type = t; }
57  void SetOpposingType(int t) { opp_type = t; }
58  void SetStartTime(int s) { start = s; }
59  void SetPrimaryGroup(CombatGroup* g) { primary_group = g; }
60  void SetSecondaryGroup(CombatGroup* g) { secondary_group = g; }
61  void SetObjective(CombatGroup* g) { objective = g; }
62 
63  void SetRegionName(const char* rgn) { region = rgn; use_loc = true; }
64  void SetLocation(const Point& loc) { location = loc; use_loc = true; }
65  void SetScript(const char* s) { script = s; }
66 
67 private:
68  Campaign* campaign;
69 
70  int type; // type of mission
71  int opp_type; // opposing mission type
72  int start; // start time
73  CombatGroup* primary_group; // player's group
74  CombatGroup* secondary_group; // optional support group
75  CombatGroup* objective; // target or ward
76 
77  bool use_loc; // use the specified location
78  Text region;
79  Point location;
80  Text script;
81 };
82 
83 #endif CampaignMissionRequest_h
84