Exemple #1
0
qboolean SCR_DrawCinematic (void)
{
	if (cl.cinematictime <= 0)
		return false;

	if (cin.isStaticPic) // Knightmare- HACK to show JPG endscreens
	{
		R_DrawStretchPic (0, 0, viddef.width, viddef.height, cin.picName, 1.0);
		return true;
	}

	// Knightmare- pause if reloading video
	if (cls.key_dest == key_menu || vid_ref->modified)
	{	// blank screen and pause if menu is up
		R_SetPalette(NULL);
		cl.cinematicpalette_active = false;
		return true;
	}

	if (!cl.cinematicpalette_active)
	{
		R_SetPalette(cl.cinematicpalette);
		cl.cinematicpalette_active = true;
	}

	if (!cin.pic)
		return true;

	// fix odd-colored lines at top and bottom of screen
	//R_DrawStretchRaw (0, 0, viddef.width, viddef.height,
	//	cin.width, cin.height, cin.pic);
	R_DrawStretchRaw (-2, -2, viddef.width +4, viddef.height +4,
		cin.width, cin.height, cin.pic);
	return true;
}
Exemple #2
0
/*
* SCR_DrawCinematic
*
* Returns true if a cinematic is active, meaning the view rendering should be skipped
*/
qboolean SCR_DrawCinematic( void )
{
	cinematics_t *cin;

	if( !SCR_ValidCinematic() )
		return qfalse;

	cin = ( cinematics_t * )cl.cin;
	if( !cin->pic )
		return qtrue;

	R_DrawStretchRaw( 0, 0, viddef.width, viddef.height, cin->width, cin->height, cin->frame, cin->pic );

	return qtrue;
}
Exemple #3
0
/*
==================
SCR_DrawCinematic

Returns true if a cinematic is active, meaning the view rendering
should be skipped
==================
*/
qboolean SCR_DrawCinematic( void )
{
	static int	last_frame = -1;
	qboolean		redraw = false;
	byte		*frame = NULL;

	if( !glw_state.initialized || cin_time <= 0.0f )
		return false;

	if( cin_frame != last_frame )
	{
		frame = AVI_GetVideoFrame( cin_state, cin_frame );
		last_frame = cin_frame;
		redraw = true;
	}

	R_DrawStretchRaw( 0, 0, scr_width->integer, scr_height->integer, xres, yres, frame, redraw );

	return true;
}