]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - image.c
Fix one typo on rcon_secure_maxdiff - added CVAR_SAVE accidentally during the massive...
[xonotic/darkplaces.git] / image.c
diff --git a/image.c b/image.c
index 9e3f0fd64472a03e0bcea0d7dce15f35fa256529..2c8fb33231781e5f8ad05a09dae57492e4359db6 100644 (file)
--- a/image.c
+++ b/image.c
@@ -20,7 +20,7 @@ static void Image_CopyAlphaFromBlueBGRA(unsigned char *outpixels, const unsigned
 }
 
 #if 1
-// written by LordHavoc in a readable way, optimized by Vic, further optimized by LordHavoc (the non-special index case), readable version preserved below this
+// written by LadyHavoc in a readable way, optimized by Vic, further optimized by LadyHavoc (the non-special index case), readable version preserved below this
 void Image_CopyMux(unsigned char *outpixels, const unsigned char *inpixels, int inputwidth, int inputheight, qboolean inputflipx, qboolean inputflipy, qboolean inputflipdiagonal, int numoutputcomponents, int numinputcomponents, int *outputinputcomponentindices)
 {
        int index, c, x, y;
@@ -210,7 +210,7 @@ static unsigned char* LoadPCX_BGRA (const unsigned char *f, int filesize, int *m
        memcpy(&pcx, fin, sizeof(pcx));
        fin += sizeof(pcx);
 
-       // LordHavoc: big-endian support ported from QF newtree
+       // LadyHavoc: big-endian support ported from QF newtree
        pcx.xmax = LittleShort (pcx.xmax);
        pcx.xmin = LittleShort (pcx.xmin);
        pcx.ymax = LittleShort (pcx.ymax);
@@ -300,7 +300,7 @@ qboolean LoadPCX_QWSkin(const unsigned char *f, int filesize, unsigned char *pix
        memcpy(&pcx, fin, sizeof(pcx));
        fin += sizeof(pcx);
 
-       // LordHavoc: big-endian support ported from QF newtree
+       // LadyHavoc: big-endian support ported from QF newtree
        pcx.xmax = LittleShort (pcx.xmax);
        pcx.xmin = LittleShort (pcx.xmin);
        pcx.ymax = LittleShort (pcx.ymax);
@@ -1370,19 +1370,19 @@ int fixtransparentpixels(unsigned char *data, int w, int h)
        return changedPixels;
 }
 
-void Image_FixTransparentPixels_f(void)
+void Image_FixTransparentPixels_f(cmd_state_t *cmd)
 {
        const char *filename, *filename_pattern;
        fssearch_t *search;
        int i, n;
        char outfilename[MAX_QPATH], buf[MAX_QPATH];
        unsigned char *data;
-       if(Cmd_Argc() != 2)
+       if(Cmd_Argc(cmd) != 2)
        {
-               Con_Printf("Usage: %s imagefile\n", Cmd_Argv(0));
+               Con_Printf("Usage: %s imagefile\n", Cmd_Argv(cmd, 0));
                return;
        }
-       filename_pattern = Cmd_Argv(1);
+       filename_pattern = Cmd_Argv(cmd, 1);
        search = FS_Search(filename_pattern, true, true);
        if(!search)
                return;
@@ -1894,10 +1894,10 @@ unsigned char *Image_GenerateNoTexture(void)
        {
                for (x = 0; x < 16; x++)
                {
-                       data[(y * 8 + x) * 4 + 0] =
-                               data[(y * 8 + x) * 4 + 1] =
-                               data[(y * 8 + x) * 4 + 2] = (y < 8) ^ (x < 8) ? 128 : 64;
-                       data[(y * 8 + x) * 4 + 3] = 255;
+                       data[(y * 16 + x) * 4 + 0] =
+                       data[(y * 16 + x) * 4 + 1] =
+                       data[(y * 16 + x) * 4 + 2] = (y < 8) ^ (x < 8) ? 128 : 64;
+                       data[(y * 16 + x) * 4 + 3] = 255;
                }
        }
        return data;