|
|
|
|
@ -384,8 +384,8 @@ int SDL_BlitScaled(SDL_Surface *src, SDL_Rect *srcrect,
|
|
|
|
|
if (NULL == dstrect) { |
|
|
|
|
dst_x0 = 0; |
|
|
|
|
dst_y0 = 0; |
|
|
|
|
dst_x1 = dst_w - 1; |
|
|
|
|
dst_y1 = dst_h - 1; |
|
|
|
|
dst_x1 = static_cast<float>(dst_w - 1); |
|
|
|
|
dst_y1 = static_cast<float>(dst_h - 1); |
|
|
|
|
} else { |
|
|
|
|
dst_x0 = dstrect->x; |
|
|
|
|
dst_y0 = dstrect->y; |
|
|
|
|
@ -396,8 +396,8 @@ int SDL_BlitScaled(SDL_Surface *src, SDL_Rect *srcrect,
|
|
|
|
|
if (NULL == srcrect) { |
|
|
|
|
src_x0 = 0; |
|
|
|
|
src_y0 = 0; |
|
|
|
|
src_x1 = src_w - 1; |
|
|
|
|
src_y1 = src_h - 1; |
|
|
|
|
src_x1 = static_cast<float>(src_w - 1); |
|
|
|
|
src_y1 = static_cast<float>(src_h - 1); |
|
|
|
|
} else { |
|
|
|
|
src_x0 = srcrect->x; |
|
|
|
|
src_y0 = srcrect->y; |
|
|
|
|
@ -413,7 +413,7 @@ int SDL_BlitScaled(SDL_Surface *src, SDL_Rect *srcrect,
|
|
|
|
|
|
|
|
|
|
if (src_x1 >= src->w) { |
|
|
|
|
dst_x1 -= (src_x1 - src->w + 1) * scaling_w; |
|
|
|
|
src_x1 = src->w - 1; |
|
|
|
|
src_x1 = static_cast<float>(src->w - 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (src_y0 < 0) { |
|
|
|
|
@ -423,7 +423,7 @@ int SDL_BlitScaled(SDL_Surface *src, SDL_Rect *srcrect,
|
|
|
|
|
|
|
|
|
|
if (src_y1 >= src->h) { |
|
|
|
|
dst_y1 -= (src_y1 - src->h + 1) * scaling_h; |
|
|
|
|
src_y1 = src->h - 1; |
|
|
|
|
src_y1 = static_cast<float>(src->h - 1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -442,7 +442,7 @@ int SDL_BlitScaled(SDL_Surface *src, SDL_Rect *srcrect,
|
|
|
|
|
|
|
|
|
|
if (dst_x1 >= dst->clip_rect.w) { |
|
|
|
|
src_x1 -= (dst_x1 - dst->clip_rect.w + 1) / scaling_w; |
|
|
|
|
dst_x1 = dst->clip_rect.w - 1; |
|
|
|
|
dst_x1 = static_cast<float>(dst->clip_rect.w - 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (dst_y0 < 0) { |
|
|
|
|
@ -452,7 +452,7 @@ int SDL_BlitScaled(SDL_Surface *src, SDL_Rect *srcrect,
|
|
|
|
|
|
|
|
|
|
if (dst_y1 >= dst->clip_rect.h) { |
|
|
|
|
src_y1 -= (dst_y1 - dst->clip_rect.h + 1) / scaling_h; |
|
|
|
|
dst_y1 = dst->clip_rect.h - 1; |
|
|
|
|
dst_y1 = static_cast<float>(dst->clip_rect.h - 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* Translate back to surface coordinates */ |
|
|
|
|
|