Hi!
>>>> 1) new pixels = (old pixels & mask1) | (new pixels & mask2)
>>>> Where mask1 and mask2 are the negated forms of each other.
>> That one only works for boolean masks, but it works on 386.
> By boolean mask, do you mean something like all 1s over the colors for
> opaque and all 0s for transparent? The way I've got it now is just 1 bit
> in the color byte represents opacity. It's either opaque or transparent,
> and then the remaining bits are for colors.
Actually one BYTE, either 0xff or 0x00, otherwise the mask
thing does not work. I know that this wastes RAM, but it
makes the computations faster to have the opacity boolean
the same size as the pixel data which is 1 byte per pixel
in your MCGA scenario. You can also have a run length code
for storing the opacity masks in a small way on disk and
then dynamically decide whether you want run length based,
per-4-pixel, per-2-pixel or per-pixel computations etc.
There are always many ways, depending on the scenario :-)
Eric
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel