Re: How did sprite masking work?

From Bt Garner <xxxxxx@joyce.eng.yale.edu>
Date
(please re-direct follow ups to the tghack-list, as this topic
is much more appropriate for that forum)
 
@> Anyway, I think I can see the trick he's talking about being used in games
@> like Ys 4.  In the MagicEngine emulator, switching off the background plane
@> allows you to see weird black sprites covering the parts of the screen where
@> the background ordinarily 'covers' the character sprite.
Using HuC/PCEas, it's not a trick at all.  When you define a 
sprite, you can set its priority (either 0 or 1).  If it is 1, then 
the sprite is "on top" of the background layer; if it is 0 then it is 
behind it.  The exception to this is that if a sprite is set to
prio 0, then it will show through on palette entry 0 for the 
background (similar to how palette entry 0 is transparent for
the sprite)

The other way to do this is to simply "mask" part of the background 
with another sprite, that the first will move behind.

Easily done with the PCE.

-bt