Right combination of INK, PAPER, attr_mask?

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
jordi
Member
Posts: 61
Joined: Sun Oct 28, 2018 3:35 pm

Right combination of INK, PAPER, attr_mask?

Post by jordi »

Hi I want to produce this effect when hovering over an opened window in a masked sprite:
masked.png
I've tried SP1_AMASK_TRANS and SP1_AMASK_INK for attr_mask property in the sprite:

Code: Select all

  
  c->attr_mask = SP1_AMASK_INK;
  c->attr      = INK_BLACK;
And also tried for Window UDG:
PAPER_BLACK | INK_WHITE
or just
PAPER_BLACK

How I could get such effect? Maybe inverting UDG to set INK instead of paper?

Lot of thanks.
You do not have the required permissions to view the files attached to this post.
jordi
Member
Posts: 61
Joined: Sun Oct 28, 2018 3:35 pm

Re: Right combination of INK, PAPER, attr_mask?

Post by jordi »

GOT IT! Inverting UDG.
Timmy
Well known member
Posts: 392
Joined: Sat Mar 10, 2012 4:18 pm

Re: Right combination of INK, PAPER, attr_mask?

Post by Timmy »

So glad I didn't had to answer, but just in case:

The Spectrum is a different kind of machine, and in this case you need to invert the colours on the black windows. And that's all you need to do here. Because otherwise you can't draw masks on empty windows.

On other machines, you might have to draw a new sprite that has the shadow, but fortunately not on the Spectrum. :)
Post Reply