NEWDEMO.H 9.3 KB

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