Bug #1743 ยป 0039-SDL3_rotozoom.c-Clear-trailing-tabs.patch
| client/gui-sdl3/SDL3_gfx/SDL3_rotozoom.c | ||
|---|---|---|
|
* Scan destination
|
||
|
*/
|
||
|
sp = (tColorRGBA *) src->pixels;
|
||
|
|
||
|
dp = (tColorRGBA *) dst->pixels;
|
||
|
dgap = dst->pitch - dst->w * 4;
|
||
| ... | ... | |
|
dp->b = (((t2 - t1) * ey) >> 16) + t1;
|
||
|
t1 = ((((c01->a - c00->a) * ex) >> 16) + c00->a) & 0xff;
|
||
|
t2 = ((((c11->a - c10->a) * ex) >> 16) + c10->a) & 0xff;
|
||
|
dp->a = (((t2 - t1) * ey) >> 16) + t1;
|
||
|
dp->a = (((t2 - t1) * ey) >> 16) + t1;
|
||
|
/*
|
||
|
* Advance source pointer x
|
||
|
*/
|
||
|
salast = csax;
|
||
|
csax++;
|
||
|
csax++;
|
||
|
sstep = (*csax >> 16) - (*salast >> 16);
|
||
|
if (flipx) {
|
||
|
sp -= sstep;
|
||
| ... | ... | |
|
} else {
|
||
|
/*
|
||
|
* Non-Interpolating Zoom
|
||
|
*/
|
||
|
*/
|
||
|
csay = say;
|
||
|
for (y = 0; y < dst->h; y++) {
|
||
|
csp = sp;
|
||
| ... | ... | |
|
* Advance source pointer x
|
||
|
*/
|
||
|
salast = csax;
|
||
|
csax++;
|
||
|
csax++;
|
||
|
sstep = (*csax >> 16) - (*salast >> 16);
|
||
|
if (flipx) sstep = -sstep;
|
||
|
sp += sstep;
|
||
| ... | ... | |
|
csay++;
|
||
|
sstep = (*csay >> 16) - (*salast >> 16);
|
||
|
sstep *= spixelgap;
|
||
|
if (flipy) sstep = -sstep;
|
||
|
if (flipy) sstep = -sstep;
|
||
|
sp = csp + sstep;
|
||
|
/*
|
||
| ... | ... | |
|
*/
|
||
|
if (src_converted) {
|
||
|
SDL_DestroySurface(rz_src);
|
||
|
}
|
||
|
}
|
||
|
return NULL;
|
||
|
}
|
||