| 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/object_external_struct.h $ |
| 21 | * $Revision: 19 $ |
| 22 | * $Date: 4/28/99 11:28a $ |
| 23 | * $Author: Jason $ |
| 24 | * |
| 25 | * Contains the structures needed for object definition (can be exported if needed to DLLs) |
| 26 | * |
| 27 | * $Log: /DescentIII/main/object_external_struct.h $ |
| 28 | * |
| 29 | * 19 4/28/99 11:28a Jason |
| 30 | * made real viseffects not cast light |
| 31 | * |
| 32 | * 18 4/22/99 4:13p Matt |
| 33 | * Deleted sounds array from the object struct, since it was never used. |
| 34 | * |
| 35 | * 17 4/21/99 12:41p Jason |
| 36 | * make explosion system framerate independant |
| 37 | * |
| 38 | * 16 4/18/99 8:13p Chris |
| 39 | * Fixed the floating flare problems (where windows where broken out and |
| 40 | * the flare remained) |
| 41 | * |
| 42 | * 15 4/06/99 6:02p Matt |
| 43 | * Added score system |
| 44 | * |
| 45 | * 14 4/05/99 4:39p Jason |
| 46 | * added groovy new smoke trails |
| 47 | * |
| 48 | * 13 4/05/99 10:31a Matt |
| 49 | * Changed soundsource volume from int to float. Duh. |
| 50 | * |
| 51 | * 12 4/03/99 4:24p Jason |
| 52 | * sped up attached vis effects by a large amount |
| 53 | * |
| 54 | * 11 3/28/99 5:56p Matt |
| 55 | * Added sparking effect for objects |
| 56 | * |
| 57 | * 10 2/25/99 11:01a Matt |
| 58 | * Added new explosion system. |
| 59 | * |
| 60 | * 9 2/25/99 10:30a Jason |
| 61 | * added nonvis generic/robot system |
| 62 | * |
| 63 | * 8 2/22/99 2:04p Jason |
| 64 | * added different damages for players and generics |
| 65 | * |
| 66 | * 7 2/21/99 4:20p Matt |
| 67 | * Added SoundSource objects (and reformatted parts of the object header |
| 68 | * files). |
| 69 | * |
| 70 | * 6 2/09/99 9:58a Chris |
| 71 | * Massive BOA update :) Terrain happy now. Vis happy now. Sound happy |
| 72 | * now. |
| 73 | * |
| 74 | * 5 2/03/99 12:43a Chris |
| 75 | * Added Obj_GetGroundPos |
| 76 | * |
| 77 | * 4 2/01/99 4:17p Jason |
| 78 | * more changes for multisafe |
| 79 | * |
| 80 | * 3 1/22/99 8:53p Jeff |
| 81 | * added custom-default script overrides |
| 82 | * |
| 83 | * 2 1/21/99 11:15p Jeff |
| 84 | * pulled out some structs and defines from header files and moved them |
| 85 | * into seperate header files so that multiplayer dlls don't require major |
| 86 | * game headers, just those new headers. Side effect is a shorter build |
| 87 | * time. Also cleaned up some header file #includes that weren't needed. |
| 88 | * This affected polymodel.h, object.h, player.h, vecmat.h, room.h, |
| 89 | * manage.h and multi.h |
| 90 | * |
| 91 | * $NoKeywords: $ |
| 92 | */ |
| 93 | |
| 94 | #include <cstdint> |
| 95 | |
| 96 | #include "vecmat_external.h"cxx . . $ `<file>/lib/vecmat_external.h`/ |
| 97 | #include "robotfirestruct.h"cxx . . $ `<file>/lib/robotfirestruct.h`/ |
| 98 | |
| 99 | #include "polymodel_external.h"cxx . . $ `<file>/lib/polymodel_external.h`/ |
| 100 | |
| 101 | #include "aistruct.h"cxx . . $ `<file>/Descent3/aistruct.h`/ //Not to be included for multiplayer game sdk |
| 102 | |
| 103 | #ifndef OBJECT_EXTERNAL_STRUCT_Hcxx . . $ `lib/object_external_struct.h:104:9`! |
| 104 | #define OBJECT_EXTERNAL_STRUCT_Hcxx . . $ `lib/object_external_struct.h:104:9`! |
| 105 | |
| 106 | // IMPORTANT: make sure MAX_OBJECTS meshes with handle bit allocation |
| 107 | #define MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`! 1500 // total number of objects in world |
| 108 | |
| 109 | // Splinter stuff |
| 110 | #define MAX_VERTS_PER_SPLINTERcxx . . $ `lib/object_external_struct.h:110:9`! 4 |
| 111 | |
| 112 | /* |
| 113 | * MACROS |
| 114 | */ |
| 115 | |
| 116 | // Flags and masks for cell numbers |
| 117 | #define ROOMNUM_CELLNUM_FLAGcxx . . $ `lib/object_external_struct.h:117:9`! 0x80000000 |
| 118 | #define ROOMNUM_CELLNUM_MASKcxx . . $ `lib/object_external_struct.h:118:9`! 0x7fffffff |
| 119 | |
| 120 | // Get a cell number from a room number |
| 121 | #define CELLNUMcxx . . $ `lib/object_external_struct.h:121:9`!(roomnum) ((roomnum) & ROOMNUM_CELLNUM_MASKcxx . . $ `lib/object_external_struct.h:118:9`!) |
| 122 | |
| 123 | // Make a room number from a cell number |
| 124 | #define MAKE_ROOMNUMcxx . . $ `lib/object_external_struct.h:124:9`!(cellnum) ((cellnum) | ROOMNUM_CELLNUM_FLAGcxx . . $ `lib/object_external_struct.h:117:9`!) |
| 125 | |
| 126 | // Determine if a roomnum is really a cell number |
| 127 | #define ROOMNUM_OUTSIDEcxx . . $ `lib/object_external_struct.h:127:9`!(roomnum) (((roomnum) & ROOMNUM_CELLNUM_FLAGcxx . . $ `lib/object_external_struct.h:117:9`!) != 0) |
| 128 | |
| 129 | // Determine if an object is outside |
| 130 | #define OBJECT_OUTSIDEcxx . . $ `lib/object_external_struct.h:130:9`!(objp) ROOMNUM_OUTSIDEcxx . . $ `lib/object_external_struct.h:127:9`!((objp)->roomnum) |
| 131 | |
| 132 | /* |
| 133 | * STRUCTURES |
| 134 | */ |
| 135 | |
| 136 | // lighting info |
| 137 | struct light_infocxx . . $ light_info# { |
| 138 | int32_tcxx . . $ int32_t# flagscxx . . $ light_info#flags.; // see above |
| 139 | float light_distancecxx . . $ light_info#light_distance.; |
| 140 | float red_light1cxx . . $ light_info#red_light1., green_light1cxx . . $ light_info#green_light1., blue_light1cxx . . $ light_info#blue_light1.; |
| 141 | float red_light2cxx . . $ light_info#red_light2., green_light2cxx . . $ light_info#green_light2., blue_light2cxx . . $ light_info#blue_light2.; |
| 142 | float time_intervalcxx . . $ light_info#time_interval.; |
| 143 | float flicker_distancecxx . . $ light_info#flicker_distance.; |
| 144 | float directional_dotcxx . . $ light_info#directional_dot.; |
| 145 | int32_tcxx . . $ int32_t# timebitscxx . . $ light_info#timebits.; |
| 146 | uint8_tcxx . . $ uint8_t# anglecxx . . $ light_info#angle.; |
| 147 | uint8_tcxx . . $ uint8_t# lighting_render_typecxx . . $ light_info#lighting_render_type.; |
| 148 | }; |
| 149 | |
| 150 | struct effect_info_scxx . . $ effect_info_s# { |
| 151 | int32_tcxx . . $ int32_t# type_flagscxx . . $ effect_info_s#type_flags.; // see EF_FLAGS above |
| 152 | |
| 153 | float alphacxx . . $ effect_info_s#alpha.; // alpha value |
| 154 | float deform_rangecxx . . $ effect_info_s#deform_range.; // how many units to deform when drawing |
| 155 | float cloak_timecxx . . $ effect_info_s#cloak_time.; // how much time left cloaked |
| 156 | float deform_timecxx . . $ effect_info_s#deform_time.; // how much time left deforming |
| 157 | float color_timecxx . . $ effect_info_s#color_time.; // how much time left colored |
| 158 | float rcxx . . $ effect_info_s#r., gcxx . . $ effect_info_s#g., bcxx . . $ effect_info_s#b.; |
| 159 | |
| 160 | // For fading in/out |
| 161 | float fade_timecxx . . $ effect_info_s#fade_time.; |
| 162 | float fade_max_timecxx . . $ effect_info_s#fade_max_time.; |
| 163 | |
| 164 | float damage_timecxx . . $ effect_info_s#damage_time.; |
| 165 | float damage_per_secondcxx . . $ effect_info_s#damage_per_second.; // how much damage this object takes per second |
| 166 | float last_damage_timecxx . . $ effect_info_s#last_damage_time.; // last time this object took damage |
| 167 | int32_tcxx . . $ int32_t# damage_handlecxx . . $ effect_info_s#damage_handle.; // the object handle of the owner of the damage |
| 168 | |
| 169 | float volume_change_timecxx . . $ effect_info_s#volume_change_time.; |
| 170 | vectorcxx . . $ vector# volume_old_poscxx . . $ effect_info_s#volume_old_pos.; |
| 171 | int32_tcxx . . $ int32_t# volume_old_roomcxx . . $ effect_info_s#volume_old_room.; |
| 172 | |
| 173 | // For powerups only |
| 174 | float last_object_hit_timecxx . . $ effect_info_s#last_object_hit_time.; |
| 175 | int32_tcxx . . $ int32_t# last_object_hitcxx . . $ effect_info_s#last_object_hit.; |
| 176 | |
| 177 | // For specular lighting |
| 178 | vectorcxx . . $ vector# spec_poscxx . . $ effect_info_s#spec_pos.; |
| 179 | float spec_magcxx . . $ effect_info_s#spec_mag.; |
| 180 | float spec_rcxx . . $ effect_info_s#spec_r., spec_gcxx . . $ effect_info_s#spec_g., spec_bcxx . . $ effect_info_s#spec_b.; |
| 181 | |
| 182 | // For dynamic volume lighting |
| 183 | uint8_tcxx . . $ uint8_t# dynamic_this_framecxx . . $ effect_info_s#dynamic_this_frame.; |
| 184 | float dynamic_redcxx . . $ effect_info_s#dynamic_red., dynamic_greencxx . . $ effect_info_s#dynamic_green., dynamic_bluecxx . . $ effect_info_s#dynamic_blue.; |
| 185 | |
| 186 | // For liquid object |
| 187 | float liquid_time_leftcxx . . $ effect_info_s#liquid_time_left.; |
| 188 | uint8_tcxx . . $ uint8_t# liquid_magcxx . . $ effect_info_s#liquid_mag.; |
| 189 | |
| 190 | // For freeze objects |
| 191 | float freeze_scalarcxx . . $ effect_info_s#freeze_scalar.; |
| 192 | |
| 193 | // For attach objects |
| 194 | int32_tcxx . . $ int32_t# attach_line_handlecxx . . $ effect_info_s#attach_line_handle.; // handle to the object that this object is tethered to |
| 195 | |
| 196 | // Sound for special effects |
| 197 | int32_tcxx . . $ int32_t# sound_handlecxx . . $ effect_info_s#sound_handle.; |
| 198 | |
| 199 | // For spark effect |
| 200 | float spark_delaycxx . . $ effect_info_s#spark_delay.; // delay between sparks |
| 201 | float spark_timercxx . . $ effect_info_s#spark_timer.; // how long until next spark |
| 202 | float spark_time_leftcxx . . $ effect_info_s#spark_time_left.; // how long until sparking stops |
| 203 | |
| 204 | }; |
| 205 | |
| 206 | // Describes the next animation state for a robot |
| 207 | struct custom_animcxx . . $ custom_anim# { |
| 208 | float server_timecxx . . $ custom_anim#server_time.; |
| 209 | uint16_tcxx . . $ uint16_t# server_anim_framecxx . . $ custom_anim#server_anim_frame.; |
| 210 | |
| 211 | uint16_tcxx . . $ uint16_t# anim_start_framecxx . . $ custom_anim#anim_start_frame.; |
| 212 | uint16_tcxx . . $ uint16_t# anim_end_framecxx . . $ custom_anim#anim_end_frame.; |
| 213 | float anim_timecxx . . $ custom_anim#anim_time.; |
| 214 | float max_speedcxx . . $ custom_anim#max_speed.; |
| 215 | |
| 216 | int16_tcxx . . $ int16_t# anim_sound_indexcxx . . $ custom_anim#anim_sound_index.; |
| 217 | uint8_tcxx . . $ uint8_t# flagscxx . . $ custom_anim#flags.; |
| 218 | int8_tcxx . . $ int8_t# next_anim_typecxx . . $ custom_anim#next_anim_type.; |
| 219 | }; |
| 220 | |
| 221 | struct multi_turretcxx . . $ multi_turret# { |
| 222 | float timecxx . . $ multi_turret#time.; |
| 223 | float last_timecxx . . $ multi_turret#last_time.; |
| 224 | uint8_tcxx . . $ uint8_t# num_turretscxx . . $ multi_turret#num_turrets.; |
| 225 | float *last_keyframescxx . . $ multi_turret#last_keyframes.; |
| 226 | float *keyframescxx . . $ multi_turret#keyframes.; |
| 227 | uint8_tcxx . . $ uint8_t# flagscxx . . $ multi_turret#flags.; |
| 228 | }; |
| 229 | |
| 230 | // Information specific to objects that render as a polygon model |
| 231 | struct polyobj_infocxx . . $ polyobj_info# { |
| 232 | int16_tcxx . . $ int16_t# model_numcxx . . $ polyobj_info#model_num.; // Which polygon model this object is |
| 233 | int16_tcxx . . $ int16_t# dying_model_numcxx . . $ polyobj_info#dying_model_num.; // The dying model for this object |
| 234 | |
| 235 | float anim_start_framecxx . . $ polyobj_info#anim_start_frame.; |
| 236 | float anim_framecxx . . $ polyobj_info#anim_frame.; // The model's current animation frame |
| 237 | float anim_end_framecxx . . $ polyobj_info#anim_end_frame.; |
| 238 | float anim_timecxx . . $ polyobj_info#anim_time.; |
| 239 | uint32_tcxx . . $ uint32_t# anim_flagscxx . . $ polyobj_info#anim_flags.; // Looping/notify at finish/pending |
| 240 | float max_speedcxx . . $ polyobj_info#max_speed.; |
| 241 | |
| 242 | unioncxx . . $ polyobj_info#$anonymous_type_0# { |
| 243 | custom_animcxx . . $ custom_anim# multi_anim_infocxx . . $ polyobj_info#$anonymous_type_0#multi_anim_info.; // Multiplayer client info |
| 244 | custom_animcxx . . $ custom_anim# custom_anim_infocxx . . $ polyobj_info#$anonymous_type_0#custom_anim_info.; // Single-player/Server custom anim AIA_CUSTOM info |
| 245 | }; |
| 246 | multi_turretcxx . . $ multi_turret# multi_turret_infocxx . . $ polyobj_info#multi_turret_info.; |
| 247 | |
| 248 | uint32_tcxx . . $ uint32_t# subobj_flagscxx . . $ polyobj_info#subobj_flags.; // Mask of which subobjects to draw |
| 249 | int32_tcxx . . $ int32_t# tmap_overridecxx . . $ polyobj_info#tmap_override.; // If this is not -1, map all faces to this |
| 250 | }; |
| 251 | |
| 252 | // A shard of, presumably, glass |
| 253 | struct shard_info_scxx . . $ shard_info_s# { |
| 254 | vectorcxx . . $ vector# pointscxx . . $ shard_info_s#points.[3]; |
| 255 | float ucxx . . $ shard_info_s#u.[3], vcxx . . $ shard_info_s#v.[3]; |
| 256 | vectorcxx . . $ vector# normalcxx . . $ shard_info_s#normal.; |
| 257 | int16_tcxx . . $ int16_t# tmapcxx . . $ shard_info_s#tmap.; |
| 258 | }; |
| 259 | |
| 260 | struct line_info_scxx . . $ line_info_s# { |
| 261 | vectorcxx . . $ vector# end_poscxx . . $ line_info_s#end_pos.; // start pos is the object's .pos field |
| 262 | }; |
| 263 | |
| 264 | struct blast_info_scxx . . $ blast_info_s# { |
| 265 | float max_sizecxx . . $ blast_info_s#max_size.; |
| 266 | int32_tcxx . . $ int32_t# bm_handlecxx . . $ blast_info_s#bm_handle.; |
| 267 | }; |
| 268 | |
| 269 | struct dying_info_scxx . . $ dying_info_s# { |
| 270 | int32_tcxx . . $ int32_t# death_flagscxx . . $ dying_info_s#death_flags.; // Info about the death |
| 271 | float delay_timecxx . . $ dying_info_s#delay_time.; // How long until object dies |
| 272 | int32_tcxx . . $ int32_t# killer_playernumcxx . . $ dying_info_s#killer_playernum.; // The player who wille this object, or -1 if not a player |
| 273 | float last_spark_timecxx . . $ dying_info_s#last_spark_time.; |
| 274 | float last_fireball_timecxx . . $ dying_info_s#last_fireball_time.; |
| 275 | float last_smoke_timecxx . . $ dying_info_s#last_smoke_time.; |
| 276 | }; |
| 277 | |
| 278 | struct debris_info_scxx . . $ debris_info_s# { |
| 279 | int32_tcxx . . $ int32_t# death_flagscxx . . $ debris_info_s#death_flags.; // a copy of the parent's death flags |
| 280 | float last_smoke_timecxx . . $ debris_info_s#last_smoke_time.; |
| 281 | }; |
| 282 | |
| 283 | struct laser_info_scxx . . $ laser_info_s# { |
| 284 | int16_tcxx . . $ int16_t# parent_typecxx . . $ laser_info_s#parent_type.; // The type of the parent of this object |
| 285 | int16_tcxx . . $ int16_t# src_gun_numcxx . . $ laser_info_s#src_gun_num.; // The src gunpoint that this object fired from |
| 286 | |
| 287 | int32_tcxx . . $ int32_t# last_hit_handlecxx . . $ laser_info_s#last_hit_handle.; // For persistent weapons (survive object collision), object it most recently hit. |
| 288 | int32_tcxx . . $ int32_t# track_handlecxx . . $ laser_info_s#track_handle.; // Object this object is tracking. |
| 289 | float last_track_timecxx . . $ laser_info_s#last_track_time.; // Last track time (see if an object is visible) |
| 290 | |
| 291 | int32_tcxx . . $ int32_t# hit_statuscxx . . $ laser_info_s#hit_status.; // Zero not used |
| 292 | vectorcxx . . $ vector# hit_pntcxx . . $ laser_info_s#hit_pnt.; |
| 293 | vectorcxx . . $ vector# hit_wall_pntcxx . . $ laser_info_s#hit_wall_pnt.; |
| 294 | vectorcxx . . $ vector# hit_wall_normalcxx . . $ laser_info_s#hit_wall_normal.; |
| 295 | int32_tcxx . . $ int32_t# hit_roomcxx . . $ laser_info_s#hit_room.; |
| 296 | int32_tcxx . . $ int32_t# hit_pnt_roomcxx . . $ laser_info_s#hit_pnt_room.; |
| 297 | int16_tcxx . . $ int16_t# hit_facecxx . . $ laser_info_s#hit_face.; |
| 298 | |
| 299 | float multipliercxx . . $ laser_info_s#multiplier.; // Power if this is a fusion bolt (or other super weapon to be added). |
| 300 | float thrust_leftcxx . . $ laser_info_s#thrust_left.; // How many seconds of thrust are left before the weapon stops thrusting |
| 301 | |
| 302 | float last_drop_timecxx . . $ laser_info_s#last_drop_time.; // Last time a particle was dropped from this weapon |
| 303 | vectorcxx . . $ vector# last_smoke_poscxx . . $ laser_info_s#last_smoke_pos.; // Last place smoke was dropped from this weapon |
| 304 | bool casts_lightcxx . . $ laser_info_s#casts_light.; // Whether or not this weapon casts light |
| 305 | }; |
| 306 | |
| 307 | struct powerup_info_scxx . . $ powerup_info_s# { |
| 308 | int32_tcxx . . $ int32_t# countcxx . . $ powerup_info_s#count.; // how many/much we pick up (vulcan cannon only?) |
| 309 | }; |
| 310 | |
| 311 | struct splinter_info_scxx . . $ splinter_info_s# { |
| 312 | uint8_tcxx . . $ uint8_t# subobj_numcxx . . $ splinter_info_s#subobj_num.; |
| 313 | int16_tcxx . . $ int16_t# facenumcxx . . $ splinter_info_s#facenum.; |
| 314 | vectorcxx . . $ vector# vertscxx . . $ splinter_info_s#verts.[MAX_VERTS_PER_SPLINTERcxx . . $ `lib/object_external_struct.h:110:9`!]; |
| 315 | vectorcxx . . $ vector# centercxx . . $ splinter_info_s#center.; |
| 316 | }; |
| 317 | |
| 318 | // Data for sourcesource objects |
| 319 | struct soundsource_info_scxx . . $ soundsource_info_s# { |
| 320 | int32_tcxx . . $ int32_t# sound_indexcxx . . $ soundsource_info_s#sound_index.; |
| 321 | float volumecxx . . $ soundsource_info_s#volume.; |
| 322 | }; |
| 323 | |
| 324 | // information for physics sim for an object |
| 325 | // Some of this stuff is not object instance dependant -- so, it could be moved into |
| 326 | // a different struct to save space. (But, then we cannot change it -- i.e we might want a powerup |
| 327 | // to change the mass of an object...) Wait to move until we are optimizing -- see Chris if you move any fields |
| 328 | // out of the physics_info struct. Thanx! |
| 329 | struct physics_infocxx . . $ physics_info# { |
| 330 | vectorcxx . . $ vector# velocitycxx . . $ physics_info#velocity.; // Velocity vector of this object |
| 331 | vectorcxx . . $ vector# thrustcxx . . $ physics_info#thrust.; // Constant force applied to this object |
| 332 | unioncxx . . $ physics_info#$anonymous_type_1# { |
| 333 | vectorcxx . . $ vector# rotvelcxx . . $ physics_info#$anonymous_type_1#rotvel.; // Rotational velecity (angles) |
| 334 | float turn_ratecxx . . $ physics_info#$anonymous_type_1#turn_rate.; |
| 335 | }; |
| 336 | unioncxx . . $ physics_info#$anonymous_type_2# { |
| 337 | vectorcxx . . $ vector# rotthrustcxx . . $ physics_info#$anonymous_type_2#rotthrust.; // Rotational acceleration |
| 338 | }; |
| 339 | anglecxx . . $ angle# turnrollcxx . . $ physics_info#turnroll.; // Rotation caused by turn banking |
| 340 | float last_still_timecxx . . $ physics_info#last_still_time.; // The current delta position a wiggle has caused. |
| 341 | int32_tcxx . . $ int32_t# num_bouncescxx . . $ physics_info#num_bounces.; // Number of bounces before exploding (PHYSICS_UNLIMITED_BOUNCE is for unlimited bouncing) |
| 342 | |
| 343 | float coeff_restitutioncxx . . $ physics_info#coeff_restitution.; // What percent of velocity is kept after a bounce |
| 344 | float masscxx . . $ physics_info#mass.; // The mass of this object -- what about moving into type info |
| 345 | float dragcxx . . $ physics_info#drag.; // How fast this slows down -- what about moving into type info |
| 346 | float rotdragcxx . . $ physics_info#rotdrag.; // How much resistance to a change in spin rate -- what about moving into type info |
| 347 | unioncxx . . $ physics_info#$anonymous_type_3# { |
| 348 | float full_thrustcxx . . $ physics_info#$anonymous_type_3#full_thrust.; // Maximum thrust magnitude -- what about moving into type info |
| 349 | float max_velocitycxx . . $ physics_info#$anonymous_type_3#max_velocity.; |
| 350 | }; |
| 351 | unioncxx . . $ physics_info#$anonymous_type_4# { |
| 352 | float full_rotthrustcxx . . $ physics_info#$anonymous_type_4#full_rotthrust.; // Maximum rotation thrust magnitude -- what about moving into type info |
| 353 | float max_turn_ratecxx . . $ physics_info#$anonymous_type_4#max_turn_rate.; |
| 354 | }; |
| 355 | float max_turnroll_ratecxx . . $ physics_info#max_turnroll_rate.; // How fast is the maximum turnroll rate -- what about moving into type info |
| 356 | float turnroll_ratiocxx . . $ physics_info#turnroll_ratio.; // How much roll for a given turning rate -- what about moving into type info |
| 357 | float wiggle_amplitudecxx . . $ physics_info#wiggle_amplitude.; // The amplitude of an object's wiggle -- what about moving into type info |
| 358 | float wiggles_per_seccxx . . $ physics_info#wiggles_per_sec.; // How fast something wiggles -- what about moving into type info |
| 359 | |
| 360 | vectorcxx . . $ vector# dest_poscxx . . $ physics_info#dest_pos.; // destination position for interpolating velocity (for multiplayer only) |
| 361 | |
| 362 | unioncxx . . $ physics_info#$anonymous_type_5# { |
| 363 | float hit_die_dotcxx . . $ physics_info#$anonymous_type_5#hit_die_dot.; |
| 364 | int32_tcxx . . $ int32_t# stuck_roomcxx . . $ physics_info#$anonymous_type_5#stuck_room.; |
| 365 | }; |
| 366 | |
| 367 | unioncxx . . $ physics_info#$anonymous_type_6# { |
| 368 | float max_speed_timecxx . . $ physics_info#$anonymous_type_6#max_speed_time.; |
| 369 | int32_tcxx . . $ int32_t# stuck_portalcxx . . $ physics_info#$anonymous_type_6#stuck_portal.; |
| 370 | }; |
| 371 | |
| 372 | uint32_tcxx . . $ uint32_t# flagscxx . . $ physics_info#flags.; // Misc physics flags |
| 373 | }; |
| 374 | |
| 375 | struct shockwave_infocxx . . $ shockwave_info# { |
| 376 | uint32_tcxx . . $ uint32_t# damaged_listcxx . . $ shockwave_info#damaged_list.[(MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`! / 32) + 1]; |
| 377 | }; |
| 378 | |
| 379 | struct object_link_infocxx . . $ object_link_info# { |
| 380 | int32_tcxx . . $ int32_t# parent_handlecxx . . $ object_link_info#parent_handle.; |
| 381 | int32_tcxx . . $ int32_t# sobj_indexcxx . . $ object_link_info#sobj_index.; |
| 382 | vectorcxx . . $ vector# fveccxx . . $ object_link_info#fvec.; |
| 383 | vectorcxx . . $ vector# uveccxx . . $ object_link_info#uvec.; |
| 384 | vectorcxx . . $ vector# poscxx . . $ object_link_info#pos.; |
| 385 | }; |
| 386 | |
| 387 | struct tOSIRISScriptNodecxx . . $ tOSIRISScriptNode# { |
| 388 | uint16_tcxx . . $ uint16_t# DLLIDcxx . . $ tOSIRISScriptNode#DLLID.; |
| 389 | uint16_tcxx . . $ uint16_t# script_idcxx . . $ tOSIRISScriptNode#script_id.; |
| 390 | void *script_instancecxx . . $ tOSIRISScriptNode#script_instance.; |
| 391 | }; |
| 392 | |
| 393 | struct tOSIRISScriptcxx . . $ tOSIRISScript# { |
| 394 | tOSIRISScriptNodecxx . . $ tOSIRISScriptNode# custom_scriptcxx . . $ tOSIRISScript#custom_script.; |
| 395 | tOSIRISScriptNodecxx . . $ tOSIRISScriptNode# mission_scriptcxx . . $ tOSIRISScript#mission_script.; |
| 396 | tOSIRISScriptNodecxx . . $ tOSIRISScriptNode# level_scriptcxx . . $ tOSIRISScript#level_script.; |
| 397 | tOSIRISScriptNodecxx . . $ tOSIRISScriptNode# default_scriptcxx . . $ tOSIRISScript#default_script.; |
| 398 | }; |
| 399 | |
| 400 | // The data for an object |
| 401 | struct objectcxx . . $ object# { |
| 402 | uint8_tcxx . . $ uint8_t# typecxx . . $ object#type.; // what type of object this is... robot, weapon, hostage, powerup, fireball |
| 403 | uint8_tcxx . . $ uint8_t# dummy_typecxx . . $ object#dummy_type.; // stored type of an OBJ_DUMMY |
| 404 | uint16_tcxx . . $ uint16_t# idcxx . . $ object#id.; // which form of object...which powerup, robot, etc. |
| 405 | uint32_tcxx . . $ uint32_t# flagscxx . . $ object#flags.; |
| 406 | |
| 407 | char *namecxx . . $ object#name.; // the name of this object, or NULL |
| 408 | |
| 409 | int32_tcxx . . $ int32_t# handlecxx . . $ object#handle.; // unique handle for this object. See defines above |
| 410 | int16_tcxx . . $ int16_t# nextcxx . . $ object#next., prevcxx . . $ object#prev.; // id of next and previous connected object in Objects, -1 = no connection |
| 411 | |
| 412 | uint8_tcxx . . $ uint8_t# control_typecxx . . $ object#control_type.; // how this object is controlled |
| 413 | uint8_tcxx . . $ uint8_t# movement_typecxx . . $ object#movement_type.; // how this object moves |
| 414 | uint8_tcxx . . $ uint8_t# render_typecxx . . $ object#render_type.; // how this object renders |
| 415 | uint8_tcxx . . $ uint8_t# lighting_render_typecxx . . $ object#lighting_render_type.; // how this object is lit. See flags above |
| 416 | |
| 417 | int32_tcxx . . $ int32_t# roomnumcxx . . $ object#roomnum.; // room number or terrain cell containing object |
| 418 | |
| 419 | vectorcxx . . $ vector# poscxx . . $ object#pos.; // absolute x,y,z coordinate of center of object |
| 420 | matrixcxx . . $ matrix# orientcxx . . $ object#orient.; // orientation of object in world |
| 421 | vectorcxx . . $ vector# last_poscxx . . $ object#last_pos.; // where object was last frame |
| 422 | |
| 423 | uint16_tcxx . . $ uint16_t# renderframecxx . . $ object#renderframe.; // framenum this object was last rendered |
| 424 | |
| 425 | vectorcxx . . $ vector# wall_sphere_offsetcxx . . $ object#wall_sphere_offset.; |
| 426 | vectorcxx . . $ vector# anim_sphere_offsetcxx . . $ object#anim_sphere_offset.; |
| 427 | |
| 428 | float sizecxx . . $ object#size.; // 3d size of object - for collision detection |
| 429 | float shieldscxx . . $ object#shields.; // Starts at maximum, when <0, object dies.. |
| 430 | |
| 431 | int8_tcxx . . $ int8_t# contains_typecxx . . $ object#contains_type.; // Type of object this object contains (eg, spider contains powerup) |
| 432 | int8_tcxx . . $ int8_t# contains_idcxx . . $ object#contains_id.; // ID of object this object contains (eg, id = blue type = key) |
| 433 | int8_tcxx . . $ int8_t# contains_countcxx . . $ object#contains_count.; // number of objects of type:id this object contains |
| 434 | int8_tcxx . . $ int8_t# pad3cxx . . $ object#pad3.; // keep alignment |
| 435 | |
| 436 | float creation_timecxx . . $ object#creation_time.; // absolute time when this object was created |
| 437 | float lifeleftcxx . . $ object#lifeleft.; // how long until goes away, if OF_USES_LIFELEFT flag is set |
| 438 | float lifetimecxx . . $ object#lifetime.; // How long this object stays alive (in seconds) |
| 439 | |
| 440 | int32_tcxx . . $ int32_t# parent_handlecxx . . $ object#parent_handle.; // The handle of this object's parent |
| 441 | |
| 442 | int32_tcxx . . $ int32_t# attach_ultimate_handlecxx . . $ object#attach_ultimate_handle.; |
| 443 | int32_tcxx . . $ int32_t# attach_parent_handlecxx . . $ object#attach_parent_handle.; |
| 444 | int32_tcxx . . $ int32_t# *attach_childrencxx . . $ object#attach_children.; // List of object handles for connected children |
| 445 | |
| 446 | uint8_tcxx . . $ uint8_t# weapon_fire_flagscxx . . $ object#weapon_fire_flags.; // Used to indicate special weapon effects. See flags above. |
| 447 | |
| 448 | int8_tcxx . . $ int8_t# attach_typecxx . . $ object#attach_type.; |
| 449 | int16_tcxx . . $ int16_t# lowest_attached_viscxx . . $ object#lowest_attached_vis.; |
| 450 | unioncxx . . $ object#$anonymous_type_7# { |
| 451 | float attach_distcxx . . $ object#$anonymous_type_7#attach_dist.; |
| 452 | int16_tcxx . . $ int16_t# attach_indexcxx . . $ object#$anonymous_type_7#attach_index.; |
| 453 | }; |
| 454 | |
| 455 | // Movement info, determined by MOVEMENT_TYPE |
| 456 | unioncxx . . $ object#$anonymous_type_8# { |
| 457 | physics_infocxx . . $ physics_info# phys_infocxx . . $ object#$anonymous_type_8#phys_info.; // a physics object |
| 458 | shockwave_infocxx . . $ shockwave_info# shock_infocxx . . $ object#$anonymous_type_8#shock_info.; |
| 459 | object_link_infocxx . . $ object_link_info# obj_link_infocxx . . $ object#$anonymous_type_8#obj_link_info.; |
| 460 | } mtypecxx . . $ object#mtype.; |
| 461 | |
| 462 | // Collition detection stuff |
| 463 | vectorcxx . . $ vector# min_xyzcxx . . $ object#min_xyz., max_xyzcxx . . $ object#max_xyz.; // the current min & max extents of this object's sphere |
| 464 | |
| 465 | // Current weapon battery info for this object |
| 466 | dynamic_wb_infocxx . . $ dynamic_wb_info# *dynamic_wbcxx . . $ object#dynamic_wb.; |
| 467 | |
| 468 | // Explosion information |
| 469 | float impact_sizecxx . . $ object#impact_size.; |
| 470 | float impact_timecxx . . $ object#impact_time.; |
| 471 | float impact_player_damagecxx . . $ object#impact_player_damage.; |
| 472 | float impact_generic_damagecxx . . $ object#impact_generic_damage.; |
| 473 | float impact_forcecxx . . $ object#impact_force.; |
| 474 | |
| 475 | // Object change information |
| 476 | int32_tcxx . . $ int32_t# change_flagscxx . . $ object#change_flags.; |
| 477 | |
| 478 | // object generic vis flags |
| 479 | int32_tcxx . . $ int32_t# generic_nonvis_flagscxx . . $ object#generic_nonvis_flags.; |
| 480 | int32_tcxx . . $ int32_t# generic_sent_nonviscxx . . $ object#generic_sent_nonvis.; |
| 481 | |
| 482 | lightmap_objectcxx . . $ lightmap_object# lm_objectcxx . . $ object#lm_object.; // The lightmap object for this object |
| 483 | |
| 484 | // Control info, determined by CONTROL_TYPE |
| 485 | unioncxx . . $ object#$anonymous_type_9# { |
| 486 | laser_info_scxx . . $ laser_info_s# laser_infocxx . . $ object#$anonymous_type_9#laser_info.; |
| 487 | powerup_info_scxx . . $ powerup_info_s# powerup_infocxx . . $ object#$anonymous_type_9#powerup_info.; |
| 488 | splinter_info_scxx . . $ splinter_info_s# splinter_infocxx . . $ object#$anonymous_type_9#splinter_info.; |
| 489 | blast_info_scxx . . $ blast_info_s# blast_infocxx . . $ object#$anonymous_type_9#blast_info.; |
| 490 | dying_info_scxx . . $ dying_info_s# dying_infocxx . . $ object#$anonymous_type_9#dying_info.; |
| 491 | debris_info_scxx . . $ debris_info_s# debris_infocxx . . $ object#$anonymous_type_9#debris_info.; |
| 492 | soundsource_info_scxx . . $ soundsource_info_s# soundsource_infocxx . . $ object#$anonymous_type_9#soundsource_info.; |
| 493 | } ctypecxx . . $ object#ctype.; |
| 494 | |
| 495 | ai_framecxx . . $ ai_frame# *ai_infocxx . . $ object#ai_info.; // AI information pointer |
| 496 | |
| 497 | // Render info, determined by RENDER_TYPE |
| 498 | unioncxx . . $ object#$anonymous_type_10# { |
| 499 | polyobj_infocxx . . $ polyobj_info# pobj_infocxx . . $ object#$anonymous_type_10#pobj_info.; // polygon model |
| 500 | shard_info_scxx . . $ shard_info_s# shard_infocxx . . $ object#$anonymous_type_10#shard_info.; // shard |
| 501 | #ifdef _DEBUGcxx . . $ `<built-in>:482:9`! |
| 502 | line_info_scxx . . $ line_info_s# line_infocxx . . $ object#$anonymous_type_10#line_info.; // line info |
| 503 | #endif |
| 504 | ddgr_colorcxx . . $ ddgr_color# sphere_colorcxx . . $ object#$anonymous_type_10#sphere_color.; // for RT_EDITOR_SPHERE |
| 505 | } rtypecxx . . $ object#rtype.; |
| 506 | |
| 507 | effect_info_scxx . . $ effect_info_s# *effect_infocxx . . $ object#effect_info.; |
| 508 | light_infocxx . . $ light_info# *lighting_infocxx . . $ object#lighting_info.; // Pointer to lighting info, or NULL if inherits from type |
| 509 | |
| 510 | // Something to do with multiplayer, possibly, but it's hard to know for sure |
| 511 | // because some people are incapable of commented their code. |
| 512 | uint16_tcxx . . $ uint16_t# position_countercxx . . $ object#position_counter.; |
| 513 | |
| 514 | // OSIRIS Script Info (new OSIRIS) |
| 515 | tOSIRISScriptcxx . . $ tOSIRISScript# *osiris_scriptcxx . . $ object#osiris_script.; |
| 516 | |
| 517 | char *custom_default_script_namecxx . . $ object#custom_default_script_name.; |
| 518 | char *custom_default_module_namecxx . . $ object#custom_default_module_name.; |
| 519 | }; |
| 520 | |
| 521 | #endif |