mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
remove some redundant steps
This commit is contained in:
parent
88f7b9ae84
commit
ca55210c6e
1 changed files with 2 additions and 15 deletions
|
@ -536,7 +536,7 @@ SCR_ScreenShot (int width, int height)
|
|||
tex->palette = vid.palette;
|
||||
|
||||
for (y = 0; y < h; y++) {
|
||||
dest = snap + (w * 3 * y);
|
||||
dest = tex->data + (w * y);
|
||||
|
||||
for (x = 0; x < w; x++) {
|
||||
r = g = b = 0;
|
||||
|
@ -563,20 +563,7 @@ SCR_ScreenShot (int width, int height)
|
|||
r /= count;
|
||||
g /= count;
|
||||
b /= count;
|
||||
*dest++ = r;
|
||||
*dest++ = g;
|
||||
*dest++ = b;
|
||||
}
|
||||
}
|
||||
|
||||
// convert to eight bit
|
||||
for (y = 0; y < h; y++) {
|
||||
src = snap + (w * 3 * y);
|
||||
dest = tex->data + (w * y);
|
||||
|
||||
for (x = 0; x < w; x++) {
|
||||
*dest++ = MipColor (src[0], src[1], src[2]);
|
||||
src += 3;
|
||||
*dest++ = MipColor (r, g, b);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue