}
#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;
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);
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);
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;
{
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;