[A83] Re: Help again...


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

[A83] Re: Help again...




> 1) How to save and recall the contents of the screen or buffer.

 ld hl,memory_to_save
 ld de,memory_to_save_to
 ld bc,number_of_bytes_to_save
 ldir

In other words, ldir copies a chunk of memory from hl to de that is bc bytes
in size.  Get it?  Got it?  Good.

> 2) How to draw a 5x8 sprite directly to the LCD instead of the buffer.

I'm assuming you mean wxh, but either is simple.  If you mean 5 bytes high,
then very simple.  Change the routine to only loop five times instead of
eight.  If you mean width, then it's fairly simple as well.  It depends on
the exact type of sprite routine you are using, but generally you don't have
to do anything special.  Just draw it.  In Zelda 86, there are many sprites
that don't take up the full 8x8 size, but are drawn as normal 8x8 sprites
anyway.  The empty space is clear, because the routine is masked.  Now, if
you have an umasked 8x8 routine that actually draws the empty space, then
you'll need a special masking step to account for the smaller size of the
sprite.  But usually it's easier to just do it the other way and not worry
about it (unless your entire game has odd sprite sizes, like Repton or
Bomber Bloke).






References: