Re: A89: Re: Making a faster map routine(round #2)
[Prev][Next][Index][Thread]
Re: A89: Re: Making a faster map routine(round #2)
I have tried doing this and am getting nowhere. Could
somebody make a small example that shows how to do
this with one plane and one sprite repeated over the
screen? Thanks
> Well, say you have 16x16-pixel sized sprites and
> want to plot them on the entire
> LCD (i.e. no status bar)...
>
> FIrst, create a buffer that's 32 bytes by 144 rows
> big.
>
> Now say you have an (x,y) that's your upper left
> corner of the map part you want
> to plot, in the form of (16*x0 + x1, 16*y0 + y1),
> where (x0,y0) are the "tile"
> coordinates and (x1,y1) are the "in-a-tile"
> coordinates for sub-tile accuracy :)
>
> Using (x0,y0) to determine the tile that will be
> (partly) in the upper left
> corner of the LCD, plot the desired part of the map
> into the buffer (putting a
> 16x16 sprite on a word-aligned place in that buffer
> is easy, so I won't go into
> that here). You will plot one tile row too much on
> the right and bottom edge of
> the buffer.
>
> Now, using (x1,y1), you copy the buffer onto the
> LCD, starting at row y1 in the
> buffer and shifting everything x1 steps to the left
> as you go. This part is
> basically how a sprite plotter works, but if you
> want speed you should write a
> routine that's specialized for this task.
>
>
> / Niklas Brunlid
> Check out Prosit for the TI-89 / TI-92+ at
> http://prosit.ticalc.org
> Random PQF Quote follows:
>
> When the least they could do to you was everything,
> then the most
> they could do to you suddenly held no terror.
> -- (Terry Pratchett, Small Gods)
>
>
>
>
=====
Visit my website, Some Assembly Required, at
http://meltingpot.fortunecity.com/gilford/908
For the best of japanese programs and news on
my rpg, Brave Warrior Itami.
__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com