Exemplo n.º 1
0
/*
* R_UploadCinematic
*/
void R_UploadCinematic( unsigned int id )
{
	r_cinhandle_t *handle;
	
	handle = R_GetCinematicHandleById( id );
	if( handle ) {
		R_ResampleCinematicFrame( handle );
	}
}
Exemplo n.º 2
0
/*
* R_GetCinematicById
*/
struct cinematics_s *R_GetCinematicById( unsigned int id ) {
	r_cinhandle_t *handle;

	handle = R_GetCinematicHandleById( id );
	if( handle ) {
		return handle->cin;
	}
	return NULL;
}
Exemplo n.º 3
0
/*
* R_GetCinematicImage
*/
image_t *R_GetCinematicImage( unsigned int id ) {
	r_cinhandle_t *handle;

	handle = R_GetCinematicHandleById( id );
	if( handle ) {
		return handle->image;
	}
	return NULL;

}
Exemplo n.º 4
0
/*
* R_FreeCinematic
*/
void R_FreeCinematic( unsigned int id ) {
	qmutex_t *lock;
	r_cinhandle_t *handle;

	handle = R_GetCinematicHandleById( id );
	if( !handle ) {
		return;
	}

	lock = handle->lock;
	ri.Mutex_Lock( lock );

	ri.CIN_Close( handle->cin );
	handle->cin = NULL;
	handle->lock = NULL;

	assert( handle->name );
	R_Free( handle->name );
	handle->name = NULL;

	assert( handle->uploadName );
	R_Free( handle->uploadName );
	handle->uploadName = NULL;

	// remove from linked active list
	handle->prev->next = handle->next;
	handle->next->prev = handle->prev;

	// insert into linked free list
	handle->next = r_free_cinematics;
	r_free_cinematics = handle;

	ri.Mutex_Unlock( lock );

	ri.Mutex_Destroy( &lock );
}