2006-03-20 17:12:09 +00:00
|
|
|
/*
|
2014-06-01 17:55:23 +00:00
|
|
|
* Portions of this file are copyright Rebirth contributors and licensed as
|
|
|
|
* described in COPYING.txt.
|
|
|
|
* Portions of this file are copyright Parallax Software and licensed
|
|
|
|
* according to the Parallax license below.
|
|
|
|
* See COPYING.txt for license details.
|
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
|
|
|
|
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
|
|
|
|
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
|
|
|
|
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
|
|
|
|
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
|
|
|
|
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
|
|
|
|
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
|
|
|
|
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
|
|
|
|
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
|
|
|
|
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
* header for demo playback system
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2015-08-22 20:43:04 +00:00
|
|
|
#pragma once
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2012-11-11 22:12:51 +00:00
|
|
|
#ifdef __cplusplus
|
2014-07-20 01:09:55 +00:00
|
|
|
#include "physfsx.h"
|
2015-08-22 20:43:04 +00:00
|
|
|
#include "fwdobject.h"
|
2012-11-11 22:12:51 +00:00
|
|
|
|
2015-04-26 20:15:57 +00:00
|
|
|
class object_signature_t;
|
2015-03-22 18:49:21 +00:00
|
|
|
|
2009-11-15 08:22:08 +00:00
|
|
|
#define ND_STATE_NORMAL 0
|
|
|
|
#define ND_STATE_RECORDING 1
|
|
|
|
#define ND_STATE_PLAYBACK 2
|
|
|
|
#define ND_STATE_PAUSED 3
|
|
|
|
#define ND_STATE_REWINDING 4
|
|
|
|
#define ND_STATE_FASTFORWARD 5
|
|
|
|
#define ND_STATE_ONEFRAMEFORWARD 6
|
|
|
|
#define ND_STATE_ONEFRAMEBACKWARD 7
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
#define DEMO_DIR "demos/"
|
2013-11-26 22:19:52 +00:00
|
|
|
#define DEMO_EXT "dem"
|
2015-02-14 22:48:28 +00:00
|
|
|
extern const array<file_extension_t, 1> demo_file_extensions;
|
2013-11-26 22:19:52 +00:00
|
|
|
|
2013-03-03 23:46:22 +00:00
|
|
|
#ifdef WORDS_BIGENDIAN
|
2009-11-15 08:22:08 +00:00
|
|
|
#define DEMO_BACKUP_EXT "386"
|
|
|
|
#else
|
|
|
|
#define DEMO_BACKUP_EXT "ppc"
|
|
|
|
#endif
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
// Gives state of recorder
|
|
|
|
extern int Newdemo_state;
|
|
|
|
extern int NewdemoFrameCount;
|
|
|
|
|
|
|
|
extern int Newdemo_vcr_state;
|
2009-11-30 14:59:37 +00:00
|
|
|
extern int Newdemo_game_mode;
|
2006-03-20 17:12:09 +00:00
|
|
|
extern sbyte Newdemo_do_interpolate;
|
2008-10-16 17:27:02 +00:00
|
|
|
extern int Newdemo_show_percentage;
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
//Does demo start automatically?
|
|
|
|
extern int Auto_demo;
|
2012-11-11 00:14:30 +00:00
|
|
|
extern int Newdemo_num_written;
|
|
|
|
|
|
|
|
#if defined(DXX_BUILD_DESCENT_II)
|
|
|
|
extern ubyte DemoDoRight,DemoDoLeft;
|
|
|
|
extern struct object DemoRightExtra,DemoLeftExtra;
|
|
|
|
#endif
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2013-07-14 23:24:53 +00:00
|
|
|
struct morph_data;
|
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
// Functions called during recording process...
|
|
|
|
extern void newdemo_record_start_demo();
|
2008-10-16 17:27:02 +00:00
|
|
|
extern void newdemo_record_start_frame(fix frame_time );
|
2014-08-16 23:18:17 +00:00
|
|
|
void newdemo_record_render_object(vobjptridx_t obj);
|
|
|
|
void newdemo_record_viewer_object(vobjptridx_t obj);
|
2006-03-20 17:12:09 +00:00
|
|
|
extern void newdemo_record_sound_3d( int soundno, int angle, int volume );
|
|
|
|
extern void newdemo_record_sound_3d_once( int soundno, int angle, int volume );
|
|
|
|
extern void newdemo_record_sound_once( int soundno );
|
|
|
|
extern void newdemo_record_sound( int soundno );
|
2013-12-29 04:28:07 +00:00
|
|
|
void newdemo_record_wall_hit_process( segnum_t segnum, int side, int damage, int playernum );
|
2006-03-20 17:12:09 +00:00
|
|
|
extern void newdemo_record_hostage_rescued( int hostage_num );
|
2013-07-14 23:24:53 +00:00
|
|
|
extern void newdemo_record_morph_frame(struct morph_data *);
|
2006-03-20 17:12:09 +00:00
|
|
|
extern void newdemo_record_player_stats(int shields, int energy, int score );
|
2013-12-29 04:28:07 +00:00
|
|
|
void newdemo_record_wall_toggle(segnum_t segnum, int side );
|
2006-03-20 17:12:09 +00:00
|
|
|
extern void newdemo_record_control_center_destroyed();
|
2013-06-23 16:24:43 +00:00
|
|
|
extern void newdemo_record_hud_message(const char *s);
|
2006-03-20 17:12:09 +00:00
|
|
|
extern void newdemo_record_palette_effect(short r, short g, short b);
|
2010-07-15 05:40:25 +00:00
|
|
|
extern void newdemo_record_player_energy(int);
|
|
|
|
extern void newdemo_record_player_shields(int);
|
|
|
|
extern void newdemo_record_player_flags(uint);
|
2006-03-20 17:12:09 +00:00
|
|
|
extern void newdemo_record_player_weapon(int, int);
|
2014-10-26 21:36:35 +00:00
|
|
|
void newdemo_record_effect_blowup(segnum_t, int, const vms_vector &);
|
2006-03-20 17:12:09 +00:00
|
|
|
extern void newdemo_record_homing_distance(fix);
|
|
|
|
extern void newdemo_record_letterbox(void);
|
|
|
|
extern void newdemo_record_rearview(void);
|
|
|
|
extern void newdemo_record_restore_cockpit(void);
|
|
|
|
extern void newdemo_record_wall_set_tmap_num1(short seg,ubyte side,short cseg,ubyte cside,short tmap);
|
|
|
|
extern void newdemo_record_wall_set_tmap_num2(short seg,ubyte side,short cseg,ubyte cside,short tmap);
|
|
|
|
extern void newdemo_record_multi_cloak(int pnum);
|
|
|
|
extern void newdemo_record_multi_decloak(int pnum);
|
|
|
|
extern void newdemo_set_new_level(int level_num);
|
|
|
|
extern void newdemo_record_restore_rearview(void);
|
|
|
|
|
|
|
|
extern void newdemo_record_multi_death(int pnum);
|
|
|
|
extern void newdemo_record_multi_kill(int pnum, sbyte kill);
|
2013-06-08 22:24:17 +00:00
|
|
|
extern void newdemo_record_multi_connect(int pnum, int new_player, const char *new_callsign);
|
2006-03-20 17:12:09 +00:00
|
|
|
extern void newdemo_record_multi_reconnect(int pnum);
|
|
|
|
extern void newdemo_record_multi_disconnect(int pnum);
|
|
|
|
extern void newdemo_record_player_score(int score);
|
|
|
|
extern void newdemo_record_multi_score(int pnum, int score);
|
2010-07-15 05:40:25 +00:00
|
|
|
extern void newdemo_record_primary_ammo(int new_ammo);
|
|
|
|
extern void newdemo_record_secondary_ammo(int new_ammo);
|
2013-12-29 04:28:07 +00:00
|
|
|
void newdemo_record_door_opening(segnum_t segnum, int side);
|
2006-03-20 17:12:09 +00:00
|
|
|
extern void newdemo_record_laser_level(sbyte old_level, sbyte new_level);
|
2013-03-03 01:03:33 +00:00
|
|
|
#if defined(DXX_BUILD_DESCENT_II)
|
2013-12-29 04:28:07 +00:00
|
|
|
void newdemo_record_trigger( segnum_t segnum, int side, objnum_t objnum,int shot );
|
2013-03-03 01:03:33 +00:00
|
|
|
extern void newdemo_record_player_afterburner(fix afterburner);
|
2006-03-20 17:12:09 +00:00
|
|
|
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);
|
|
|
|
extern void newdemo_record_secret_exit_blown(int truth);
|
2013-03-03 01:03:33 +00:00
|
|
|
#endif
|
2006-03-20 17:12:09 +00:00
|
|
|
|
|
|
|
// Functions called during playback process...
|
|
|
|
extern void newdemo_object_move_all();
|
|
|
|
extern void newdemo_playback_one_frame();
|
2009-11-15 08:22:08 +00:00
|
|
|
extern void newdemo_goto_end(int to_rewrite);
|
2006-03-20 17:12:09 +00:00
|
|
|
extern void newdemo_goto_beginning();
|
|
|
|
|
|
|
|
// Interactive functions to control playback/record;
|
2013-06-08 22:24:17 +00:00
|
|
|
extern void newdemo_start_playback( const char * filename );
|
2006-03-20 17:12:09 +00:00
|
|
|
extern void newdemo_stop_playback();
|
|
|
|
extern void newdemo_start_recording();
|
|
|
|
extern void newdemo_stop_recording();
|
|
|
|
|
2013-06-08 22:24:17 +00:00
|
|
|
extern int newdemo_swap_endian(const char *filename);
|
2009-11-15 08:22:08 +00:00
|
|
|
|
2006-03-20 17:12:09 +00:00
|
|
|
extern int newdemo_get_percent_done();
|
|
|
|
|
|
|
|
extern void newdemo_record_link_sound_to_object3( int soundno, short objnum, fix max_volume, fix max_distance, int loop_start, int loop_end );
|
2015-03-22 18:49:21 +00:00
|
|
|
cobjptridx_t newdemo_find_object(object_signature_t signature);
|
2014-12-13 17:47:06 +00:00
|
|
|
void newdemo_record_kill_sound_linked_to_object(vcobjptridx_t);
|
2012-11-11 00:14:30 +00:00
|
|
|
void newdemo_record_guided_end();
|
|
|
|
void newdemo_record_guided_start();
|
2013-08-17 14:46:50 +00:00
|
|
|
int newdemo_count_demos();
|
2012-11-11 00:14:30 +00:00
|
|
|
void newdemo_strip_frames(char *, int);
|
2006-03-20 17:12:09 +00:00
|
|
|
|
2012-11-11 22:12:51 +00:00
|
|
|
#endif
|