|
|
|
@ -91,7 +91,7 @@ Assumes dst surface was allocated with the correct dimensions.
|
|
|
|
|
*/
|
|
|
|
|
int _shrinkSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int factorx, int factory)
|
|
|
|
|
{
|
|
|
|
|
int x, y, dx, dy, sgap, dgap, ra, ga, ba, aa;
|
|
|
|
|
int x, y, dx, dy, dgap, ra, ga, ba, aa;
|
|
|
|
|
int n_average;
|
|
|
|
|
tColorRGBA *sp, *osp, *oosp;
|
|
|
|
|
tColorRGBA *dp;
|
|
|
|
@ -107,7 +107,7 @@ int _shrinkSurfaceRGBA(SDL_Surface * src, SDL_Surface * dst, int factorx, int fa
|
|
|
|
|
* Scan destination
|
|
|
|
|
*/
|
|
|
|
|
sp = (tColorRGBA *) src->pixels;
|
|
|
|
|
sgap = src->pitch - src->w * 4;
|
|
|
|
|
// sgap = src->pitch - src->w * 4;
|
|
|
|
|
|
|
|
|
|
dp = (tColorRGBA *) dst->pixels;
|
|
|
|
|
dgap = dst->pitch - dst->w * 4;
|
|
|
|
@ -180,7 +180,7 @@ Assumes dst surface was allocated with the correct dimensions.
|
|
|
|
|
*/
|
|
|
|
|
int _shrinkSurfaceY(SDL_Surface * src, SDL_Surface * dst, int factorx, int factory)
|
|
|
|
|
{
|
|
|
|
|
int x, y, dx, dy, sgap, dgap, a;
|
|
|
|
|
int x, y, dx, dy, dgap, a;
|
|
|
|
|
int n_average;
|
|
|
|
|
Uint8 *sp, *osp, *oosp;
|
|
|
|
|
Uint8 *dp;
|
|
|
|
@ -196,7 +196,7 @@ int _shrinkSurfaceY(SDL_Surface * src, SDL_Surface * dst, int factorx, int facto
|
|
|
|
|
* Scan destination
|
|
|
|
|
*/
|
|
|
|
|
sp = (Uint8 *) src->pixels;
|
|
|
|
|
sgap = src->pitch - src->w;
|
|
|
|
|
// sgap = src->pitch - src->w;
|
|
|
|
|
|
|
|
|
|
dp = (Uint8 *) dst->pixels;
|
|
|
|
|
dgap = dst->pitch - dst->w;
|
|
|
|
@ -729,7 +729,7 @@ Assumes dst surface was allocated with the correct dimensions.
|
|
|
|
|
*/
|
|
|
|
|
void transformSurfaceY(SDL_Surface * src, SDL_Surface * dst, int cx, int cy, int isin, int icos, int flipx, int flipy)
|
|
|
|
|
{
|
|
|
|
|
int x, y, dx, dy, xd, yd, sdx, sdy, ax, ay, sw, sh;
|
|
|
|
|
int x, y, dx, dy, xd, yd, sdx, sdy, ax, ay;
|
|
|
|
|
tColorY *pc, *sp;
|
|
|
|
|
int gap;
|
|
|
|
|
|
|
|
|
@ -740,8 +740,8 @@ void transformSurfaceY(SDL_Surface * src, SDL_Surface * dst, int cx, int cy, int
|
|
|
|
|
yd = ((src->h - dst->h) << 15);
|
|
|
|
|
ax = (cx << 16) - (icos * cx);
|
|
|
|
|
ay = (cy << 16) - (isin * cx);
|
|
|
|
|
sw = src->w - 1;
|
|
|
|
|
sh = src->h - 1;
|
|
|
|
|
// sw = src->w - 1;
|
|
|
|
|
// sh = src->h - 1;
|
|
|
|
|
pc = (tColorY*) dst->pixels;
|
|
|
|
|
gap = dst->pitch - dst->w;
|
|
|
|
|
/*
|
|
|
|
|