mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-01 13:40:59 +00:00
little speed up
This commit is contained in:
parent
56ea94978d
commit
96a81f64f9
1 changed files with 6 additions and 5 deletions
|
@ -122,13 +122,14 @@ R_LoadPic (char *name, byte *pic, int width, int height, imagetype_t type)
|
||||||
image->transparent = false;
|
image->transparent = false;
|
||||||
for (i=0 ; i<c ; i++)
|
for (i=0 ; i<c ; i++)
|
||||||
{
|
{
|
||||||
int b;
|
if (pic[i] == 255)
|
||||||
|
{
|
||||||
b = pic[i];
|
|
||||||
if (b == 255)
|
|
||||||
image->transparent = true;
|
image->transparent = true;
|
||||||
image->pixels[0][i] = b;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
memcpy(image->pixels[0], pic, c);
|
||||||
|
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue