Debian Codegraph @

Descent3/ship.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/ship.h $
21 * $Revision: 26 $
22 * $Date: 8/29/01 4:27p $
23 * $Author: Matt $
24 *
25 * Header for player ship page
26 *
27 * $Log: /DescentIII/main/ship.h $
28 *
29 * 26 8/29/01 4:27p Matt
30 * Increased MAX_SHIPS from 10 to 30
31 *
32 * 25 2/04/00 9:52a Matt
33 * Increased MAX_SHIPS from 5 to 10
34 *
35 * 24 5/13/99 12:29p Jeff
36 * made AllowedShips an extern
37 *
38 * 23 5/12/99 1:58p Jason
39 * fixed yet more buggy/ugly code
40 *
41 * 22 4/16/99 6:00p Kevin
42 * Bunches of Demo stuff
43 *
44 * 21 4/11/99 3:04p Matt
45 * Reduced the max number of player ships from 30 to 5.
46 * Re-wrote the static ship name code to be more space efficient.
47 * Took default ship name (the one used to find the ship) out of string
48 * table.
49 *
50 * 20 11/03/98 6:16p Chris
51 * Starting to make on/off and spray weapons accessable to robots
52 *
53 * 19 10/13/98 12:56p Matt
54 * Finished (hopefully) with the ammo system. Added support for napalm
55 * fuel.
56 *
57 * 18 10/12/98 3:02p Jeff
58 * moved DEFAULT_SHIP #define into ship.h
59 *
60 * 17 10/02/98 1:47p Jason
61 * added lod player ships
62 *
63 * 16 9/10/98 11:53a Jason
64 * added hud config filename to ship page
65 *
66 * 15 8/07/98 2:43p Jeff
67 * flags gets cleared and initialized correctly
68 *
69 * 14 8/06/98 10:59a Jason
70 * added zoom weapons
71 *
72 * 13 7/31/98 5:23p Jason
73 * added ship armor scalars
74 *
75 * 12 6/29/98 3:08p Jason
76 * added on/off weapons
77 *
78 * 11 6/16/98 10:54a Jeff
79 *
80 * 10 6/01/98 10:37a Matt
81 * Added system to spew powerups when the player dies. Still needs Jason
82 * to deal with mng_FindSpecificGenericPage().
83 *
84 * 9 5/25/98 8:17p Matt
85 * Moved MAX_PLAYER_WEAPONS fromw weapon.h to player.h, so that the latter
86 * doesn't need to include the former, drastically speeding build times
87 * when weapon.h is changed.
88 *
89 * 8 3/19/98 1:02p Samir
90 * Added field for cockpit filename.
91 *
92 * 7 2/17/98 8:19p Matt
93 * Added looping & release sounds for player weapons
94 *
95 * 6 11/12/97 1:13p Jason
96 * added weapons that can ramp up
97 *
98 * 5 11/04/97 6:18p Chris
99 * Added support so that the player ship uses the robot's firing dialog.
100 *
101 * 4 10/21/97 11:57a Jason
102 * added ability to set dying model for player ship
103 *
104 * 3 9/03/97 4:37p Mark
105 * upped max_ship count
106 *
107 * 2 7/24/97 5:26p Matt
108 * Added SourceSafe header
109 *
110 * $NoKeywords: $
111 */
112
113 #ifndef SHIP_H
114 #define SHIP_Hcxx . . $ `Descent3/ship.h:114:9`!
115
116 #include "pstypes.h"cxx . . $ `<file>/lib/pstypes.h`/
117 #include "manage.h"cxx . . $ `<file>/lib/manage.h`/
118 #include "object.h"cxx . . $ `<file>/Descent3/object.h`/
119 #include "robotfirestruct.h"cxx . . $ `<file>/lib/robotfirestruct.h`/
120 #include "player.h"cxx . . $ `<file>/Descent3/player.h`/
121
122 #define MAX_SHIPScxx . . $ `Descent3/ship.h:122:9`! 30
123
124 // #ifdef DEMO //Demo2 will use GL
125 // #define DEFAULT_SHIP "Pyro-SE"
126 // #else
127 #define DEFAULT_SHIPcxx . . $ `Descent3/ship.h:127:9`! "Pyro-GL"
128 // #endif
129
130 // Ship fire flags
131 #define SFF_FUSIONcxx . . $ `Descent3/ship.h:131:9`! 1 // fires like fusion
132 #define SFF_ZOOMcxx . . $ `Descent3/ship.h:132:9`! 4 // Zooms in
133 #define SFF_TENTHScxx . . $ `Descent3/ship.h:133:9`! 8 // Ammo displays in tenths
134
135 // Default ship IDs
136 #define SHIP_PYRO_IDcxx . . $ `Descent3/ship.h:136:9`! 0
137 #define SHIP_PHOENIX_IDcxx . . $ `Descent3/ship.h:137:9`! 1
138 #define SHIP_MAGNUM_IDcxx . . $ `Descent3/ship.h:138:9`! 2
139
140 #define MAX_DEFAULT_SHIPScxx . . $ `Descent3/ship.h:140:9`! 3
141
142 // Ship flags
143 #define SF_DEFAULT_ALLOWcxx . . $ `Descent3/ship.h:143:9`! 1 // Allowed by default
144
145 struct shipcxx . . $ ship# {
146 char namecxx . . $ ship#name.[PAGENAME_LENcxx . . $ `lib/manage_external.h:49:9`!];
147 float sizecxx . . $ ship#size.;
148 physics_infocxx . . $ physics_info# phys_infocxx . . $ ship#phys_info.; // the physics data for this obj type.
149 int model_handlecxx . . $ ship#model_handle.; // a polygon model
150 int dying_model_handlecxx . . $ ship#dying_model_handle.; // Dying polygon model
151
152 int med_render_handlecxx . . $ ship#med_render_handle.; // handle for med res version of this object
153 int lo_render_handlecxx . . $ ship#lo_render_handle.; // handle for lo res version of this object
154
155 float med_lod_distancecxx . . $ ship#med_lod_distance.;
156 float lo_lod_distancecxx . . $ ship#lo_lod_distance.;
157
158 otype_wb_infocxx . . $ otype_wb_info# static_wbcxx . . $ ship#static_wb.[MAX_PLAYER_WEAPONScxx . . $ `Descent3/player_external_struct.h:91:9`!];
159 uint8_tcxx . . $ uint8_t# fire_flagscxx . . $ ship#fire_flags.[MAX_PLAYER_WEAPONScxx . . $ `Descent3/player_external_struct.h:91:9`!]; // how a particular weapon fires
160 int max_ammocxx . . $ ship#max_ammo.[MAX_PLAYER_WEAPONScxx . . $ `Descent3/player_external_struct.h:91:9`!];
161
162 int firing_soundcxx . . $ ship#firing_sound.[MAX_PLAYER_WEAPONScxx . . $ `Descent3/player_external_struct.h:91:9`!]; // sound the weapon makes while button held down
163 int firing_release_soundcxx . . $ ship#firing_release_sound.[MAX_PLAYER_WEAPONScxx . . $ `Descent3/player_external_struct.h:91:9`!]; // sound the weapon makes when the button is released
164
165 int spew_powerupcxx . . $ ship#spew_powerup.[MAX_PLAYER_WEAPONScxx . . $ `Descent3/player_external_struct.h:91:9`!]; // which powerup to spew for each weapon
166
167 char cockpit_namecxx . . $ ship#cockpit_name.[PAGENAME_LENcxx . . $ `lib/manage_external.h:49:9`!]; // name of cockpit.inf file
168 char hud_config_namecxx . . $ ship#hud_config_name.[PAGENAME_LENcxx . . $ `lib/manage_external.h:49:9`!]; // name of hud configuration file
169
170 float armor_scalarcxx . . $ ship#armor_scalar.;
171
172 int flagscxx . . $ ship#flags.;
173 uint8_tcxx . . $ uint8_t# usedcxx . . $ ship#used.;
174 };
175
176 extern int Num_shipscxx . . $ Num_ships.;
177 extern shipcxx . . $ ship# Shipscxx . . $ Ships.[MAX_SHIPScxx . . $ `Descent3/ship.h:122:9`!];
178
179 extern const char *AllowedShipscxx . . $ AllowedShips.[];
180
181 // Sets all ships to unused
182 void InitShipscxx . . $ InitShips(49f6e7a06ebc5aa8).();
183
184 // Allocs a ship for use, returns -1 if error, else index on success
185 int AllocShipcxx . . $ AllocShip(b126dc7c1de90089).();
186
187 // Frees ship index n
188 void FreeShipcxx . . $ FreeShip(d4f767463ce0a6b3).(int n);
189
190 // Gets next ship from n that has actually been alloced
191 int GetNextShipcxx . . $ GetNextShip(7864480464b09eea).(int n);
192
193 // Gets previous ship from n that has actually been alloced
194 int GetPrevShipcxx . . $ GetPrevShip(7864480464b09eea).(int n);
195
196 // Searches thru all ships for a specific name, returns -1 if not found
197 // or index of ship with name
198 int FindShipNamecxx . . $ FindShipName(5c4306d8553b3696).(const char *name);
199
200 // Given a filename, loads either the model or vclip found in that file. If type
201 // is not NULL, sets it to 1 if file is model, otherwise sets it to zero
202 int LoadShipImagecxx . . $ LoadShipImage(5c4306d8553b3696).(const char *filename);
203
204 // Given a ship handle, returns that ships image for framenum
205 int GetShipImagecxx . . $ GetShipImage(7864480464b09eea).(int handle);
206
207 // This is a very confusing function. It takes all the ships that we have loaded
208 // and remaps then into their proper places (if they are static).
209 void RemapShipscxx . . $ RemapShips(49f6e7a06ebc5aa8).();
210
211 // goes thru every entity that could possible have a ship index (ie objects, ships, etc)
212 // and changes the old index to the new index
213 void RemapAllShipObjectscxx . . $ RemapAllShipObjects(3e454b8ccf442868).(int old_index, int new_index);
214
215 #endif