Re: A89: Run Down on some Things
[Prev][Next][Index][Thread]
Re: A89: Run Down on some Things
I had been working on a different version of masking. It works like
this: transparent bits in the mask are 1's and the mask is integrated
into the sprite. Any bit that is 0 in the mask will preserve the
sprite's data there.
mask: 11000001
sprite: 00110100
mask: ...
sprite: ...
mask: ...
sprite: ...
The mask is AND'ed with the area where the sprite byte will be loaded,
and then the sprite is OR'ed with that. After the mask is applied the 1,
2, 3, 4, and 5 bits are clear and will be set when the sprite is OR'ed
with it. The 6, and 7 bits are transparent. The mask is integrated into
the sprite so that only one register need keep track of the address.
Justin Bosch
justin-b@juno.com
On Tue, 8 Dec 1998 02:05:50 -0500 "Dux Gregis" <assets@eden.rutgers.edu>
writes:
>
>
>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
>>
>
>
___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com/getjuno.html
or call Juno at (800) 654-JUNO [654-5866]
References: