int GrToggleFullScreenGame (void) { static char szFullscreen [2][30] = {"toggling fullscreen mode off", "toggling fullscreen mode on"}; int i = GrToggleFullScreen (); FlushInput (); if (gameStates.app.bGameRunning) { HUDMessage (MSGC_GAME_FEEDBACK, szFullscreen [i]); StopPlayerMovement (); } return i; }
//----------------------------------------------------------------------- //returns status. see movie.h int CMovieManager::Run (char* filename, int bHires, int bRequired, int dx, int dy) { CFile cf; CMovie* movieP = NULL; int result = 1, aborted = 0; int track = 0; int nFrame; int key; CMovieLib* libP = Find (filename); result = 1; // Open Movie file. If it doesn't exist, no movie, just return. if (!(cf.Open (filename, gameFolders.szDataDir, "rb", 0) || (movieP = Open (filename, bRequired)))) { if (bRequired) { #if TRACE console.printf (CON_NORMAL, "movie: RunMovie: Cannot open movie <%s>\n", filename); #endif } return MOVIE_NOT_PLAYED; } SetScreenMode (SCREEN_MENU); //paletteManager.ResumeEffect (); MVE_memCallbacks (CMovie::Alloc, CMovie::Free); MVE_ioCallbacks (CMovie::Read); MVE_sfCallbacks (CMovie::ShowFrame); MVE_palCallbacks (CMovie::SetPalette); if (MVE_rmPrepMovie (reinterpret_cast<void*> (movieP ? &movieP->m_cf: &cf), dx, dy, track, libP ? libP->m_bLittleEndian : 1)) { Int3 (); return MOVIE_NOT_PLAYED; } nFrame = 0; gameStates.render.fonts.bHires = gameStates.render.fonts.bHiresAvailable && bHires; ogl.SetRenderQuality (gameOpts->movies.nQuality ? 5 : 0); while ((result = MVE_rmStepMovie ()) == 0) { subTitles.Draw (nFrame); //paletteManager.ResumeEffect (); // moved this here because of flashing GrUpdate (1); key = KeyInKey (); // If ESCAPE pressed, then quit movie. if (key == KEY_ESC) { result = aborted = 1; break; } // If PAUSE pressed, then pause movie if (key == KEY_PAUSE) { MVE_rmHoldMovie (); ShowPauseMessage (TXT_PAUSE); while (!KeyInKey ()) ; ClearPauseMessage (); } if ((key == KEY_ALTED+KEY_ENTER) || (key == KEY_ALTED+KEY_PADENTER)) GrToggleFullScreen (); nFrame++; } Assert (aborted || result == MVE_ERR_EOF); ///movie should be over MVE_rmEndMovie (); if (movieP) movieP->Close (); else cf.Close (); // Close Movie File // Restore old graphic state ogl.SetRenderQuality (); gameStates.video.nScreenMode = -1; //force reset of screen mode //paletteManager.ResumeEffect (); return (aborted ? MOVIE_ABORTED : MOVIE_PLAYED_FULL); }