1 /* $Id: newdemo.h,v 1.3 2003-03-17 07:59:11 btb Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
17 * header for demo playback system
20 * Revision 1.1 1995/05/16 16:00:24 allender
23 * Revision 2.0 1995/02/27 11:27:18 john
24 * New version 2.0, which has no anonymous unions, builds with
25 * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
27 * Revision 1.43 1995/01/19 09:41:43 allender
28 * prototype for laser level recording
30 * Revision 1.42 1995/01/18 18:48:49 allender
31 * added function prototype for door_open
33 * Revision 1.41 1995/01/17 17:42:31 allender
34 * new prototypes for ammo counts
36 * Revision 1.40 1995/01/04 15:04:27 allender
37 * added some different prototypes for registered
39 * Revision 1.39 1995/01/03 11:45:11 allender
40 * extern function definition
42 * Revision 1.38 1994/12/29 16:43:31 allender
43 * new function prototype
45 * Revision 1.37 1994/12/28 14:15:27 allender
46 * new function prototypes
48 * Revision 1.36 1994/12/21 12:46:41 allender
49 * new functions for multiplayer deaths and kills
51 * Revision 1.35 1994/12/12 11:32:55 allender
52 * added new record function to restore after in rearview mode
54 * Revision 1.34 1994/12/08 21:03:15 allender
55 * added new param to record_player_flags
57 * Revision 1.33 1994/12/08 13:47:01 allender
58 * removed function call to record_rearview
60 * Revision 1.32 1994/12/06 12:57:10 allender
61 * added new prototype for multi decloaking
63 * Revision 1.31 1994/12/01 11:46:34 allender
64 * added recording prototype for multi player cloak
66 * Revision 1.30 1994/11/27 23:04:22 allender
67 * function prototype for recording new levels
69 * Revision 1.29 1994/11/07 08:47:43 john
70 * Made wall state record.
72 * Revision 1.28 1994/11/05 17:22:53 john
73 * Fixed lots of sequencing problems with newdemo stuff.
75 * Revision 1.27 1994/11/04 16:48:49 allender
76 * extern Newdemo_do_interpolate variable
78 * Revision 1.26 1994/11/02 14:08:53 allender
81 * Revision 1.25 1994/10/31 13:35:04 allender
82 * added two record functions to save and restore cockpit state on
85 * Revision 1.24 1994/10/29 16:01:11 allender
86 * added ND_STATE_NODEMOS to indicate that there are no demos currently
87 * available for playback
89 * Revision 1.23 1994/10/28 12:41:58 allender
90 * add homing distance recording event
92 * Revision 1.22 1994/10/27 16:57:32 allender
93 * removed VCR_MODE stuff, and added monitor blowup effects
95 * Revision 1.21 1994/10/26 14:44:48 allender
96 * completed hacked in vcr type demo playback states
98 * Revision 1.20 1994/10/26 13:40:38 allender
99 * more vcr demo playback defines
101 * Revision 1.19 1994/10/26 08:51:26 allender
102 * record player weapon change
104 * Revision 1.18 1994/10/25 16:25:31 allender
105 * prototypes for shield, energy and flags
107 * Revision 1.17 1994/08/15 18:05:30 john
108 * *** empty log message ***
110 * Revision 1.16 1994/07/21 13:11:26 matt
111 * Ripped out remants of old demo system, and added demo only system that
112 * disables object movement and game options from menu.
114 * Revision 1.15 1994/07/05 12:49:02 john
115 * Put functionality of New Hostage spec into code.
117 * Revision 1.14 1994/06/27 15:53:12 john
118 * #define'd out the newdemo stuff
121 * Revision 1.13 1994/06/24 17:01:25 john
122 * Add VFX support; Took Game Sequencing, like EndGame and stuff and
123 * took it out of game.c and into gameseq.c
125 * Revision 1.12 1994/06/21 19:46:05 john
126 * Added palette effects to demo recording.
128 * Revision 1.11 1994/06/21 14:19:58 john
129 * Put in hooks to record HUD messages.
131 * Revision 1.10 1994/06/20 11:50:42 john
132 * Made demo record flash effect, and control center triggers.
134 * Revision 1.9 1994/06/17 18:01:29 john
135 * A bunch of new stuff by John
137 * Revision 1.8 1994/06/17 12:13:34 john
138 * More newdemo stuff; made editor->game transition start in slew mode.
140 * Revision 1.7 1994/06/16 13:02:02 john
143 * Revision 1.6 1994/06/15 19:01:42 john
144 * Added the capability to make 3d sounds play just once for the
145 * laser hit wall effects.
147 * Revision 1.5 1994/06/15 14:57:11 john
148 * Added triggers to demo recording.
150 * Revision 1.4 1994/06/14 20:42:19 john
151 * Made robot matztn cntr not work until no robots or player are
154 * Revision 1.3 1994/06/14 14:43:52 john
155 * Made doors work with newdemo system.
157 * Revision 1.2 1994/06/13 21:02:44 john
158 * Initial version of new demo recording system.
160 * Revision 1.1 1994/06/13 15:51:09 john
172 #define ND_STATE_NORMAL 0
173 #define ND_STATE_RECORDING 1
174 #define ND_STATE_PLAYBACK 2
175 #define ND_STATE_PAUSED 3
176 #define ND_STATE_REWINDING 4
177 #define ND_STATE_FASTFORWARD 5
178 #define ND_STATE_ONEFRAMEFORWARD 6
179 #define ND_STATE_ONEFRAMEBACKWARD 7
180 #define ND_STATE_PRINTSCREEN 8
183 #define DEMO_DIR "demos/"
185 #define DEMO_DIR ":Demos:"
188 // Gives state of recorder
189 extern int Newdemo_state;
190 extern int NewdemoFrameCount;
191 extern int Newdemo_game_mode;
193 extern int Newdemo_vcr_state;
194 extern byte Newdemo_do_interpolate;
196 //Does demo start automatically?
197 extern int Auto_demo;
199 // Functions called during recording process...
200 extern void newdemo_record_start_demo();
201 extern void newdemo_record_start_frame(int frame_number, fix frame_time );
202 extern void newdemo_record_render_object(object * obj);
203 extern void newdemo_record_viewer_object(object * obj);
204 extern void newdemo_record_sound_3d( int soundno, int angle, int volume );
205 extern void newdemo_record_sound_3d_once( int soundno, int angle, int volume );
206 extern void newdemo_record_sound_once( int soundno );
207 extern void newdemo_record_sound( int soundno );
208 extern void newdemo_record_wall_hit_process( int segnum, int side, int damage, int playernum );
209 extern void newdemo_record_trigger( int segnum, int side, int objnum,int shot );
210 extern void newdemo_record_hostage_rescued( int hostage_num );
211 extern void newdemo_record_morph_frame();
212 extern void newdemo_record_player_stats(int shields, int energy, int score );
213 extern void newdemo_record_player_afterburner(fix old_afterburner, fix afterburner);
214 extern void newdemo_record_wall_toggle(int segnum, int side );
215 extern void newdemo_record_control_center_destroyed();
216 extern void newdemo_record_hud_message(char *s);
217 extern void newdemo_record_palette_effect(short r, short g, short b);
218 extern void newdemo_record_player_energy(int, int);
219 extern void newdemo_record_player_shields(int, int);
220 extern void newdemo_record_player_flags(uint, uint);
221 extern void newdemo_record_player_weapon(int, int);
222 extern void newdemo_record_effect_blowup(short, int, vms_vector *);
223 extern void newdemo_record_homing_distance(fix);
224 extern void newdemo_record_letterbox(void);
225 extern void newdemo_record_rearview(void);
226 extern void newdemo_record_restore_cockpit(void);
227 extern void newdemo_record_wall_set_tmap_num1(short seg,ubyte side,short cseg,ubyte cside,short tmap);
228 extern void newdemo_record_wall_set_tmap_num2(short seg,ubyte side,short cseg,ubyte cside,short tmap);
229 extern void newdemo_record_multi_cloak(int pnum);
230 extern void newdemo_record_multi_decloak(int pnum);
231 extern void newdemo_set_new_level(int level_num);
232 extern void newdemo_record_restore_rearview(void);
234 extern void newdemo_record_multi_death(int pnum);
235 extern void newdemo_record_multi_kill(int pnum, byte kill);
236 extern void newdemo_record_multi_connect(int pnum, int new_player, char *new_callsign);
237 extern void newdemo_record_multi_reconnect(int pnum);
238 extern void newdemo_record_multi_disconnect(int pnum);
239 extern void newdemo_record_player_score(int score);
240 extern void newdemo_record_multi_score(int pnum, int score);
241 extern void newdemo_record_primary_ammo(int old_ammo, int new_ammo);
242 extern void newdemo_record_secondary_ammo(int old_ammo, int new_ammo);
243 extern void newdemo_record_door_opening(int segnum, int side);
244 extern void newdemo_record_laser_level(byte old_level, byte new_level);
245 extern void newdemo_record_cloaking_wall(int front_wall_num, int back_wall_num, ubyte type, ubyte state, fix cloak_value, fix l0, fix l1, fix l2, fix l3);
246 extern void newdemo_record_secret_exit_blown(int truth);
249 // Functions called during playback process...
250 extern void newdemo_object_move_all();
251 extern void newdemo_playback_one_frame();
252 extern void newdemo_goto_end();
253 extern void newdemo_goto_beginning();
255 // Interactive functions to control playback/record;
256 extern void newdemo_start_playback( char * filename );
257 extern void newdemo_stop_playback();
258 extern void newdemo_start_recording();
259 extern void newdemo_stop_recording();
261 extern int newdemo_get_percent_done();
263 extern void newdemo_record_link_sound_to_object3( int soundno, short objnum, fix max_volume, fix max_distance, int loop_start, int loop_end );
264 extern int newdemo_find_object( int signature );
265 extern void newdemo_record_kill_sound_linked_to_object( int objnum );