2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
4 * All source code herein is the property of Volition, Inc. You may not sell
5 * or otherwise commercially exploit the source or things you created based on
10 * $Logfile: /Freespace2/code/Demo/Demo.h $
17 * Revision 1.2 2002/06/09 04:41:12 relnev
18 * added copyright header
20 * Revision 1.1.1.1 2002/05/03 03:28:11 root
24 * 3 3/29/99 6:17p Dave
25 * More work on demo system. Got just about everything in except for
26 * blowing ships up, secondary weapons and player death/warpout.
28 * 2 3/28/99 5:58p Dave
29 * Added early demo code. Make objects move. Nice and framerate
30 * independant, but not much else. Don't use yet unless you're me :)
36 #ifndef _FS2_DEMO_SYSTEM_HEADER_FILE
37 #define _FS2_DEMO_SYSTEM_HEADER_FILE
39 // -----------------------------------------------------------------------------------------------------------------------------
43 // compile in the demo system
49 // an error reading or writing the demo file
50 #define DEMO_ERROR_NONE 0 // no error
51 #define DEMO_ERROR_GENERAL 1 // general problem
52 #define DEMO_ERROR_FRAMESIZE 2 // frame size was too big (> 32k)
53 #define DEMO_ERROR_DISK_SPACE 3 // out of disk space
54 #define DEMO_ERROR_DISK_ACCESS 4 // problem accessing disk
55 #define DEMO_ERROR_VERSION 5 // bad version #
56 #define DEMO_ERROR_MISSION 6 // different mission file checksums
57 extern int Demo_error;
61 // -----------------------------------------------------------------------------------------------------------------------------
65 // do frame for the demo - start for the frame
66 int demo_do_frame_start();
68 // do frame for the demo - end for the frame
69 int demo_do_frame_end();
71 // initialize a demo for recording
72 // NOTE : call this after loading the mission and going through the briefing, but _before_ physically moving into the mission
73 int demo_start_record(char *file);
75 // initialize a demo for playback - calling this will load up the demo file and move the player into the playback state
76 int demo_start_playback(char *file);
78 // finish the demo, whether recording or playing back
81 // if we should run the simulation for this object, or let the demo system handle it
82 int demo_should_sim(object *objp);
85 // functions for posting critical events to the demo system ------------------------------------------------------------
87 // post an object dump event (only used internally)
88 void demo_POST_object_dump();
90 // post a primary fired event
91 void demo_POST_primary_fired(object *objp, int banks, int linked);
93 // post a unique message
94 void demo_POST_unique_message(char *id, char *who_from, int m_source, int priority);
96 // post a builtin message
97 void demo_POST_builtin_message(int type, ship *shipp, int priority, int timing);
99 // post an object create message
100 void demo_POST_obj_create(char *pobj_name, int signature);
102 // post a warpin event
103 void demo_POST_warpin(int signature, int ship_flags);
105 // post a warpout event
106 void demo_POST_warpout(int signature, int ship_flags);
108 // post a departed event
109 void demo_POST_departed(int signature, int ship_flags);
111 // post a ship kill event
112 void demo_POST_ship_kill(object *objp);