]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_video.c
eliminated qbyte type, now uses unsigned char throughout the engine for this purpose
[xonotic/darkplaces.git] / cl_video.c
index 8baebeddab8f27b44214cd8b9a1366e5b52c83c3..1055cf00a1f0be5484278ad4f75247b2fdcfe766 100644 (file)
@@ -69,7 +69,7 @@ static qboolean WakeVideo( clvideo_t * video )
        return true;
 }
 
-static clvideo_t* OpenVideo( clvideo_t *video, char *filename, char *name, int owner )
+static clvideo_t* OpenVideo( clvideo_t *video, const char *filename, const char *name, int owner )
 {
        strncpy( video->filename, filename, MAX_QPATH );
        video->ownertag = owner;
@@ -95,7 +95,7 @@ static clvideo_t* OpenVideo( clvideo_t *video, char *filename, char *name, int o
        return video;
 }
 
-clvideo_t* CL_OpenVideo( char *filename, char *name, int owner )
+clvideo_t* CL_OpenVideo( const char *filename, const char *name, int owner )
 {
        clvideo_t *video;
 
@@ -107,7 +107,7 @@ clvideo_t* CL_OpenVideo( char *filename, char *name, int owner )
        return OpenVideo( video, filename, name, owner );
 }
 
-clvideo_t* CL_GetVideo( char *name )
+clvideo_t* CL_GetVideo( const char *name )
 {
        int i;
        clvideo_t *video;
@@ -195,7 +195,7 @@ static void VideoFrame( clvideo_t *video )
                                return;
                        }
                } while( video->framenum < destframe );
-               R_UpdateTexture( video->cpif.tex, video->imagedata );
+               R_UpdateTexture( video->cpif.tex, (unsigned char *)video->imagedata );
        }
 }
 
@@ -239,7 +239,7 @@ int cl_videoplaying = false; // old, but still supported
 void CL_DrawVideo(void)
 {
        if (cl_videoplaying)
-               DrawQ_Pic(0, 0, videoarray->cpif.name, vid.conwidth, vid.conheight, 1, 1, 1, 1, 0);
+               DrawQ_Pic(0, 0, videoarray->cpif.name, vid_conwidth.integer, vid_conheight.integer, 1, 1, 1, 1, 0);
 }
 
 void CL_VideoStart(char *filename)
@@ -268,6 +268,8 @@ static void CL_PlayVideo_f(void)
 {
        char name[1024];
 
+       Host_StartVideo();
+
        if (Cmd_Argc() != 2)
        {
                Con_Print("usage: playvideo <videoname>\nplays video named video/<videoname>.dpv\n");