X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=cl_video.h;h=d5b1a84faabeeb6560596914f9233fbde5a40e06;hb=8f366d6dd40bc475b655bc5ca755fb3d9b464508;hp=5d9cd2f16f0d55e8e398ce698be960f9891aca5a;hpb=ce52d79dfc936b5a7607f5ce59e6e3fdfcaee2b5;p=xonotic%2Fdarkplaces.git diff --git a/cl_video.h b/cl_video.h index 5d9cd2f1..d5b1a84f 100644 --- a/cl_video.h +++ b/cl_video.h @@ -3,7 +3,8 @@ #define CL_VIDEO_H #define MAXCLVIDEOS 64 + 1 // 1 video is reserved for the cinematic mode -#define CLVIDEOPREFIX "_video/" +// yields DYNAMIC_TEXTURE_PATH_PREFIX CLVIDEOPREFIX video name for a path +#define CLVIDEOPREFIX CLDYNTEXTUREPREFIX "video/" #define CLTHRESHOLD 2.0 #define MENUOWNER 1 @@ -36,21 +37,24 @@ typedef struct clvideo_s cachepic_t cpif; // if a video is suspended, it is automatically paused (else we'd still have to process the frames) - double lasttime; // used to determine whether the video's resources should be freed or not - qboolean suspended; // when lasttime - realtime > THRESHOLD, all but the stream is freed + + // used to determine whether the video's resources should be freed or not + double lasttime; + // when lasttime - realtime > THRESHOLD, all but the stream is freed + qboolean suspended; char filename[MAX_QPATH]; } clvideo_t; -clvideo_t* CL_OpenVideo( char *filename, char *name, int owner ); -clvideo_t* CL_GetVideo( char *name ); +clvideo_t* CL_OpenVideo( const char *filename, const char *name, int owner ); +clvideo_t* CL_GetVideoByName( const char *name ); void CL_SetVideoState( clvideo_t *video, clvideostate_t state ); void CL_RestartVideo( clvideo_t *video ); void CL_CloseVideo( clvideo_t * video ); void CL_PurgeOwner( int owner ); -void CL_VideoFrame( void ); // update all videos +void CL_Video_Frame( void ); // update all videos void CL_Video_Init( void ); void CL_Video_Shutdown( void ); @@ -61,4 +65,8 @@ void CL_DrawVideo( void ); void CL_VideoStart( char *filename ); void CL_VideoStop( void ); +// new function used for fullscreen videos +// TODO: Andreas Kirsch: move this subsystem somewhere else (preferably host) since the cl_video system shouldnt do such work like managing key events.. +void CL_Video_KeyEvent( int key, int ascii, qboolean down ); + #endif