X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=cl_video.h;h=05bf4a160cbca5f8fd5d64a73db3132cbe0be753;hb=1fd37f5239fe019e4d53c3e19b6fa9ff67da12e1;hp=bd706bc536e8f7c5255f4dcb3a238cd91cbb62b3;hpb=915e560b06f711d217c4fac68811fb48ee2f9e77;p=xonotic%2Fdarkplaces.git diff --git a/cl_video.h b/cl_video.h index bd706bc5..05bf4a16 100644 --- a/cl_video.h +++ b/cl_video.h @@ -2,8 +2,11 @@ #ifndef CL_VIDEO_H #define CL_VIDEO_H +#include "cl_dyntexture.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,24 +39,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) - + // used to determine whether the video's resources should be freed or not - double lasttime; + double lasttime; // when lasttime - realtime > THRESHOLD, all but the stream is freed - qboolean suspended; + 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 ); @@ -64,4 +67,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