Re: A85: FIND_PIXEL


[Prev][Next][Index][Thread]

Re: A85: FIND_PIXEL



PutSprite has to do that because it calls FIND_PIXEL when it starts
out.  Try writing $FF to $FC00.  You'll see that it is in the top left
corner.  I think the programmers were drunk or something when they wrote
the FIND_PIXEL routine. <j/k>  Actually, I think they wrote it like they
did because that is the "correct" way to do it, and it is easier to do
graphing calculations if you don't have to flip over the coordinate
system.

Michael Pearce wrote:
> 
> I don't think that is correct.  I know in PutSprite, it has some lines
> of code to the effect of:
> ld a,63
> sub c
> ld c,a
> This is to reverse the origin from the bottom left to the top left.  I
> think the top left corner is most commonly used as the origin since
> this is the way it is done on the PC (i think).
> 
> -mike pearce
> 
> >Actually subtract 16 to go up one row, add 16 to go down a row. The
> memory
> >goes from top to bottom which is why most sprite routines use an
> origin in
> >the top left corner. And don't forget to use
> >
> >       ld      de,$fc00
> >       add     hl,de
> >after calling FIND_PIXEL.
> >
> 
> <cut>
> 
> >--
> >Terry Peng
> >email- tpeng@geocities.com
> >web-   http://www.geocities.com/SiliconValley/Bay/5104/index.html
> >

-- 
Ben Shakal
shakalb98@jhs.net
Quote of the Month:
"Common sense is the collection of prejudices acquired by age 18."
                                                - Albert Einstein


Follow-Ups: References: