Re: [AD] possible bug in draw_sprite_h_flip C version while clipping |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> diff attached, all the flip routines now clip properly.
Here's the fix I'm going to commit:
--- cvsroot/allegro/src/c/cspr.h Sun Dec 16 16:12:04 2001
+++ allegro/src/c/cspr.h Tue May 21 09:41:58 2002
@@ -203,6 +203,8 @@
if (h <= 0)
return;
+ /* use backward drawing onto dst */
+ sybeg = src->h - (sybeg + h);
dybeg += h - 1;
}
else {
@@ -269,6 +271,8 @@
if (w <= 0)
return;
+ /* use backward drawing onto dst */
+ sxbeg = src->w - (sxbeg + w);
dxbeg += w - 1;
tmp = dst->ct - dy;
@@ -344,6 +348,8 @@
if (w <= 0)
return;
+ /* use backward drawing onto dst */
+ sxbeg = src->w - (sxbeg + w);
dxbeg += w - 1;
tmp = dst->ct - dy;
@@ -355,6 +361,8 @@
if (h <= 0)
return;
+ /* use backward drawing onto dst */
+ sybeg = src->h - (sybeg + h);
dybeg += h - 1;
}
else {
--
Eric Botcazou
ebotcazou@xxxxxxxxxx