/* ================== SCR_InitCinematic ================== */ void SCR_InitCinematic( void ) { AVI_Initailize (); cin_state = AVI_GetState( CIN_MAIN ); SCR_RebuildGammaTable(); }
/* ================== SCR_VidInit ================== */ void SCR_VidInit( void ) { Q_memset( &clgame.ds, 0, sizeof( clgame.ds )); // reset a draw state Q_memset( &menu.ds, 0, sizeof( menu.ds )); // reset a draw state Q_memset( &clgame.centerPrint, 0, sizeof( clgame.centerPrint )); // update screen sizes for menu menu.globals->scrWidth = scr_width->integer; menu.globals->scrHeight = scr_height->integer; SCR_RebuildGammaTable(); #ifndef NO_VGUI VGui_Startup (); #endif clgame.load_sequence++; // now all hud sprites are invalid // vid_state has changed if( menu.hInstance ) menu.dllFuncs.pfnVidInit(); if( clgame.hInstance ) clgame.dllFuncs.pfnVidInit(); // restart console size Con_VidInit (); }
/* =============== R_BeginFrame =============== */ void R_BeginFrame( qboolean clearScene ) { glConfig.softwareGammaUpdate = false; // in case of possible fails if(( gl_clear->integer || gl_overview->integer ) && clearScene && cls.state != ca_cinematic ) { pglClear( GL_COLOR_BUFFER_BIT ); } // update gamma if( vid_gamma->modified ) { if( glConfig.deviceSupportsGamma ) { SCR_RebuildGammaTable(); GL_UpdateGammaRamp(); vid_gamma->modified = false; } else { glConfig.softwareGammaUpdate = true; BuildGammaTable( vid_gamma->value, vid_texgamma->value ); GL_RebuildLightmaps(); glConfig.softwareGammaUpdate = false; } } R_Set2DMode( true ); // draw buffer stuff pglDrawBuffer( GL_BACK ); // texturemode stuff // update texture parameters if( gl_texturemode->modified || gl_texture_anisotropy->modified || gl_texture_lodbias ->modified ) R_SetTextureParameters(); // swapinterval stuff GL_UpdateSwapInterval(); CL_ExtraUpdate (); }
/* ================== SCR_PlayCinematic ================== */ qboolean SCR_PlayCinematic( const char *arg ) { string path; const char *fullpath; fullpath = FS_GetDiskPath( arg, false ); if( FS_FileExists( arg, false ) && !fullpath ) { MsgDev( D_ERROR, "Couldn't load %s from packfile. Please extract it\n", path ); return false; } AVI_OpenVideo( cin_state, fullpath, true, true, false ); if( !AVI_IsActive( cin_state )) { AVI_CloseVideo( cin_state ); return false; } if( !( AVI_GetVideoInfo( cin_state, &xres, &yres, &video_duration ))) // couldn't open this at all. { AVI_CloseVideo( cin_state ); return false; } if( AVI_GetAudioInfo( cin_state, &cin_audio )) { // begin streaming S_StopAllSounds(); S_StartStreaming(); } UI_SetActiveMenu( false ); SCR_RebuildGammaTable(); cls.state = ca_cinematic; cin_time = 0.0f; return true; }