~rabbits/uxn

1

How do you clear 2bpp sprites?

Details
Message ID
<CAAxjOKn2S5Ni=dafO283tocBmhjy=wLcidEKZAMJA9yPLgRudw@mail.gmail.com>
DKIM signature
missing
Download raw message
Hi, I only just started out and was following day 6 of the uxn
tutorial and I noticed that when .Screen/sprite is set to 0x80 (or
0xC0) only colors 0 and 1 get cleared, ignoring color 2 and 3. Is this
intentional?
Details
Message ID
<ba12793d674b591990a6a092b04df384@posteo.net>
In-Reply-To
<CAAxjOKn2S5Ni=dafO283tocBmhjy=wLcidEKZAMJA9yPLgRudw@mail.gmail.com> (view parent)
DKIM signature
missing
Download raw message
> Hi, I only just started out and was following day 6 of the uxn
> tutorial and I noticed that when .Screen/sprite is set to 0x80 (or
> 0xC0) only colors 0 and 1 get cleared, ignoring color 2 and 3. Is this
> intentional?

I need to update the tutorial, sorry about that!
Here are a couple of links that talk about the current behaviour (and 
that'll inform the update to the tutorial and ebook)

* Blend mode 0 
<https://lists.sr.ht/~rabbits/uxn/%3C692CA0D5-0200-408D-9357-BF0D8887D2BF%40noyu.me%3E>
* Massive tiny change coming to Varvara's Screen device  
https://lists.sr.ht/~rabbits/uxn/%3CCAE2DaSQuj%3DC8e7ofV3+4H6MaTOhtD_wrFWihhYtCuYiEVtV6WQ%40mail.gmail.com%3E

Quoting from there, if I understand correctly, this is what you have to 
do now:

 From Blend mode 0:
> ;empty-icn .Screen/addr DEO2
> #00 .Screen/color DEO BRK
> @empty-icn ff ff ff ff ff ff ff ff

 From Massive tiny change [...]:
> This will allow to make full use of the color0, and also mask by
erasing only certain parts of a sprite, which is very nice. If you'd
like to recreate the previous behavior, set a ff ff ff ff ff ff ff ff
tile to the address, and then [ LIT2 00 -Screen/sprite ] DEO

(the - rune is another thing not in the tutorial yet; it corresponds to 
a raw zero-page address (i.e. without a "LIT" before, see 
<https://wiki.xxiivv.com/site/uxntal>))

I hope this helps!
Reply to thread Export thread (mbox)