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