/* * R_UploadCinematic */ void R_UploadCinematic( unsigned int id ) { r_cinhandle_t *handle; handle = R_GetCinematicHandleById( id ); if( handle ) { R_ResampleCinematicFrame( handle ); } }
/* * 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; }
/* * R_GetCinematicImage */ image_t *R_GetCinematicImage( unsigned int id ) { r_cinhandle_t *handle; handle = R_GetCinematicHandleById( id ); if( handle ) { return handle->image; } return NULL; }
/* * 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 ); }