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"
37 int movie_play(char *filename, int cd_prompt)
39 // mark the movie as viewable in the techroom if in a campaign
40 if (Game_mode & GM_CAMPAIGN_MODE) {
41 cutscene_mark_viewable(filename);
44 if (Cmdline_play_movies) {
48 // if ( cd_prompt == -1 )
49 // cd_prompt = require_cd;
51 // look for correct CD when viewing movies in the tech room
52 // if (gameseq_get_state() == GS_STATE_VIEW_CUTSCENES) {
53 // cutscenes_validate_cd(filename, cd_prompt);
56 movie = mve_open(filename);
59 // kill all background sounds
60 game_stop_looped_sounds();
61 main_hall_stop_music();
62 main_hall_stop_ambient();
64 // clear the screen and hide the mouse cursor
69 gr_zbuffer_clear(1); // G400, blah
75 // ...done playing, close the mve and show the cursor again
80 main_hall_start_ambient();
82 printf("Can't open movie file: '%s'\n", filename);
87 mprintf(("Movies are disabled, skipping...\n"));
93 int movie_play_two(char *filename1, char *filename2)
95 // FIXME: part of the CD code which isn't included yet
98 // make sure the first movie played correctly, then play the second one
99 if (movie_play(filename1, require_cd)) {
100 movie_play(filename2, require_cd);
102 printf("Not playing second movie: %s\n", filename2);