mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-30 04:30:43 +00:00
roll the skin resampling loops back up
This commit is contained in:
parent
0d0e570676
commit
ffd9e727a8
1 changed files with 2 additions and 14 deletions
|
@ -93,15 +93,9 @@ build_skin_8 (byte * original, int tinwidth, int tinheight,
|
||||||
for (i = 0; i < scaled_height; i++, out += scaled_width) {
|
for (i = 0; i < scaled_height; i++, out += scaled_width) {
|
||||||
inrow = original + inwidth * (i * tinheight / scaled_height);
|
inrow = original + inwidth * (i * tinheight / scaled_height);
|
||||||
frac = fracstep >> 1;
|
frac = fracstep >> 1;
|
||||||
for (j = 0; j < scaled_width; j += 4) {
|
for (j = 0; j < scaled_width; j++) {
|
||||||
out[j] = translate[inrow[frac >> 16]];
|
out[j] = translate[inrow[frac >> 16]];
|
||||||
frac += fracstep;
|
frac += fracstep;
|
||||||
out[j + 1] = translate[inrow[frac >> 16]];
|
|
||||||
frac += fracstep;
|
|
||||||
out[j + 2] = translate[inrow[frac >> 16]];
|
|
||||||
frac += fracstep;
|
|
||||||
out[j + 3] = translate[inrow[frac >> 16]];
|
|
||||||
frac += fracstep;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -126,15 +120,9 @@ build_skin_32 (byte * original, int tinwidth, int tinheight,
|
||||||
for (i = 0; i < scaled_height; i++, out += scaled_width) {
|
for (i = 0; i < scaled_height; i++, out += scaled_width) {
|
||||||
inrow = original + inwidth * (i * tinheight / scaled_height);
|
inrow = original + inwidth * (i * tinheight / scaled_height);
|
||||||
frac = fracstep >> 1;
|
frac = fracstep >> 1;
|
||||||
for (j = 0; j < scaled_width; j += 4) {
|
for (j = 0; j < scaled_width; j++) {
|
||||||
out[j] = translate32[inrow[frac >> 16]];
|
out[j] = translate32[inrow[frac >> 16]];
|
||||||
frac += fracstep;
|
frac += fracstep;
|
||||||
out[j + 1] = translate32[inrow[frac >> 16]];
|
|
||||||
frac += fracstep;
|
|
||||||
out[j + 2] = translate32[inrow[frac >> 16]];
|
|
||||||
frac += fracstep;
|
|
||||||
out[j + 3] = translate32[inrow[frac >> 16]];
|
|
||||||
frac += fracstep;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue