[comp.sys.amiga] Pixel bug in sprites?

Chad_The-Walrus_Netzer@cup.portal.com (01/18/88)

In article <4972@well.UUCP>  "Leo 'Bols Ewhac' Schwab" writes:

>
>>  I'll be using a simple spite for the ball.  Is there anything
>>    I should know in advance about sprite/sprite-bugs?
>>
>	Due to a bug in 1.0/1.1, which had to be preserved to prevent
>breaking anything, sprites are exactly one pixel off on the X axis.  You'll
>have to correct for this internally.
>

    Can you clarify this?  Is the off the X axis to the left or right.
(ie. does a position of 100 map as 101 or 99?).  I suspect the sprites
are moved to the right (looking at it from outside the monitor :-), but
just to be sure...

ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) (01/21/88)

In article <2544@cup.portal.com> Chad_The-Walrus_Netzer@cup.portal.com writes:
>In article <4972@well.UUCP>  "Leo 'Bols Ewhac' Schwab" writes:
>>>  I'll be using a simple spite for the ball.  Is there anything
>>>    I should know in advance about sprite/sprite-bugs?
>>>
>>	Due to a bug in 1.0/1.1, which had to be preserved to prevent
>>breaking anything, sprites are exactly one pixel off on the X axis.  You'll
>>have to correct for this internally.
>>
>    Can you clarify this?  Is the off the X axis to the left or right.
>(ie. does a position of 100 map as 101 or 99?).  I suspect the sprites
>are moved to the right (looking at it from outside the monitor :-), but
>just to be sure...

	You are correct.  A supplied X coordinate of N will cause the sprite
to appear at N+1.

	Someone earlier suggested that C-A create two new functions that
work correctly, but keep the old ones around so that old programs would
work.  I made this very suggestion a long time ago, and the AmiGuys had
already thought of it, and discarded it due to the way MoveSprite() and
ChangeSprite() are implemented internally.  Something about internal calls
and data sharing between the two routines.

	From what they said, MoveSprite() is internally implemented as
follows:

MoveSprite (vp, spr, x, y);
struct ViewPort *vp;
struct SimpleSprite *spr;
long x, y;
{
	spr -> x = x;
	spr -> y = y;
	internalChangeSprite (vp, spr, spr -> posctldata);
}

	Trivium:  Did you know that if you continue to increase the X and Y
coordinates of a sprite, it will wrap the screen?

_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
Leo L. Schwab -- The Guy in The Cape	ihnp4!ptsfa -\
 \_ -_		Recumbent Bikes:	      dual ---> !{well,unicom}!ewhac
O----^o	      The Only Way To Fly.	      hplabs / (pronounced "AE-wack")
"Simplicity and clarity should be your theme in dress."
		-- A fortune cookie I got in LA's Atomic Cafe.