Re: A82: RE: Greyscale


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

Re: A82: RE: Greyscale




Actually, I started writing a standard 8x8 greyscale sprite routine last
night. It would have been finished, except I got side tracked with a
separate sprite routine I also almost finished writing. The
second routine works along the same lines as any regular sprite
function (ie. of the form, draw sprite with data at (de) at
screen coords (b,c)), except its broken up into separate modules 
which individually handle aspects of the calculation. This means 
that after "initialising" a sprite, the byte it starts in is
stored in mem, and is shifted accordingly, so that if you need
to draw it multiple times you don't need to constantly recalc
those things. There are also separate routines to move the
sprite in any of the four main directions by updating the
precalculated data efficiently.
Hopefully, I'll have both sprite routines done by tonight, in a reasonably
efficient form. 
So far, in my unfinished gs games, all I've done is used a regular sprite
routine twice, but that's not really good enough for a release version, so
the new routines would have to be written anyway.
The other thing I might start writing soon (just thought of it on the way
to this comp. lab.) is an anti-aliased version of the line routine, using
greyscale. From what I can remember of the details of the function (I
wrote it about four months ago), it shouldn't be too much of a problem, at
little extra cost.

-Jeremy


On Wed, 4 Aug 1999, Erik Larsson wrote:

> 
> Thanks for those kind, guiding words. Of course I could implement the 
> interrupt routine, the problem is, as you say yourself, to implement an 
> optimized sprite routine for greyscale. It would be very nice if you could 
> produce that, or copy-paste it from one of your gs-games.
> 
> TIA,
> 
> Erik
> 
> Your message:
> I kind of assume that anybody who'd have the ability to write an asm game
> for the 82 would be able to easily "figure out" how to use the interrupt
> routine. After all, it's simply a matter of:a) including the file in your 
> source
> b) calling the install function
> c) writing to areas in memory designated as _pic1 and _pic2 (point your
> functions to one of these bitplanes instead of the standard GRAPH_MEM)
> d) waiting a split second for the interrupt to update the screen with
> fresh greyscale goodness
> If you'd like, I can write a sprite routine or something (and optimize it
> for writing two sprites at the same offset from the start of a bitplane at
> once), but I doubt I'd have time to crank out a whole game at this time,
> simple or otherwise.-Jeremy
> 
> 
> ______________________________________________________
> Get Your Private, Free Email at http://www.hotmail.com
> 



References: