Re: [sdljava-users] Aaaaaaargh...
Status: Beta
Brought to you by:
ivan_ganza
|
From: Chris D. <Des...@nt...> - 2005-03-21 06:03:45
|
Rainer Koschnick wrote:
> I've been checking my code over and over again for a bug (or rather
> undocumented feature?) which is actually in the native binding :/
> This costed me hours and hours.
>
> Why isn't this documented? SDLBlitSurface doesn't behave as it should
> due to those changes below.
>
> int SWIG_SDL_BlitSurface_FAST(SDL_Surface * src, int sX, int sY, int
> sWidth, int sHeight, SDL_Surface *dst, int dX, int dY, int dWidth, int
> dHeight) {
> srcBlitRect.x = (sX > -1 ? sX : 0);
> srcBlitRect.y = (sY > -1 ? sY : 0);
> srcBlitRect.w = (sWidth > -1 ? sWidth : 0);
> srcBlitRect.h = (sHeight > -1 ? sHeight : 0);
>
> dstBlitRect.x = (dX > -1 ? dX : 0);
> dstBlitRect.y = (dY > -1 ? dY : 0);
> dstBlitRect.w = (dWidth > -1 ? dWidth : 0);
> dstBlitRect.h = (dHeight > -1 ? dHeight: 0);
>
> return SDL_BlitSurface(src, &srcBlitRect, dst, &dstBlitRect);
> }
>
> Positions _CAN_ be negative. Otherwise how are you supposed to move a
> sprite or image outside of the screen if it is nailed to position 0?
>
> srcBlitRect.x = sX;
> srcBlitRect.y = sY;
> srcBlitRect.w = (sWidth > -1 ? sWidth : 0);
> srcBlitRect.h = (sHeight > -1 ? sHeight : 0);
>
> dstBlitRect.x = dX;
> dstBlitRect.y = dY;
> dstBlitRect.w = (dWidth > -1 ? dWidth : 0);
> dstBlitRect.h = (dHeight > -1 ? dHeight: 0);
>
> Rainer
Erk, that might be a bit of a problem. See if you can make a patch based
on the CVS source, and then submit it to this mailing list.
--
|>>>
Dessimat0r /`\ |
"We cannot turn back time, but we can _ _|_ _
move it forwards with our own hands." |;|_|;|_|;|
\\. . /
[www: http://codeknight.net ] \\: . /
[e-mail: des...@nt... ] ||: U | /`\
[icq: 21477909 ] ||:. |
[msn: des...@nt... ] \,/ ||: U.|
||: | \,/
||: , |
____--`~--- '--~~__ __ ----~ - ~`---,
-~--~ ~---__ ,--~' ~~----___
|