Log In  

Hey @zep,

So we've discovered that 0x5f5e is a destination write mask if it's between 1 and 15, such that the write is now presumably something like this:

dest = (dest & ~writemask) | (color & writemask)

It'd be really great if the top four bits of 0x5f5e were a read mask, allowing us to select bitplanes from source pixels/colors:

dest = (dest & ~writemask) | (color & writemask & readmask)

This would be nice for packing fonts and such. It's already doable with pal(), that's true, but you have to set the entire palette to make it work, whereas you could set just the relevant colors with a read mask. Like, if you have a 1-bit font encoded into four layers, and you're picking the second layer, you'd only need to set pal(2,col) to make it work, instead of all 16.

P#76045 2020-05-07 14:00

I second the motion!

I've been working on layering lower bit-depth sprites, and any features that would make this easier would be appreciated.

P#76053 2020-05-07 14:17
:: Felice

Woo, already in 0.2.0h.

@zep rocks!

P#76085 2020-05-07 18:46

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2021-01-20 10:57 | 0.015s | 2097k | Q:16