2 * $Logfile: /Freespace2/code/Anim/AnimPlay.h $
7 * Header file for playing back anim files
10 * Revision 1.1 2002/05/03 03:28:11 root
14 * 3 10/22/98 6:14p Dave
15 * Optimized some #includes in Anim folder. Put in the beginnings of
16 * parse/localization support for externalized strings and tstrings.tbl
18 * 2 10/07/98 10:52a Dave
21 * 1 10/07/98 10:48a Dave
23 * 11 5/07/98 3:11a Lawrance
24 * Implement custom streaming code
26 * 10 4/27/98 3:36p Dave
28 * 9 3/25/98 8:43p Hoffoss
29 * Changed anim_play() to not be so damn complex when you try and call it.
31 * 8 12/24/97 8:57p Lawrance
32 * Added anim_ignore_next_frametime()
34 * 7 11/19/97 8:28p Dave
35 * Hooked in Main Hall screen. Put in Anim support for ping ponging
36 * animations as well as general reversal of anim direction.
38 * 6 8/30/97 2:11p Lawrance
39 * allow animations to loop
41 * 5 8/25/97 11:13p Lawrance
42 * support framerate independent playback with the option of now advancing
43 * more than one frame at a time
45 * 4 7/21/97 11:41a Lawrance
46 * make playback time of .ani files keyed of frametime
48 * 3 7/20/97 6:57p Lawrance
49 * supporting new RLE format
51 * 2 6/26/97 12:12a Lawrance
52 * supporting anti-aliased bitmap animations
54 * 1 6/23/97 5:09p Lawrance
56 * 10 5/19/97 2:28p Lawrance
57 * changes some variables to flags
59 * 9 5/15/97 5:58p Lawrance
60 * fix some bugs that were present with animations when playing multiple
63 * 8 5/15/97 4:42p Lawrance
64 * suporting anims in-game
66 * 7 5/15/97 11:46a Lawrance
67 * add function to check if an anim is playing
69 * 6 2/28/97 12:17p Lawrance
70 * supporting mapping file to memory
72 * 5 2/25/97 11:06a Lawrance
73 * moved some higher level functions to from PackUnpack to AnimPlay
75 * 4 2/19/97 9:27p Lawrance
76 * added pause capability to anim playback
78 * 3 2/17/97 4:19p Lawrance
79 * using frame numbers instead of percentages for accessing keyframes
81 * 2 2/17/97 3:01p Lawrance
82 * code for playing back an anim
87 #ifndef __ANIMPLAY_H__
88 #define __ANIMPLAY_H__
97 // structure passed in when playing an anim. Talk about overkill..
107 int framerate_independent;
114 extern int Anim_paused;
117 void anim_level_init();
118 void anim_level_close();
119 void anim_render_all(int screen_id, float frametime);
120 void anim_render_one(int screen_id, anim_instance *ani, float frametime);
121 void anim_play_init(anim_play_struct *aps, anim *a_info, int x, int y);
122 anim_instance *anim_play(anim_play_struct *aps);
123 void anim_ignore_next_frametime();
124 int anim_stop_playing(anim_instance* anim_instance);
125 int anim_show_next_frame(anim_instance *instance, float frametime);
126 void anim_release_all_instances(int screen_id = 0);
127 void anim_release_render_instance(anim_instance* instance);
128 anim *anim_load(char *name, int file_mapped = 0);
129 int anim_free(anim *ptr);
130 int anim_playing(anim_instance *ai);
131 int anim_write_frames_out(char *filename);
132 void anim_display_info(char *filename);
133 void anim_read_header(anim *ptr, CFILE *fp);
134 void anim_reverse_direction(anim_instance *ai); // called automatically for ping-ponging, and can also be called externally
135 void anim_pause(anim_instance *ai);
136 void anim_unpause(anim_instance *ai);
138 int anim_instance_is_streamed(anim_instance *ai);
139 unsigned char anim_instance_get_byte(anim_instance *ai, int offset);
141 #endif /* __ANIMPLAY_H__ */