Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: LincolnB on February 01, 2012, 04:53:40 pm
-
For the longest time, I have wondered about Pt-Mask and how the heck to use it effectively, but after an IRC discussion with Runer112, I think I have it!
I hope this clears up something for someone else who might been in the same position I was.
Runer112 Pt-On() has two colors
Runer112 black and trasnparent
Runer112 Pt-Off() has two colors
Runer112 black and white
Runer112 Pt-Mask() has 4 colors
Runer112 transparent, white, gray, and black
Runer112 Pt-Mask()r has 3 colors (and a sort of color)
Runer112 transparent, white, black, and xor
Runer112 I don't know if I have any example sprites around here...
Runer112 but let's just do something simple
buttsfredkin k
Runer112 [00000000FFFFFFFF][0000FFFF0000FFFF]
buttsfredkin right
Runer112 that would draw a sprite
Runer112 first two rows are transparent
Runer112 next two rows are white
Runer112 next two are gray
Runer112 and last two are black
buttsfredkin so correct me if I'm wrong here
buttsfredkin 00 = transparent
buttsfredkin 01 = white
buttsfredkin 10 = gray
buttsfredkin 11 = black
buttsfredkin ?
Runer112 yup, that's how Pt-Mask() works
Runer112 and it draws it all in one call
buttsfredkin and you give it a single pointer to a 16 byte sprite?
Runer112 instead of having to do two separate calls for drawing a normal grayscale sprite
Runer112 yup
Runer112 and that 16-byte sprite should be formatted as 2 8-byte sprites
buttsfredkin right
buttsfredkin what about Pt-Mask()r?
Runer112 although r normally denotes back buffer/grayscale
Runer112 in this case it means the opposite
Runer112 only because Pt-Mask() was added first
Runer112 so that works a lot like Pt-Mask() without the r
buttsfredkin alright
Runer112 except it only draws to the main screen buffer, so only for black and white
Runer112 00 = transparent
Runer112 01 = black
Runer112 10 = white
Runer112 11 = xor
-
I think squidgetx made a bunch of Pt-Mask spriters somewhere. I've never used them (though I probably should, since it takes a tremendous amount of time to do it by hand), but I guess they should be useful.
-
For Pt-Mask()r, actually:
00 = transparent
01 = white
10 = xor
11 = black
-
Oh... Perhaps you should change the commands list description of Pt-Mask()r then:
"Areas clear on both layers are transparent and the other combinations are black, white, and invert."
That says to me that 00 is transparent, and then the logical conclusion is that the other combinations are listed in ascending order.
-
I think squidgetx made a bunch of Pt-Mask spriters somewhere. I've never used them (though I probably should, since it takes a tremendous amount of time to do it by hand), but I guess they should be useful.
These can be found in the Ash:Phoenix subforum in this thread (http://ourl.ca/7776) and are actually pretty useful if i do say so myself
Note that i made them a very very long time ago and as a result they are very crude. Some of the larger size ones like 24x24 require you to have free RAM or something. Don't look at the source, I'll be embarrassed XD
-
Oh... Perhaps you should change the commands list description of Pt-Mask()r then:
"Areas clear on both layers are transparent and the other combinations are black, white, and invert."
That says to me that 00 is transparent, and then the logical conclusion is that the other combinations are listed in ascending order.
Yeah, maybe. I just put them in an arbitrary order because I though since I had said it was masked, the masking combinations would just be regular masking (00 01 and 11) with the extra combination an invert. I guess I'll change the order I show in the commands list, but its hardly more logical. Just because you were thinking of binary ascending order, doesn't mean someone else will.
-
No, I think it is more logical. I considered that to be the order... I don't know that I ever used the Pt-Mask()r command though, so I wouldn't have figured it out.