2 * $Logfile: /Freespace2/src/movie/movie.cpp $
7 * Frontend for MVE playing
10 * Revision 1.4 2005/03/29 07:50:34 taylor
11 * Update to newest movie code with much better video support and audio support from
12 * Pierre Willenbrock. Movies are enabled always now (no longer a build option)
13 * and but can be skipped with the "--nomovies" or "-n" cmdline options.
24 #include "cutscenes.h"
25 #include "freespace.h"
29 #include "gamesequence.h"
30 #include "mainhallmenu.h"
32 int movie_play(char *filename, int cd_prompt)
34 // mark the movie as viewable in the techroom if in a campaign
35 if (Game_mode & GM_CAMPAIGN_MODE) {
36 cutscene_mark_viewable(filename);
39 if (Cmdline_play_movies) {
42 printf("Playing movie: %s\n", filename);
45 // if ( cd_prompt == -1 )
46 // cd_prompt = require_cd;
48 // look for correct CD when viewing movies in the tech room
49 // if (gameseq_get_state() == GS_STATE_VIEW_CUTSCENES) {
50 // cutscenes_validate_cd(filename, cd_prompt);
53 movie = mve_open(filename);
56 // kill all background sounds
57 game_stop_looped_sounds();
58 main_hall_stop_music();
59 main_hall_stop_ambient();
61 // clear the screen and hide the mouse cursor
66 gr_zbuffer_clear(1); // G400, blah
72 // ...done playing, close the mve and show the cursor again
77 main_hall_start_ambient();
79 printf("Can't open movie file: '%s'\n", filename);
84 mprintf(("Movies are disabled, skipping...\n"));
90 int movie_play_two(char *filename1, char *filename2)
92 // FIXME: part of the CD code which isn't included yet
95 // make sure the first movie played correctly, then play the second one
96 if (movie_play(filename1, require_cd)) {
97 movie_play(filename2, require_cd);
99 printf("Not playing second movie: %s\n", filename2);