| 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/lib/demofile.h $ |
| 21 | * $Revision: 25 $ |
| 22 | * $Date: 7/21/99 12:03p $ |
| 23 | * $Author: Kevin $ |
| 24 | * |
| 25 | * |
| 26 | * |
| 27 | * $Log: /DescentIII/main/lib/demofile.h $ |
| 28 | * |
| 29 | * 25 7/21/99 12:03p Kevin |
| 30 | * Changed version numbers around |
| 31 | * |
| 32 | * 24 4/25/99 10:19p Matt |
| 33 | * Fixed multiplayer and demo problems will killing an object from script, |
| 34 | * and cleaned up the death code a bit in the process. |
| 35 | * |
| 36 | * 23 3/12/99 7:53p Jeff |
| 37 | * save player rotating balls info, handle obj_observer with obj_player, |
| 38 | * handle objects that use life left, handle 2d sound playing |
| 39 | * |
| 40 | * 22 3/11/99 11:40a Kevin |
| 41 | * New stuff for multi |
| 42 | * |
| 43 | * 21 3/10/99 2:25p Kevin |
| 44 | * Save/Load and Demo file fixes |
| 45 | * |
| 46 | * 20 2/25/99 11:01a Matt |
| 47 | * Added new explosion system. |
| 48 | * |
| 49 | * 19 2/23/99 12:45a Jeff |
| 50 | * added support for in-game-cinematics in demo system |
| 51 | * |
| 52 | * 18 2/22/99 9:21p Kevin |
| 53 | * Added DT_CINEMATICS |
| 54 | * |
| 55 | * 17 2/08/99 7:05p Kevin |
| 56 | * Trying to get demo system working with powerup scripts |
| 57 | * |
| 58 | * 16 1/23/99 10:12p Kevin |
| 59 | * Added the start of osiris support into the demo system |
| 60 | * |
| 61 | * 15 11/24/98 3:57p Kevin |
| 62 | * Demo system immprovements |
| 63 | * |
| 64 | * 14 11/24/98 12:08p Kevin |
| 65 | * |
| 66 | * 13 11/24/98 10:41a Kevin |
| 67 | * Demo system |
| 68 | * |
| 69 | * 12 11/23/98 4:52p Kevin |
| 70 | * Demo system enhancments |
| 71 | * |
| 72 | * 11 11/23/98 3:11p Kevin |
| 73 | * Demo system |
| 74 | * |
| 75 | * 10 11/19/98 5:40p Kevin |
| 76 | * Demo system |
| 77 | * |
| 78 | * 9 11/17/98 4:17p Kevin |
| 79 | * Demo recording system |
| 80 | * |
| 81 | * 8 11/11/98 2:46p Kevin |
| 82 | * Demo recording system work |
| 83 | * |
| 84 | * 7 11/09/98 4:12p Kevin |
| 85 | * |
| 86 | * 6 11/05/98 5:54p Kevin |
| 87 | * Demo system work |
| 88 | * |
| 89 | * 5 10/08/98 12:00p Kevin |
| 90 | * Demo system work |
| 91 | * |
| 92 | * 4 10/06/98 5:46p Kevin |
| 93 | * Added new configuration for demo |
| 94 | * |
| 95 | * 3 10/05/98 12:09p Kevin |
| 96 | * Converted projects to VC6 and demo file stuff added |
| 97 | * |
| 98 | * 2 10/05/98 10:32a Kevin |
| 99 | * Initial Version |
| 100 | * |
| 101 | * 1 10/05/98 10:22a Kevin |
| 102 | * |
| 103 | * $NoKeywords: $ |
| 104 | */ |
| 105 | |
| 106 | #ifndef _DEMO_FILE_HEADER_ |
| 107 | #define _DEMO_FILE_HEADER_cxx . . $ `lib/demofile.h:107:9`! |
| 108 | |
| 109 | #include <cstdint> |
| 110 | |
| 111 | extern char Demo_fnamecxx . . $ Demo_fname.[_MAX_PATHcxx . . $ `linux/linux_fix.h:34:9`! * 2]; |
| 112 | |
| 113 | extern uint32_tcxx . . $ uint32_t# Demo_flagscxx . . $ Demo_flags.; |
| 114 | extern bool Demo_pausedcxx . . $ Demo_paused.; |
| 115 | extern bool Demo_do_one_framecxx . . $ Demo_do_one_frame.; |
| 116 | extern bool Demo_restartcxx . . $ Demo_restart.; |
| 117 | extern bool Demo_auto_playcxx . . $ Demo_auto_play.; |
| 118 | extern bool Demo_make_moviecxx . . $ Demo_make_movie.; |
| 119 | extern float Demo_frame_ofscxx . . $ Demo_frame_ofs.; |
| 120 | extern uint16_tcxx . . $ uint16_t# Demo_obj_mapcxx . . $ Demo_obj_map.[MAX_OBJECTScxx . . $ `lib/object_external_struct.h:107:9`!]; |
| 121 | #define DF_NONEcxx . . $ `lib/demofile.h:121:9`! 0 |
| 122 | #define DF_RECORDINGcxx . . $ `lib/demofile.h:122:9`! 1 |
| 123 | #define DF_PLAYBACKcxx . . $ `lib/demofile.h:123:9`! 2 |
| 124 | |
| 125 | #define D3_DEMO_SIGcxx . . $ `lib/demofile.h:125:9`! "D3DEM" |
| 126 | #define D3_DEMO_SIG_NEWcxx . . $ `lib/demofile.h:126:9`! "D3DM1" |
| 127 | |
| 128 | #define DT_OBJcxx . . $ `lib/demofile.h:128:9`! 1 // Object data |
| 129 | #define DT_NEW_FRAMEcxx . . $ `lib/demofile.h:129:9`! 2 // Start of a new frame |
| 130 | #define DT_WEAPON_FIREcxx . . $ `lib/demofile.h:130:9`! 3 // Someone fired a weapon |
| 131 | #define DT_HUD_MESSAGEcxx . . $ `lib/demofile.h:131:9`! 4 // Display a hud message |
| 132 | #define DT_3D_SOUNDcxx . . $ `lib/demofile.h:132:9`! 5 // Play a 3d sound (associated with a weapon firing usually) |
| 133 | #define DT_OBJ_CREATEcxx . . $ `lib/demofile.h:133:9`! 6 // A new object was created... |
| 134 | #define DT_OBJ_ANIMcxx . . $ `lib/demofile.h:134:9`! 7 // Object animation has changed |
| 135 | #define DT_OBJ_TURRETcxx . . $ `lib/demofile.h:135:9`! 8 // Object's turrets have changed |
| 136 | #define DT_OBJ_EXPLODEcxx . . $ `lib/demofile.h:136:9`! 9 // Explode object |
| 137 | #define DT_PLAYER_DEATHcxx . . $ `lib/demofile.h:137:9`! 10 // Player died |
| 138 | #define DT_COLLIDE_PLRcxx . . $ `lib/demofile.h:138:9`! 11 // Player collided with a weapon |
| 139 | #define DT_COLLIDE_GENcxx . . $ `lib/demofile.h:139:9`! 12 // generic collided with a weapon |
| 140 | #define DT_ATTACHcxx . . $ `lib/demofile.h:140:9`! 13 // Attach some objects |
| 141 | #define DT_ATTACH_RADcxx . . $ `lib/demofile.h:141:9`! 14 // Attach some objects with a radius? |
| 142 | #define DT_UNATTACHcxx . . $ `lib/demofile.h:142:9`! 15 // Unattach some stuff |
| 143 | #define DT_WEAP_FIRE_FLAGcxx . . $ `lib/demofile.h:143:9`! 16 // flags like spraying and on/off |
| 144 | #define DT_PLAYER_INFOcxx . . $ `lib/demofile.h:144:9`! 17 // Player 1's info like energy/sheilds, etc. |
| 145 | #define DT_MSAFEcxx . . $ `lib/demofile.h:145:9`! 18 // MSAFE data (ie script stuff) |
| 146 | #define DT_POWERUPcxx . . $ `lib/demofile.h:146:9`! 19 // Powerups data |
| 147 | #define DT_CINEMATICScxx . . $ `lib/demofile.h:147:9`! 20 // Cinematic info |
| 148 | #define DT_PERSISTANT_HUDcxx . . $ `lib/demofile.h:148:9`! 21 // Persistant hud message |
| 149 | #define DT_SETOBJDEADcxx . . $ `lib/demofile.h:149:9`! 22 // Mark an object as dead |
| 150 | #define DT_PLAYERBALLScxx . . $ `lib/demofile.h:150:9`! 23 // Rotating balls around player ship |
| 151 | #define DT_PLAYERTYPECHNGcxx . . $ `lib/demofile.h:151:9`! 24 // Player type is changing |
| 152 | #define DT_SETOBJLIFELEFTcxx . . $ `lib/demofile.h:152:9`! 25 // Object is getting OF_LIFELEFT flag changed |
| 153 | #define DT_2D_SOUNDcxx . . $ `lib/demofile.h:153:9`! 26 // Play a 2d sound |
| 154 | |
| 155 | // If not recording prompts user for filename and starts recording if successfull |
| 156 | // If recording, close the demo file |
| 157 | void DemoToggleRecordingcxx . . $ DemoToggleRecording(49f6e7a06ebc5aa8).(); |
| 158 | |
| 159 | void DemoWriteChangedObjcxx . . $ DemoWriteChangedObj(419c470199a90a97).(objectcxx . . $ object# *op); |
| 160 | |
| 161 | void DemoWriteHeadercxx . . $ DemoWriteHeader(49f6e7a06ebc5aa8).(); |
| 162 | |
| 163 | void DemoStartNewFramecxx . . $ DemoStartNewFrame(49f6e7a06ebc5aa8).(); |
| 164 | |
| 165 | void DemoWriteHudMessagecxx . . $ DemoWriteHudMessage(40674f1824b31f9).(uint32_tcxx . . $ uint32_t# color, bool blink, char *msg); |
| 166 | |
| 167 | void DemoWriteChangedObjectscxx . . $ DemoWriteChangedObjects(49f6e7a06ebc5aa8).(); |
| 168 | |
| 169 | void DemoWriteWeaponFirecxx . . $ DemoWriteWeaponFire(dd192dd00f042f22).(uint16_tcxx . . $ uint16_t# objectnum, vectorcxx . . $ vector# *pos, vectorcxx . . $ vector# *dir, uint16_tcxx . . $ uint16_t# weaponnum, |
| 170 | uint16_tcxx . . $ uint16_t# weapobjnum, int16_t gunnum); |
| 171 | |
| 172 | void DemoWriteObjCreatecxx . . $ DemoWriteObjCreate(5b923f0d7a56193f).(uint8_tcxx . . $ uint8_t# type, uint16_tcxx . . $ uint16_t# id, int roomnum, vectorcxx . . $ vector# *pos, const matrixcxx . . $ matrix# *orient, int parent_handle, |
| 173 | objectcxx . . $ object# *obj); |
| 174 | |
| 175 | void DemoWriteTurretChangedcxx . . $ DemoWriteTurretChanged(ed53e3bbd3fa2f69).(uint16_tcxx . . $ uint16_t# objnum); |
| 176 | |
| 177 | int DemoReadHeadercxx . . $ DemoReadHeader(b126dc7c1de90089).(); |
| 178 | |
| 179 | int DemoPlaybackFilecxx . . $ DemoPlaybackFile(1ef8e6ec083aabb9).(char *filename); |
| 180 | |
| 181 | bool LoadDemoDialogcxx . . $ LoadDemoDialog(c9857a73d68e59ba).(); |
| 182 | |
| 183 | void DemoFramecxx . . $ DemoFrame(49f6e7a06ebc5aa8).(); |
| 184 | |
| 185 | void DemoAbortcxx . . $ DemoAbort(b45ddcbc8423892c).(bool deletefile = false); |
| 186 | |
| 187 | void DemoWriteKillObjectcxx . . $ DemoWriteKillObject(4f0d9746d70de433).(objectcxx . . $ object# *hit_obj, objectcxx . . $ object# *killer, float damage, int death_flags, float delay, int seed); |
| 188 | |
| 189 | void DemoWritePlayerDeathcxx . . $ DemoWritePlayerDeath(638d79040b3e553a).(objectcxx . . $ object# *player, bool melee, int fate = -1); |
| 190 | |
| 191 | void DemoWrite3DSoundcxx . . $ DemoWrite3DSound(c29d531f7e56abb1).(int16_t soundidx, uint16_tcxx . . $ uint16_t# objnum, int priority, float volume = 0.5f); |
| 192 | |
| 193 | void DemoWriteCollidePlayerWeaponcxx . . $ DemoWriteCollidePlayerWeapon(221242cfd903144b).(objectcxx . . $ object# *playerobj, objectcxx . . $ object# *weapon, vectorcxx . . $ vector# *collision_point, vectorcxx . . $ vector# *collision_normal, |
| 194 | bool f_reverse_normal, void *hit_info); |
| 195 | |
| 196 | void DemoWriteCollideGenericWeaponcxx . . $ DemoWriteCollideGenericWeapon(221242cfd903144b).(objectcxx . . $ object# *robotobj, objectcxx . . $ object# *weapon, vectorcxx . . $ vector# *collision_point, vectorcxx . . $ vector# *collision_normal, |
| 197 | bool f_reverse_normal, void *hit_info); |
| 198 | |
| 199 | void DemoReadCollidePlayerWeaponcxx . . $ DemoReadCollidePlayerWeapon(49f6e7a06ebc5aa8).(void); |
| 200 | |
| 201 | void DemoReadCollideGenericWeaponcxx . . $ DemoReadCollideGenericWeapon(49f6e7a06ebc5aa8).(void); |
| 202 | |
| 203 | void DemoReadNewFramecxx . . $ DemoReadNewFrame(49f6e7a06ebc5aa8).(void); |
| 204 | |
| 205 | void DemoWriteObjAnimChangedcxx . . $ DemoWriteObjAnimChanged(ed53e3bbd3fa2f69).(uint16_tcxx . . $ uint16_t# objnum); |
| 206 | |
| 207 | void DemoWriteAttachObjRadcxx . . $ DemoWriteAttachObjRad(dd3c3fb04585c0c5).(objectcxx . . $ object# *parent, char parent_ap, objectcxx . . $ object# *child, float rad); |
| 208 | |
| 209 | void DemoReadAttachObjRadcxx . . $ DemoReadAttachObjRad(49f6e7a06ebc5aa8).(void); |
| 210 | |
| 211 | void DemoWriteAttachObjcxx . . $ DemoWriteAttachObj(5e1f903503988afd).(objectcxx . . $ object# *parent, char parent_ap, objectcxx . . $ object# *child, char child_ap, bool f_aligned); |
| 212 | |
| 213 | void DemoReadAttachObjcxx . . $ DemoReadAttachObj(49f6e7a06ebc5aa8).(void); |
| 214 | |
| 215 | void DemoWriteUnattachObjcxx . . $ DemoWriteUnattachObj(419c470199a90a97).(objectcxx . . $ object# *child); |
| 216 | |
| 217 | void DemoReadUnattachObjcxx . . $ DemoReadUnattachObj(49f6e7a06ebc5aa8).(void); |
| 218 | |
| 219 | void DemoPostPlaybackMenucxx . . $ DemoPostPlaybackMenu(49f6e7a06ebc5aa8).(void); |
| 220 | |
| 221 | void DemoReadObjWeapFireFlagChangedcxx . . $ DemoReadObjWeapFireFlagChanged(49f6e7a06ebc5aa8).(void); |
| 222 | |
| 223 | void DemoWriteObjWeapFireFlagChangedcxx . . $ DemoWriteObjWeapFireFlagChanged(68e3ae50fe6578a9).(int16_t objnum); |
| 224 | |
| 225 | void DemoWritePlayerInfocxx . . $ DemoWritePlayerInfo(49f6e7a06ebc5aa8).(void); |
| 226 | |
| 227 | void DemoReadPlayerInfocxx . . $ DemoReadPlayerInfo(49f6e7a06ebc5aa8).(void); |
| 228 | |
| 229 | void DemoPlayAutoDemocxx . . $ DemoPlayAutoDemo(49f6e7a06ebc5aa8).(void); |
| 230 | |
| 231 | void DemoWriteMSafecxx . . $ DemoWriteMSafe(5f425e2ac950790c).(uint8_tcxx . . $ uint8_t# *data, uint16_tcxx . . $ uint16_t# len); |
| 232 | |
| 233 | void DemoReadMSafecxx . . $ DemoReadMSafe(49f6e7a06ebc5aa8).(); |
| 234 | |
| 235 | void DemoWritePowerupcxx . . $ DemoWritePowerup(5f425e2ac950790c).(uint8_tcxx . . $ uint8_t# *data, uint16_tcxx . . $ uint16_t# len); |
| 236 | |
| 237 | void DemoReadPowerupscxx . . $ DemoReadPowerups(49f6e7a06ebc5aa8).(); |
| 238 | |
| 239 | void DemoReadCinematicscxx . . $ DemoReadCinematics(49f6e7a06ebc5aa8).(); |
| 240 | |
| 241 | void DemoWriteCinematicscxx . . $ DemoWriteCinematics(5f425e2ac950790c).(uint8_tcxx . . $ uint8_t# *data, uint16_tcxx . . $ uint16_t# len); |
| 242 | |
| 243 | void DemoWritePersistantHUDMessagecxx . . $ DemoWritePersistantHUDMessage(e60fbdfbe7e9abc2).(ddgr_colorcxx . . $ ddgr_color# color, int x, int y, float time, int flags, int sound_index, char *msg); |
| 244 | |
| 245 | void DemoReadPersistantHUDMessagecxx . . $ DemoReadPersistantHUDMessage(49f6e7a06ebc5aa8).(); |
| 246 | |
| 247 | void DemoWriteSetObjDeadcxx . . $ DemoWriteSetObjDead(419c470199a90a97).(objectcxx . . $ object# *obj); |
| 248 | void DemoReadSetObjDeadcxx . . $ DemoReadSetObjDead(49f6e7a06ebc5aa8).(); |
| 249 | |
| 250 | void DemoWritePlayerBallscxx . . $ DemoWritePlayerBalls(d4f767463ce0a6b3).(int pnum); |
| 251 | void DemoReadPlayerBallscxx . . $ DemoReadPlayerBalls(49f6e7a06ebc5aa8).(void); |
| 252 | |
| 253 | void DemoWritePlayerTypeChangecxx . . $ DemoWritePlayerTypeChange(e0a2f7eef77c900a).(int slot, bool stop_observing = false, int observer_mode = -1, int piggy_objnum = -1); |
| 254 | void DemoReadPlayerTypeChangecxx . . $ DemoReadPlayerTypeChange(49f6e7a06ebc5aa8).(void); |
| 255 | |
| 256 | void DemoWriteObjLifeLeftcxx . . $ DemoWriteObjLifeLeft(419c470199a90a97).(objectcxx . . $ object# *obj); |
| 257 | void DemoReadObjLifeLeftcxx . . $ DemoReadObjLifeLeft(49f6e7a06ebc5aa8).(void); |
| 258 | |
| 259 | void DemoWrite2DSoundcxx . . $ DemoWrite2DSound(cbb42c64838b7d29).(int16_t soundidx, float volume = 0.5f); |
| 260 | void DemoRead2DSoundcxx . . $ DemoRead2DSound(49f6e7a06ebc5aa8).(void); |
| 261 | |
| 262 | #endif |