forked from electronicarts/CnC_Tiberian_Dawn
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMISSION.H
136 lines (118 loc) · 5.07 KB
/
MISSION.H
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/*
** Command & Conquer(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* $Header: F:\projects\c&c\vcs\code\mission.h_v 2.16 16 Oct 1995 16:45:46 JOE_BOSTIC $ */
/***********************************************************************************************
*** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
***********************************************************************************************
* *
* Project Name : Command & Conquer *
* *
* File Name : MISSION.H *
* *
* Programmer : Joe L. Bostic *
* *
* Start Date : April 23, 1994 *
* *
* Last Update : April 23, 1994 [JLB] *
* *
*---------------------------------------------------------------------------------------------*
* Functions: *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#ifndef MISSION_H
#define MISSION_H
#include "object.h"
#include "monoc.h"
/****************************************************************************
** This handles order assignment and tracking. The order is used to guide
** overall AI processing.
*/
class MissionClass : public ObjectClass
{
public:
/*
** This the tactical strategy to use. It is used by the unit script. This
** is a general guide for unit AI processing.
*/
MissionType Mission;
MissionType SuspendedMission;
/*
** The order queue is used for orders that should take effect when the vehicle
** has reached the center point of a cell. The queued order number is +1 when stored here
** so that 0 will indicated there is no queued order.
*/
MissionType MissionQueue;
char Status;
/*---------------------------------------------------------------------
** Constructors, Destructors, and overloaded operators.
*/
MissionClass(void);
virtual ~MissionClass(void) {};
/*---------------------------------------------------------------------
** Member function prototypes.
*/
#ifdef CHEAT_KEYS
void Debug_Dump(MonoClass *mono) const;
#endif
virtual MissionType Get_Mission(void) const;
virtual void Assign_Mission(MissionType mission);
virtual bool Commence(void);
virtual void AI(void);
/*
** Support functions.
*/
virtual int Mission_Sleep(void);
virtual int Mission_Ambush(void);
virtual int Mission_Attack(void);
virtual int Mission_Capture(void);
virtual int Mission_Guard(void);
virtual int Mission_Guard_Area(void);
virtual int Mission_Harvest(void);
virtual int Mission_Hunt(void);
virtual int Mission_Timed_Hunt(void);
virtual int Mission_Move(void);
virtual int Mission_Retreat(void);
virtual int Mission_Return(void);
virtual int Mission_Stop(void);
virtual int Mission_Unload(void);
virtual int Mission_Enter(void);
virtual int Mission_Construction(void);
virtual int Mission_Deconstruction(void);
virtual int Mission_Repair(void);
virtual int Mission_Missile(void);
virtual void Set_Mission(MissionType mission);
static char const * Mission_Name(MissionType order);
static MissionType Mission_From_Name(char const *name);
virtual void Override_Mission(MissionType mission, TARGET, TARGET);
virtual bool Restore_Mission(void);
/*
** File I/O.
*/
virtual void Code_Pointers(void);
virtual void Decode_Pointers(void);
private:
/*
** This the thread processing timer. When this value counts down to zero, then
** more script processing may occur.
*/
TCountDownTimerClass Timer;
/*
** These are the order names as ASCII strings.
*/
static char const * Missions[MISSION_COUNT];
};
#endif