Debian Codegraph @

Descent3/player_external_struct.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/player_external_struct.h $
21 * $Revision: 13 $
22 * $Date: 5/20/99 2:48a $
23 * $Author: Matt $
24 *
25 * Contains the structs needed for player definition (for DLL export)
26 *
27 * $Log: /DescentIII/main/player_external_struct.h $
28 *
29 * 13 5/20/99 2:48a Matt
30 * Auto-waypoints now stored & used per player. Manual waypoints will all
31 * players, once Jason makes it work.
32 *
33 * 12 5/10/99 12:23a Chris
34 * Fixed another hearing/seeing case. :) Buddy bot now is in the player
35 * ship at respawn
36 *
37 * 11 5/03/99 2:36p Jason
38 * added start index
39 *
40 * 10 4/23/99 1:56a Matt
41 * Added system for counting kills of friendly objects
42 *
43 * 9 4/06/99 6:02p Matt
44 * Added score system
45 *
46 * 8 4/05/99 3:34p Matt
47 * Cleaned up player start flags
48 *
49 * 7 3/23/99 12:33p Kevin
50 * More post level results improvements
51 *
52 * 6 2/16/99 3:48p Jason
53 * added marker updates to multiplayer server stream
54 *
55 * 5 2/06/99 10:03p Matt
56 * Added keys system
57 *
58 * 4 2/02/99 7:06p Jason
59 * added ranking system
60 *
61 * 3 1/28/99 6:17p Jason
62 * added markers
63 *
64 * 2 1/21/99 11:15p Jeff
65 * pulled out some structs and defines from header files and moved them
66 * into seperate header files so that multiplayer dlls don't require major
67 * game headers, just those new headers. Side effect is a shorter build
68 * time. Also cleaned up some header file #includes that weren't needed.
69 * This affected polymodel.h, object.h, player.h, vecmat.h, room.h,
70 * manage.h and multi.h
71 *
72 * $NoKeywords: $
73 */
74
75 #ifndef _PLAYER_EXTERNAL_STRUCT_H_
76 #define _PLAYER_EXTERNAL_STRUCT_H_cxx . . $ `Descent3/player_external_struct.h:76:9`!
77
78 #include <cstdint>
79
80 #include "pstypes.h"cxx . . $ `<file>/lib/pstypes.h`/
81 #include "vecmat_external.h"cxx . . $ `<file>/lib/vecmat_external.h`/
82 #include "object_external_struct.h"cxx . . $ `<file>/lib/object_external_struct.h`/
83 #include "multi_external.h"cxx . . $ `<file>/Descent3/multi_external.h`/
84 #include "Inventory.h"cxx . . $ `<file>/Descent3/Inventory.h`/
85
86 #define MAX_PLAYERScxx . . $ `Descent3/player_external_struct.h:86:9`! MAX_NET_PLAYERScxx . . $ `Descent3/multi_external.h:132:9`!
87 #define MAX_TEAMScxx . . $ `Descent3/player_external_struct.h:87:9`! 4
88
89 #define CALLSIGN_LENcxx . . $ `Descent3/player_external_struct.h:89:9`! 19
90 // THIS CONSTANT MUST NEVER BE OVER 32!!!
91 #define MAX_PLAYER_WEAPONScxx . . $ `Descent3/player_external_struct.h:91:9`! MAX_WBS_PER_OBJcxx . . $ `lib/robotfirestruct.h:32:9`!
92
93 #define TRACKER_ID_LENcxx . . $ `Descent3/player_external_struct.h:93:9`! 10 // if this is changed, make sure it's changed in pilottrack.h
94
95 // Info on player weapon firing.
96 // There is one of these each for the primary & secondary weapons
97 struct player_weaponcxx . . $ player_weapon# {
98 int32_tcxx . . $ int32_t# indexcxx . . $ player_weapon#index.; // the index of the current primary or secondary weapon
99 float firing_timecxx . . $ player_weapon#firing_time.; // how long the current weapon has been firing
100 int32_tcxx . . $ int32_t# sound_handlecxx . . $ player_weapon#sound_handle.; // the handle for the sound the firing weapon is making
101 };
102
103 // The structure for a player. Most of this data will be for multiplayer
104 struct playercxx . . $ player# {
105
106 // positional data for player starts
107 int32_tcxx . . $ int32_t# start_indexcxx . . $ player#start_index.;
108 vectorcxx . . $ vector# start_poscxx . . $ player#start_pos.; // where the player starts
109 int32_tcxx . . $ int32_t# start_roomnumcxx . . $ player#start_roomnum.;
110 matrixcxx . . $ matrix# start_orientcxx . . $ player#start_orient.;
111
112 int32_tcxx . . $ int32_t# startpos_flagscxx . . $ player#startpos_flags.; // these flags apply to the start position (used for teams)
113
114 int32_tcxx . . $ int32_t# ship_indexcxx . . $ player#ship_index.; // the index into the Ships array that this player is flying
115
116 // Who am I data
117 char callsigncxx . . $ player#callsign.[CALLSIGN_LENcxx . . $ `Descent3/player_external_struct.h:89:9`! + 1]; // The callsign of this player, for net purposes.
118
119 // Game data
120 uint32_tcxx . . $ uint32_t# flagscxx . . $ player#flags.; // Powerup flags, see above...
121 int32_tcxx . . $ int32_t# scorecxx . . $ player#score.; // The player's current score
122 float damage_magnitudecxx . . $ player#damage_magnitude.; // for shield effects
123 float edrain_magnitudecxx . . $ player#edrain_magnitude.; // for energy drain effects
124 float invul_magnitudecxx . . $ player#invul_magnitude.; // for invulnerability effects
125 float energycxx . . $ player#energy.; // Amount of energy remaining.
126 uint8_tcxx . . $ uint8_t# livescxx . . $ player#lives.; // Lives remaining, 0 = game over.
127 int8_tcxx . . $ int8_t# levelcxx . . $ player#level.; // Current level player is playing. (must be signed for secret levels)
128 int8_tcxx . . $ int8_t# starting_levelcxx . . $ player#starting_level.; // What level the player started on.
129 uint8_tcxx . . $ uint8_t# keyscxx . . $ player#keys.; // Which keys the player has
130 int16_tcxx . . $ int16_t# killer_objnumcxx . . $ player#killer_objnum.; // Who killed me.... (-1 if no one)
131 float invulnerable_timecxx . . $ player#invulnerable_time.; // Time left invulnerable
132 float last_hit_wall_sound_timecxx . . $ player#last_hit_wall_sound_time.; // Last time we played a hit wall sound
133 float last_homing_warning_sound_timecxx . . $ player#last_homing_warning_sound_time.; // Obvious :)
134 float last_thrust_timecxx . . $ player#last_thrust_time.; // Last time the player thrusted
135 float last_afterburner_timecxx . . $ player#last_afterburner_time.; // Last time the player used the afterburner
136 int16_tcxx . . $ int16_t# objnumcxx . . $ player#objnum.; // The object number of this player
137 int8_tcxx . . $ int8_t# teamcxx . . $ player#team.; // The team number this guy is on
138
139 // The current auto-waypoint for this player
140 int32_tcxx . . $ int32_t# current_auto_waypoint_roomcxx . . $ player#current_auto_waypoint_room.; // the most recent auto-waypoint, or -1
141
142 // Statistics...
143 // int score; // Current score.
144 float time_levelcxx . . $ player#time_level.; // Level time played
145 float time_totalcxx . . $ player#time_total.; // Game time played (high word = seconds)
146
147 int32_tcxx . . $ int32_t# num_hits_levelcxx . . $ player#num_hits_level.; // used for accuracy calculation.
148 int32_tcxx . . $ int32_t# num_discharges_levelcxx . . $ player#num_discharges_level.;
149
150 int16_tcxx . . $ int16_t# num_kills_levelcxx . . $ player#num_kills_level.; // Number of kills this level
151 int16_tcxx . . $ int16_t# friendly_kills_levelcxx . . $ player#friendly_kills_level.; // Number of friendly kills this level
152 int16_tcxx . . $ int16_t# num_kills_totalcxx . . $ player#num_kills_total.; // Number of kills total
153
154 // Player weapon info
155 uint32_tcxx . . $ uint32_t# weapon_flagscxx . . $ player#weapon_flags.; // Mask of currently owned weapons
156 uint16_tcxx . . $ uint16_t# weapon_ammocxx . . $ player#weapon_ammo.[MAX_PLAYER_WEAPONScxx . . $ `Descent3/player_external_struct.h:91:9`!]; // Ammo for each weapon
157
158 // Weapons
159 player_weaponcxx . . $ player_weapon# weaponcxx . . $ player#weapon.[2]; // Info on the player weapons
160 uint8_tcxx . . $ uint8_t# laser_levelcxx . . $ player#laser_level.; // Current level of the laser.
161
162 // lighting
163 float light_distcxx . . $ player#light_dist.;
164 float rcxx . . $ player#r., gcxx . . $ player#g., bcxx . . $ player#b.;
165
166 float ballspeedcxx . . $ player#ballspeed.;
167 uint8_tcxx . . $ uint8_t# num_ballscxx . . $ player#num_balls.;
168 float ball_rcxx . . $ player#ball_r.[3], ball_gcxx . . $ player#ball_g.[3], ball_bcxx . . $ player#ball_b.[3];
169
170 // Room tracking
171 int32_tcxx . . $ int32_t# oldroomcxx . . $ player#oldroom.;
172
173 // Inventory
174 Inventorycxx . . $ Inventory# inventorycxx . . $ player#inventory.;
175
176 // CounterMeasures Inventory
177 Inventorycxx . . $ Inventory# counter_measurescxx . . $ player#counter_measures.;
178
179 // Last time the player fired a weapon
180 float last_fire_weapon_timecxx . . $ player#last_fire_weapon_time.;
181
182 // Afterburner stuff
183 float afterburner_magcxx . . $ player#afterburner_mag.; // How big the thrust is for the afterburner
184 float thrust_magcxx . . $ player#thrust_mag.;
185 int32_tcxx . . $ int32_t# afterburner_sound_handlecxx . . $ player#afterburner_sound_handle.;
186 float afterburn_time_leftcxx . . $ player#afterburn_time_left.;
187
188 int32_tcxx . . $ int32_t# thruster_sound_handlecxx . . $ player#thruster_sound_handle.;
189 int32_tcxx . . $ int32_t# thruster_sound_statecxx . . $ player#thruster_sound_state.;
190
191 // For small views and external cameras
192 int32_tcxx . . $ int32_t# small_left_objcxx . . $ player#small_left_obj., small_right_objcxx . . $ player#small_right_obj., small_dll_objcxx . . $ player#small_dll_obj.;
193
194 // Multiplayer stuff
195 uint8_tcxx . . $ uint8_t# multiplayer_flagscxx . . $ player#multiplayer_flags.;
196 uint8_tcxx . . $ uint8_t# last_multiplayer_flagscxx . . $ player#last_multiplayer_flags.;
197 float last_guided_timecxx . . $ player#last_guided_time.;
198
199 char tracker_idcxx . . $ player#tracker_id.[TRACKER_ID_LENcxx . . $ `Descent3/player_external_struct.h:93:9`!];
200 int32_tcxx . . $ int32_t# killscxx . . $ player#kills.;
201 int32_tcxx . . $ int32_t# deathscxx . . $ player#deaths.;
202 int32_tcxx . . $ int32_t# suicidescxx . . $ player#suicides.;
203 float rankcxx . . $ player#rank.;
204 float lateral_thrustcxx . . $ player#lateral_thrust.; // total lateral movement over the whole game
205 float rotational_thrustcxx . . $ player#rotational_thrust.; // total rotational movement over the whole game
206 uint32_tcxx . . $ uint32_t# time_in_gamecxx . . $ player#time_in_game.; // seconds in game
207 objectcxx . . $ object# *guided_objcxx . . $ player#guided_obj., *user_timeout_objcxx . . $ player#user_timeout_obj.;
208
209 float zoom_distancecxx . . $ player#zoom_distance.;
210
211 // Scalar values
212 float movement_scalarcxx . . $ player#movement_scalar.;
213 float damage_scalarcxx . . $ player#damage_scalar.;
214 float armor_scalarcxx . . $ player#armor_scalar.;
215 float turn_scalarcxx . . $ player#turn_scalar.;
216 float weapon_recharge_scalarcxx . . $ player#weapon_recharge_scalar.;
217 float weapon_speed_scalarcxx . . $ player#weapon_speed_scalar.;
218
219 // Observer stuff
220 int32_tcxx . . $ int32_t# piggy_objnumcxx . . $ player#piggy_objnum.;
221 int32_tcxx . . $ int32_t# piggy_sigcxx . . $ player#piggy_sig.;
222
223 // Custom texture stuff
224 int32_tcxx . . $ int32_t# custom_texture_handlecxx . . $ player#custom_texture_handle.;
225
226 // Ship permissions (1 bit per ship)
227 int32_tcxx . . $ int32_t# ship_permissionscxx . . $ player#ship_permissions.;
228
229 // For invul hit effect
230 vectorcxx . . $ vector# invul_vectorcxx . . $ player#invul_vector.;
231
232 // Used to disable various controller input from scripting
233 uint32_tcxx . . $ uint32_t# controller_bitflagscxx . . $ player#controller_bitflags.;
234
235 // Marker stuff
236 int16_tcxx . . $ int16_t# num_markerscxx . . $ player#num_markers.;
237
238 int16_tcxx . . $ int16_t# num_deaths_levelcxx . . $ player#num_deaths_level.; // Number of kills this level
239 int16_tcxx . . $ int16_t# num_deaths_totalcxx . . $ player#num_deaths_total.; // Number of kills total
240
241 };
242
243 #endif