Omnimaga

Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: willrandship on January 07, 2011, 10:54:09 am

Title: Idea for Axiom, transparent, black and white
Post by: willrandship on January 07, 2011, 10:54:09 am
So here's the idea:

Pt-Off clears an 8x8 area, and draws to the screen.
Pt-On only draws over what's there.

Neither way really lets you draw something without a box around it, but that has white inside of it. For instance, a Character on an RPG with a Black outline, but white inside. If you could have a value for transparent pixels (probably by using nybbles, or just 4 bits per 2 Pixels) Then the (other, not changing pt-off and pt-on) command would draw a sprite to the screen, erasing where a "White" pixel is, but leaving transparent marked pixels alone. Also, when using both buffers with B/W, Transparent should let the backbuffer through, but White shouldn't (I.E. A cursor)

What do you think?
Title: Re: Idea for Axiom, transparent, black and white
Post by: Hot_Dog on January 07, 2011, 11:21:14 am
Do you know how to use Pt-Mask / Plot1() from the .html list of Axe Commands?  That might be what you're looking for
Title: Re: Idea for Axiom, transparent, black and white
Post by: Ashbad on January 07, 2011, 01:15:27 pm
yeah that's what pt-mask does, I use it quite a bit, very helpful ;)

and pt-on doesn't draw a box around it, it actually OR's it to the screen (draws only the black parts) to the buffer, and pt-off XOR's it (basically, kinda like inverting it onto the screen kinda sorta)
Title: Re: Idea for Axiom, transparent, black and white
Post by: FinaleTI on January 07, 2011, 02:50:46 pm
yeah that's what pt-mask does, I use it quite a bit, very helpful ;)

and pt-on doesn't draw a box around it, it actually OR's it to the screen (draws only the black parts) to the buffer, and pt-off XOR's it (basically, kinda like inverting it onto the screen kinda sorta)
Pt-Change() XOR's and Pt-Off uses overwrite logic, erasing the are behind the sprite in addition to drawing the sprite.
Title: Re: Idea for Axiom, transparent, black and white
Post by: willrandship on January 07, 2011, 09:02:35 pm
Umm, I didn't say anything about a boxfrom Pt-on. You just can't have any white inside of it.

But anyways, that's sort of what I had in mind. Does it act like Pt-On (just drawing over it) or Pt-Off? (Where it erases a square in the buffer)

My end goal was basically to be able to leave the backbuffer alone, while the front render can show objects with white pixels, even if the backbuffer has a black pixel there.
Title: Re: Idea for Axiom, transparent, black and white
Post by: SirCmpwn on January 07, 2011, 10:55:15 pm
What I do to achieve this (masked sprites) is to have two sprites.  One is white where the sprite is transparent, and black where it is opaque (sprite 1).  Then, I have another sprite whose white pixels are disregarded, and whose black pixels correspond to white pixels in the masked sprite (sprite 2).  Then, I Pt-On( sprite 1 and Pt-Change( sprite 2 in the same place, in that order.
Title: Re: Idea for Axiom, transparent, black and white
Post by: DJ Omnimaga on January 08, 2011, 09:16:18 pm
SirCmpwn doesn't your sprite 2 also need to be inverted too? Else, I think you also have to Pt-Change sprite 1 after displaying Sprite 2, making it a bit slower.