Debian Codegraph @

Descent3/ObjScript.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/ObjScript.h $
21 * $Revision: 21 $
22 * $Date: 1/13/99 2:27p $
23 * $Author: Jeff $
24 *
25 * Object scripting
26 *
27 * $Log: /DescentIII/main/ObjScript.h $
28 *
29 * 21 1/13/99 2:27p Jeff
30 * added an is_dying flag for evt_destroy to determine whether the event
31 * is due to level end or because it really is dying
32 *
33 * 20 1/08/99 2:56p Samir
34 * Ripped out OSIRIS1.
35 *
36 * 19 10/18/98 2:59p Jason
37 * fixes for beta4
38 *
39 * 18 8/19/98 1:35p Samir
40 * added ReinitTrigger
41 *
42 * 17 8/18/98 12:57a Samir
43 * created function to reinitialize scripts from savegame.
44 *
45 * 16 5/26/98 7:06p Samir
46 * is_custom added to determine if named script is custom of default.
47 *
48 * 15 4/19/98 9:56p Chris
49 * AI system is integrated with OSIRIS. Path system is integrated with
50 * the AI system. Bugs will ensue.
51 *
52 * 14 4/15/98 5:56p Chris
53 * Made the AI system script friendly
54 *
55 * 13 3/16/98 11:19a Jason
56 * got scripts working with multiplayer
57 *
58 * 12 2/09/98 11:07a Samir
59 * Added reset function to script_info.
60 *
61 * 11 1/23/98 6:11p Samir
62 * Addded some trigger functions.
63 *
64 * 10 1/23/98 3:06p Samir
65 * Cleaned up and enhanced script_info structure.
66 *
67 * 9 1/22/98 6:23p Samir
68 * Moved constants from ObjCScript to ObjScript.h
69 *
70 * 8 1/21/98 5:02p Samir
71 * Don't delete pointers in script_info when destroyed.
72 *
73 * 7 1/21/98 4:33p Luke
74 * Null pointers when destroying script_info.
75 *
76 * 6 1/20/98 4:12p Samir
77 * New script housekeeping system.
78 *
79 * 5 9/24/97 2:58p Samir
80 * Moved some script defines from mission.h to ObjScript.h
81 *
82 * 4 9/10/97 4:00p Samir
83 * added define for default level script id.
84 *
85 * 3 9/10/97 2:00p Samir
86 * added extern to Level_script D3X Program pointer.
87 *
88 * 2 8/21/97 5:56p Samir
89 * Took out script specific stuff from ObjInit and moved to ObjScript
90 *
91 * 2 6/02/97 1:06p Samir
92 * Added some more scripting functions.
93 *
94 * $NoKeywords: $
95 */
96
97 #ifndef OBJSCRIPT_H
98 #define OBJSCRIPT_Hcxx . . $ `Descent3/ObjScript.h:98:9`!
99
100 #include "pstypes.h"cxx . . $ `<file>/lib/pstypes.h`/
101 #include "d3x_op.h"cxx . . $ `<file>/lib/d3x_op.h`/
102 #include "vecmat.h"cxx . . $ `<file>/lib/vecmat.h`/
103
104 struct objectcxx . . $ object#;
105 struct triggercxx . . $ trigger#;
106
107 // assigns scripts for a level.
108 extern void AssignScriptsForLevelcxx . . $ AssignScriptsForLevel(49f6e7a06ebc5aa8).();
109
110 // free scripts for a level
111 extern void FreeScriptsForLevelcxx . . $ FreeScriptsForLevel(49f6e7a06ebc5aa8).();
112
113 // allocates and initializes the scripts for an object.
114 extern void InitObjectScriptscxx . . $ InitObjectScripts(674fac047436fc5b).(objectcxx . . $ object# *objp, bool do_evt_created = true);
115
116 // frees all scripts for an object.
117 extern void FreeObjectScriptscxx . . $ FreeObjectScripts(674fac047436fc5b).(objectcxx . . $ object# *objp, bool level_end = false);
118
119 // allocates and initializes the scripts for a trigger.
120 extern void InitTriggerScriptcxx . . $ InitTriggerScript(b5f99d175f3c6885).(triggercxx . . $ trigger# *tp);
121
122 // frees all scripts for an trigger.
123 extern void FreeTriggerScriptcxx . . $ FreeTriggerScript(2141560ee082416a).(triggercxx . . $ trigger# *tp, bool level_end = false);
124
125 //@@// called to reinitialize an object's 'state' given the current script element of object.
126 //@@// refuses to call EVT_CREATED too. this just restores the state of a script given the current script_info
127 //@@// op is the object where the script will be assigned. the script should already be freed and ready
128 //@@void ReinitObjectScripts(object *op, script_info *script, int mem_size, vector *mem);
129 //@@
130 //@@// called to reinitialize a trigger's 'state' given the current script element of trigger.
131 //@@// refuses to call EVT_CREATED too. this just restores the state of a script given the current script_info
132 //@@// tp is the trogger where the script will be assigned. the script should already be freed and ready
133 //@@void ReinitTriggerScripts(trigger *tp, script_info *script, int mem_size, vector *mem);
134
135 #endif