Debian Codegraph @

Descent3/spew.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/spew.h $
21 * $Revision: 14 $
22 * $Date: 5/02/99 2:52a $
23 * $Author: Jeff $
24 *
25 * header file for spew system
26 *
27 * $Log: /DescentIII/main/spew.h $
28 *
29 * 14 5/02/99 2:52a Jeff
30 * fixed spewers for turrets/rotaters
31 *
32 * 13 4/29/99 7:50p Jason
33 * fixed spew errors
34 *
35 * 12 10/18/98 9:04p Jeff
36 * sped up spew by saving values?
37 *
38 * 11 8/19/98 5:36p Samir
39 * moved some stuff from source to header file.
40 *
41 * 10 8/19/98 1:44p Samir
42 * added array of spew extern
43 *
44 * 9 2/04/98 6:09p Matt
45 * Changed object room number to indicate a terrain cell via a flag. Got
46 * rid of the object flag which used to indicate terrain.
47 *
48 * 8 2/02/98 5:40p Luke
49 *
50 * 7 2/02/98 3:10p Jeff
51 * new handle system, makes more reliable
52 *
53 * 6 1/28/98 6:29p Jeff
54 * Added the "RISCy" layer between predef statements and the game
55 *
56 * 5 1/26/98 11:01a Jeff
57 * changed spew struct to use object handles
58 *
59 * 4 1/23/98 7:00p Jeff
60 * checked object before using it bug fixed
61 *
62 * 3 1/23/98 5:18p Jeff
63 * Added in new timer and 3/5 of the random flags
64 *
65 * 2 1/23/98 3:03p Jeff
66 * Added mass into spew structure
67 *
68 * 1 1/23/98 12:07p Jeff
69 *
70 * 2 1/23/98 11:50a Jeff
71 * Creation of Spew system
72 *
73 * $NoKeywords: $
74 */
75
76 #ifndef __SPEW_H_
77 #define __SPEW_H_cxx . . $ `Descent3/spew.h:77:9`!
78
79 #include "vecmat.h"cxx . . $ `<file>/lib/vecmat.h`/
80
81 #define SF_FORCEUPDATEcxx . . $ `Descent3/spew.h:81:9`! 0x01 // this spew needs to do an update no matter what next time it spews (gunpoint)
82 #define SF_UPDATEDFORFRAMEcxx . . $ `Descent3/spew.h:82:9`! 0x02 // thie spew has already updated it's position for this frame, no need to do it again
83 #define SF_UPDATEEVERYFRAMEcxx . . $ `Descent3/spew.h:83:9`! 0x04
84
85 struct guninfocxx . . $ guninfo# {
86 int obj_handlecxx . . $ guninfo#obj_handle.; // handle to object (needed if it's gunpoint based)
87 int gunpointcxx . . $ guninfo#gunpoint.; // gunpoint number (needed if it's gunpoint based)
88 };
89
90 struct pointinfocxx . . $ pointinfo# {
91 vectorcxx . . $ vector# origincxx . . $ pointinfo#origin.; // origin of the viseffect (needed if it's NOT gunpoint based)
92 vectorcxx . . $ vector# normalcxx . . $ pointinfo#normal.; // normal of the point
93 int room_numcxx . . $ pointinfo#room_num.; // room number of point of origin
94 };
95
96 struct spewinfocxx . . $ spewinfo# {
97 uint8_tcxx . . $ uint8_t# flagscxx . . $ spewinfo#flags.; // flags
98 bool inusecxx . . $ spewinfo#inuse.; // if this slot is in use
99 bool use_gunpointcxx . . $ spewinfo#use_gunpoint.; // is this a gunpoint based object (yes=true)
100 bool real_objcxx . . $ spewinfo#real_obj.; // if this object should be treated as a real object (can hurt you) (yes=true)
101
102 unioncxx . . $ spewinfo#$anonymous_type_0# {
103 pointinfocxx . . $ pointinfo# ptcxx . . $ spewinfo#$anonymous_type_0#pt.; // point info structure (needed if it's point based)
104 guninfocxx . . $ guninfo# gpcxx . . $ spewinfo#$anonymous_type_0#gp.; // gunpoint info structure (needed if it's gunpoint based)
105 };
106
107 int effect_typecxx . . $ spewinfo#effect_type.; // viseffect type (see fireball.h)
108 int phys_infocxx . . $ spewinfo#phys_info.; // physics info type (see physics.h)
109 int randomcxx . . $ spewinfo#random.; // should the viseffect have some randomness to it (must be 0 if real)
110 int handlecxx . . $ spewinfo#handle.; // stored handle for speweffect
111
112 float dragcxx . . $ spewinfo#drag.; // drag of viseffect
113 float masscxx . . $ spewinfo#mass.; // mass of viseffect
114 float time_intcxx . . $ spewinfo#time_int.; // how often it should be 'updated'
115 float longevitycxx . . $ spewinfo#longevity.; // lifespan of the viseffect (i.e. how long should the puff of smoke last)
116 float lifetimecxx . . $ spewinfo#lifetime.; // how long viseffect should run (0=infinity, until asked to stop)
117 float sizecxx . . $ spewinfo#size.; // size of viseffect blob
118 float speedcxx . . $ spewinfo#speed.; // speed of viseffect blob
119 float time_until_next_blobcxx . . $ spewinfo#time_until_next_blob.; // per spewer
120 float start_timecxx . . $ spewinfo#start_time.; // time viseffect started
121
122 vectorcxx . . $ vector# gp_normalcxx . . $ spewinfo#gp_normal., gun_pointcxx . . $ spewinfo#gun_point.; // vectors saved to keep from recalculating
123 };
124
125 #define SPEW_RAND_WIGGLEcxx . . $ `Descent3/spew.h:125:9`! 1
126 #define SPEW_RAND_SPEEDcxx . . $ `Descent3/spew.h:126:9`! 2
127 #define SPEW_RAND_SIZEcxx . . $ `Descent3/spew.h:127:9`! 4
128 #define SPEW_RAND_SLIDEcxx . . $ `Descent3/spew.h:128:9`! 8
129 #define SPEW_RAND_LIFETIMEcxx . . $ `Descent3/spew.h:129:9`! 16
130
131 #define MAX_SPEW_EFFECTScxx . . $ `Descent3/spew.h:131:9`! 50 // maximum viseffects to be handled by at once
132
133 // spew array
134 extern spewinfocxx . . $ spewinfo# SpewEffectscxx . . $ SpewEffects.[];
135
136 // spew count value.
137 extern int spew_countcxx . . $ spew_count.;
138
139 // Initializes the Spew system
140 void SpewInitcxx . . $ SpewInit(49f6e7a06ebc5aa8).();
141
142 // Creates a Spew effect
143 // spew -> Pointer to spewinfo structure (that is filled out)...may be deleted after function call
144 // returns a handle to the spew effect
145 int SpewCreatecxx . . $ SpewCreate(a164fa5b42524a40).(spewinfocxx . . $ spewinfo# *spew);
146
147 // Does a step in a spew system
148 void SpewEmitAllcxx . . $ SpewEmitAll(49f6e7a06ebc5aa8).(void);
149
150 // Clears a Spew Event given a handle to it
151 void SpewClearEventcxx . . $ SpewClearEvent(918ebd27a9ddbad3).(int handle, bool force = true);
152
153 #endif