2 * $Logfile: /Freespace2/code/Demo/Demo.h $
9 * Revision 1.1 2002/05/03 03:28:11 root
13 * 3 3/29/99 6:17p Dave
14 * More work on demo system. Got just about everything in except for
15 * blowing ships up, secondary weapons and player death/warpout.
17 * 2 3/28/99 5:58p Dave
18 * Added early demo code. Make objects move. Nice and framerate
19 * independant, but not much else. Don't use yet unless you're me :)
25 #ifndef _FS2_DEMO_SYSTEM_HEADER_FILE
26 #define _FS2_DEMO_SYSTEM_HEADER_FILE
28 // -----------------------------------------------------------------------------------------------------------------------------
32 // compile in the demo system
38 // an error reading or writing the demo file
39 #define DEMO_ERROR_NONE 0 // no error
40 #define DEMO_ERROR_GENERAL 1 // general problem
41 #define DEMO_ERROR_FRAMESIZE 2 // frame size was too big (> 32k)
42 #define DEMO_ERROR_DISK_SPACE 3 // out of disk space
43 #define DEMO_ERROR_DISK_ACCESS 4 // problem accessing disk
44 #define DEMO_ERROR_VERSION 5 // bad version #
45 #define DEMO_ERROR_MISSION 6 // different mission file checksums
46 extern int Demo_error;
50 // -----------------------------------------------------------------------------------------------------------------------------
54 // do frame for the demo - start for the frame
55 int demo_do_frame_start();
57 // do frame for the demo - end for the frame
58 int demo_do_frame_end();
60 // initialize a demo for recording
61 // NOTE : call this after loading the mission and going through the briefing, but _before_ physically moving into the mission
62 int demo_start_record(char *file);
64 // initialize a demo for playback - calling this will load up the demo file and move the player into the playback state
65 int demo_start_playback(char *file);
67 // finish the demo, whether recording or playing back
70 // if we should run the simulation for this object, or let the demo system handle it
71 int demo_should_sim(object *objp);
74 // functions for posting critical events to the demo system ------------------------------------------------------------
76 // post an object dump event (only used internally)
77 void demo_POST_object_dump();
79 // post a primary fired event
80 void demo_POST_primary_fired(object *objp, int banks, int linked);
82 // post a unique message
83 void demo_POST_unique_message(char *id, char *who_from, int m_source, int priority);
85 // post a builtin message
86 void demo_POST_builtin_message(int type, ship *shipp, int priority, int timing);
88 // post an object create message
89 void demo_POST_obj_create(char *pobj_name, int signature);
91 // post a warpin event
92 void demo_POST_warpin(int signature, int ship_flags);
94 // post a warpout event
95 void demo_POST_warpout(int signature, int ship_flags);
97 // post a departed event
98 void demo_POST_departed(int signature, int ship_flags);
100 // post a ship kill event
101 void demo_POST_ship_kill(object *objp);