Re: A89: Run Down on some Things
[Prev][Next][Index][Thread]
Re: A89: Run Down on some Things
You use a mask to get rid of certain bits; for instance, if you only want
the bottom four bits of the byte in d0, you would use a mask of %1111 and
AND it with d0 like this:
and.b #%1111,d0
if d0.b was %10101101 it is now %00001101
so, %1111 is what's called the bitmask
The same idea is applied to sprites, so that for each byte of the sprite,
you are going to also have a bitmask that corresponds to what bits you want
to keep in the sprite (a bit that's set in the mask will indicate that the
same bit in the sprite is part of the sprite and not just transparent).
This way, if you have part of a sprite that looks like this: %00100100 with
a corresponding mask looking like this: %00111100 then you will have the
first two bits and last two bits as transparent, the third and sixth bits as
black and the middle two bits as white.
The sprite routine will only preserve the white bits of the sprite if those
bits are set in the mask.
>
>Could someone please explain to me what 'masking' is again?
>
>Thanks a bunch.
>
>
>
>
>---Daniel7073@aol.com wrote:
>>
>>
>> In a message dated 12/7/98 5:20:39 PM Pacific Standard Time,
>> m_rayman@bigfoot.com writes:
>>
>> << If you could implement it, could you please add greyscale and
>masking info
>> with your IDE?>>
>>
>> I'm planning to include this.
>>
>> <<This IDE will have color coding, right? Kinda like Borland C++
>or Visual
>> C++? Ops will be one
>> color, labels another, registers another...>>
>> That will be there too.
>>
>> <<Oh, and it's gotta be customizable, but you can work on that in
>later
>> versions. =)
>>
>> -Miles Raymond >>
>>
>> Maybe for version 2.0. I might put it in 1.0, but only if it's easy
>to put
>> in. The first version will have some customization, like choice of
>compiler
>> and linker, and choice of color for color coding.
>>
>> Daniel Imfeld
>>
>
>==
>+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
>| Jeremy Moore |
>| senoramor@yahoo.com |
>| ICQ: #18766049 |
>| http://fly.to/favelinks |
>+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
>"Did somebody say McDonald's?" NO! No one said it! Sheesh!
>_________________________________________________________
>DO YOU YAHOO!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>