2 * $Logfile: /Freespace2/src/movie/movie.cpp $
7 * Frontend for MVE playing
10 * Revision 1.5 2005/10/01 21:48:01 taylor
12 * fix decoder to swap opcode 0xb since it screws up on PPC
13 * the previous opcode 0xc change was wrong since we had already determined that it messes up FS1 movies
15 * Revision 1.4 2005/03/29 07:50:34 taylor
16 * Update to newest movie code with much better video support and audio support from
17 * Pierre Willenbrock. Movies are enabled always now (no longer a build option)
18 * and but can be skipped with the "--nomovies" or "-n" cmdline options.
29 #include "cutscenes.h"
30 #include "freespace.h"
34 #include "gamesequence.h"
35 #include "mainhallmenu.h"
39 int movie_play(const char *filename)
41 // mark the movie as viewable in the techroom if in a campaign
42 if (Game_mode & GM_CAMPAIGN_MODE) {
43 cutscene_mark_viewable(filename);
46 if ( !Cmdline_play_movies ) {
47 mprintf(("Movies are disabled, skipping playback of '%s'...\n", filename));
51 MVESTREAM *movie = NULL;
53 movie = mve_open(filename);
56 mprintf(("Can't open movie file: '%s'\n", filename));
60 // kill all background sounds
62 audiostream_pause_all();
64 // clear the screen and hide the mouse cursor
66 gr_set_clear_color(0, 0, 0);
71 gr_zbuffer_clear(1); // G400, blah
77 // ...done playing, close the mve and show the cursor again
83 audiostream_unpause_all();
88 int movie_play_two(const char *filename1, const char *filename2)
90 // make sure the first movie played correctly, then play the second one
91 if ( movie_play(filename1) ) {
92 movie_play(filename2);
94 printf("Not playing second movie: %s\n", filename2);