]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_screen.c
added a #define DIRECTINPUT_VERSION to hush warnings and make it work on dinput3...
[xonotic/darkplaces.git] / cl_screen.c
index 5519df6e7a1349371480ddc31246fbcea8605b50..f9f4fe2219543442624467fb83b5bf1fbadd2507 100644 (file)
@@ -61,7 +61,7 @@ static vec4_t string_colors[] =
        {1.0, 1.0, 1.0, 1.0}, // white
        // [515]'s BX_COLOREDTEXT extension
        {1.0, 1.0, 1.0, 0.5}, // half transparent
-       {0.5, 0.5, 0.5, 1.0}  // half brightness        
+       {0.5, 0.5, 0.5, 1.0}  // half brightness
        // Black's color table
        //{1.0, 1.0, 1.0, 1.0},
        //{1.0, 0.0, 0.0, 1.0},
@@ -91,9 +91,9 @@ void DrawQ_ColoredString( float x, float y, const char *text, int maxlen, float
        color = string_colors[colorindex];
 
        if( maxlen < 1)
-               len = strlen( text );
+               len = (int)strlen( text );
        else
-               len = min( maxlen, (signed) strlen( text ) );
+               len = min( maxlen, (int) strlen( text ) );
 
        start = current = text;
        while( len > 0 ) {
@@ -117,7 +117,7 @@ void DrawQ_ColoredString( float x, float y, const char *text, int maxlen, float
                                do {
                                        colorindex = colorindex * 10 + (*current - '0');
                                        // only read as long as it makes a valid index
-                                       if( colorindex >= STRING_COLORS_COUNT ) {
+                                       if( colorindex >= (int)STRING_COLORS_COUNT ) {
                                                // undo the last operation
                                                colorindex /= 10;
                                                break;
@@ -127,7 +127,7 @@ void DrawQ_ColoredString( float x, float y, const char *text, int maxlen, float
                                } while( len > 0 && '0' <= *current && *current <= '9' );
                                // set the color
                                color = string_colors[colorindex];
-                               // we jump over the color tag 
+                               // we jump over the color tag
                                start = current;
                        }
                }
@@ -433,7 +433,7 @@ void R_TimeReport(char *desc)
        t = (int) ((r_timereport_current - r_timereport_temp) * 1000000.0);
 
        dpsnprintf(tempbuf, sizeof(tempbuf), "%8i %s", t, desc);
-       length = strlen(tempbuf);
+       length = (int)strlen(tempbuf);
        while (length < 20)
                tempbuf[length++] = ' ';
        tempbuf[length] = 0;
@@ -610,7 +610,7 @@ void DrawQ_String_Real(float x, float y, const char *string, int maxlen, float s
        if (alpha < (1.0f / 255.0f))
                return;
        if (maxlen < 1)
-               len = strlen(string);
+               len = (int)strlen(string);
        else
                for (len = 0;len < maxlen && string[len];len++);
        for (;len > 0 && string[0] == ' ';string++, x += scalex, len--);
@@ -943,7 +943,7 @@ void SCR_CaptureVideo_EndVideo(void)
        // finish the wave file
        if (cl_capturevideo_soundfile)
        {
-               i = FS_Tell (cl_capturevideo_soundfile);
+               i = (int)FS_Tell (cl_capturevideo_soundfile);
                //"RIFF", (int) unknown (chunk size), "WAVE",
                //"fmt ", (int) 16 (chunk size), (short) format 1 (uncompressed PCM), (short) 2 channels, (int) unknown rate, (int) unknown bytes per second, (short) 4 bytes per sample (channels * bytes per channel), (short) 16 bits per channel
                //"data", (int) unknown (chunk size)
@@ -1087,7 +1087,7 @@ void SCR_CaptureVideo_SoundFrame(qbyte *bufstereo16le, size_t length, int rate)
        if (!cl_capturevideo_soundfile)
                return;
        cl_capturevideo_soundrate = rate;
-       if (FS_Write (cl_capturevideo_soundfile, bufstereo16le, 4 * length) < 4 * length)
+       if (FS_Write (cl_capturevideo_soundfile, bufstereo16le, 4 * length) < (fs_offset_t)(4 * length))
        {
                Cvar_SetValueQuick(&cl_capturevideo, 0);
                Con_Printf("video sound saving failed on frame %i, out of disk space? stopping video capture.\n", cl_capturevideo_frame);