Debian Codegraph @

Descent3/AIGoal.h

raw symbols SCIP
1 /*
2 * Descent 3
3 * Copyright (C) 2024 Parallax Software
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18 --- HISTORICAL COMMENTS FOLLOW ---
19
20 * $Logfile: /DescentIII/main/AIGoal.h $
21 * $Revision: 24 $
22 * $Date: 3/30/99 4:32p $
23 * $Author: Chris $
24 *
25 * AI Goal Header
26 *
27 * $Log: /DescentIII/main/AIGoal.h $
28 *
29 * 24 3/30/99 4:32p Chris
30 * Moved subtype to the main goal sturct (from goal_info). Made move
31 * relative object vec finishable. (Like get behind player)
32 *
33 * 23 1/25/99 7:43a Chris
34 * Added the GUID (Goal Unique Id) and added the ability for weapon
35 * batteries to always fire exactly forward.
36 *
37 * 22 12/14/98 1:07p Chris
38 * Allowed OSIRIS to change AI types
39 *
40 * 21 12/13/98 9:18p Chris
41 * Improved influence values for in-code goals (10000 to 1.0). Added
42 * GF_ORIENT stuff. :)
43 *
44 * 20 12/01/98 5:52p Chris
45 * Made the default influence 1.0
46 *
47 * 19 12/01/98 4:30p Chris
48 * Checked in a massive amount of AI work. Improved flocking code. :)
49 * (Still hacked lightly). In addition, I am moving toward using the
50 * composite dir. :)
51 *
52 * 18 9/17/98 12:08p Chris
53 * Improved support of AIGoalAddEnabler
54 *
55 * 17 9/17/98 11:11a Chris
56 * Worked on goal system and improved integration with OSIRIS (better
57 * EVT_AI_INIT event calling)
58 *
59 * 16 5/15/98 2:58p Chris
60 * More on the big AI update
61 *
62 * 15 5/14/98 12:21p Chris
63 * Updating AI system... Incomplete
64 *
65 * 14 5/11/98 4:39p Chris
66 * Improved AI system (goals have notifies and are more flexable).
67 *
68 * 13 4/30/98 11:31a Chris
69 * Massive upgrades to the AI system
70 *
71 * 12 4/22/98 1:15p Chris
72 * Incremental work on paths and goals
73 *
74 * 11 4/21/98 11:25a Chris
75 * Improving GET_TO_OBJ goal
76 *
77 * 10 4/20/98 3:19p Chris
78 * Added more goal/path support
79 *
80 * 9 4/20/98 12:27p Chris
81 * Made AIG_GET_TO_OBJECT work.
82 *
83 * 8 2/11/98 7:00p Chris
84 * Removed priority (changed to influence) and added activation_level
85 *
86 * 7 1/14/98 7:57p Chris
87 * Improving the awareness system
88 *
89 * 6 11/14/97 11:55p Chris
90 * Dodge goals are semi-functional
91 *
92 * 5 7/15/97 7:29p Chris
93 * Added a sound for helicopter blades.
94 *
95 * 4 7/15/97 5:35p Chris
96 * New AI code
97 *
98 * 3 7/15/97 4:59p Chris
99 * added support for AI and animations
100 *
101 * $NoKeywords: $
102 */
103
104 #ifndef AIGOAL_H_
105 #define AIGOAL_H_
106
107 #include "object.h"
108
109 // Clears and removes all goals for a robot
110 void GoalClearAll(object *obj);
111
112 // Adds a new goal
113 int GoalAddGoal(object *obj, uint32_t goal_type, void *args, int level = 0, float influence = 1.0f, int f_goal = 0,
114 int guid = -1, char subtype = 0);
115
116 // Adds a ending condition to a goal
117 int GoalAddDisabler(object *obj, int goal_index, uint8_t ender_type, void *args, float percent = 1.0f,
118 float interval = 0.0f);
119
120 // Adds a enabler condition to a goal
121 int GoalAddEnabler(object *obj, int goal_index, uint8_t enabler_type, void *arg_struct, float percent, float interval);
122
123 // Clears one goal
124 void GoalClearGoal(object *obj, goal *goal_ptr, int notify_reason = AI_INVALID_INDEX);
125
126 // Init's an AI to no goals
127 void GoalInitTypeGoals(object *obj, int ai_type);
128
129 // Does the goal related stuff for an object per frame
130 void GoalDoFrame(object *obj);
131
132 // Goal's path is complete. What next?
133 void GoalPathComplete(object *obj);
134
135 // Is a used goal currently enabled?
136 bool GoalIsGoalEnabled(object *obj, int goal_index);
137
138 // Determines minimum distance to look for nearby objects
139 float GoalDetermineTrackDist(object *obj);
140
141 // Returns a pointer to the highest priority non-blended goal
142 goal *GoalGetCurrentGoal(object *obj);
143
144 #endif