Starshatter_Open
Open source Starshatter engine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
RadioMessage.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: RadioMessage.h
7
AUTHOR: John DiCamillo
8
9
10
OVERVIEW
11
========
12
RadioMessage (radio comms) class declaration
13
*/
14
15
#ifndef RadioMessage_h
16
#define RadioMessage_h
17
18
#include "
Types.h
"
19
#include "
Geometry.h
"
20
#include "
SimObject.h
"
21
#include "
Instruction.h
"
22
#include "
List.h
"
23
#include "
Text.h
"
24
25
// +--------------------------------------------------------------------+
26
27
class
Element
;
28
class
Ship
;
29
class
SimObject
;
30
31
// +--------------------------------------------------------------------+
32
33
class
RadioMessage
34
{
35
public
:
36
enum
ACTION
37
{
38
NONE
= 0,
39
40
DOCK_WITH
=
Instruction::DOCK
,
41
RTB
=
Instruction::RTB
,
42
QUANTUM_TO
=
Instruction::NUM_ACTIONS
,
43
FARCAST_TO
,
44
45
// protocol:
46
ACK
,
47
NACK
,
48
49
// target mgt:
50
ATTACK
,
51
ESCORT
,
52
BRACKET
,
53
IDENTIFY
,
54
55
// combat mgt:
56
COVER_ME
,
57
WEP_FREE
,
58
WEP_HOLD
,
59
FORM_UP
,
// alias for wep_hold
60
SAY_POSITION
,
61
62
// sensor mgt:
63
LAUNCH_PROBE
,
64
GO_EMCON1
,
65
GO_EMCON2
,
66
GO_EMCON3
,
67
68
// formation mgt:
69
GO_DIAMOND
,
70
GO_SPREAD
,
71
GO_BOX
,
72
GO_TRAIL
,
73
74
// mission mgt:
75
MOVE_PATROL
,
76
SKIP_NAVPOINT
,
77
RESUME_MISSION
,
78
79
// misc announcements:
80
CALL_ENGAGING
,
81
FOX_1
,
82
FOX_2
,
83
FOX_3
,
84
SPLASH_1
,
85
SPLASH_2
,
86
SPLASH_3
,
87
SPLASH_4
,
88
SPLASH_5
,
// target destroyed
89
SPLASH_6
,
// enemy destroyed
90
SPLASH_7
,
// confirmed kill
91
DISTRESS
,
92
BREAK_ORBIT
,
93
MAKE_ORBIT
,
94
QUANTUM_JUMP
,
95
96
// friendly fire:
97
WARN_ACCIDENT
,
98
WARN_TARGETED
,
99
DECLARE_ROGUE
,
100
101
// support:
102
PICTURE
,
103
REQUEST_PICTURE
,
104
REQUEST_SUPPORT
,
105
106
// traffic control:
107
CALL_INBOUND
,
108
CALL_APPROACH
,
109
CALL_CLEARANCE
,
110
CALL_FINALS
,
111
CALL_WAVE_OFF
,
112
113
NUM_ACTIONS
114
};
115
116
RadioMessage
(
Ship
* dst,
const
Ship
*
sender
,
int
action
);
117
RadioMessage
(
Element
* dst,
const
Ship
*
sender
,
int
action
);
118
RadioMessage
(
const
RadioMessage
& rm);
119
virtual
~RadioMessage
();
120
121
// accessors:
122
static
const
char
*
ActionName
(
int
a);
123
124
const
Ship
*
Sender
()
const
{
return
sender
; }
125
Ship
*
DestinationShip
()
const
{
return
dst_ship
; }
126
Element
*
DestinationElem
()
const
{
return
dst_elem
; }
127
int
Action
()
const
{
return
action
; }
128
List<SimObject>
&
TargetList
() {
return
target_list
; }
129
const
Point
&
Location
()
const
{
return
location
; }
130
const
Text
&
Info
()
const
{
return
info
; }
131
int
Channel
()
const
{
return
channel
; }
132
133
// mutators:
134
void
SetDestinationShip
(
Ship
* s) {
dst_ship
= s; }
135
void
SetDestinationElem
(
Element
* e) {
dst_elem
= e; }
136
void
AddTarget
(
SimObject
* s);
137
void
SetLocation
(
const
Point
& l) {
location
= l; }
138
void
SetInfo
(
Text
msg) {
info
= msg; }
139
void
SetChannel
(
int
c) {
channel
= c; }
140
141
protected
:
142
const
Ship
*
sender
;
143
Ship
*
dst_ship
;
144
Element
*
dst_elem
;
145
int
action
;
146
List<SimObject>
target_list
;
147
Point
location
;
148
Text
info
;
149
int
channel
;
150
};
151
152
// +--------------------------------------------------------------------+
153
154
#endif RadioMessage_h
155
Stars45
RadioMessage.h
Generated on Thu May 31 2012 16:31:14 for Starshatter_Open by
1.8.1