Author Topic: Pt-Mask  (Read 4821 times)

0 Members and 1 Guest are viewing this topic.

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Pt-Mask
« 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
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Pt-Mask
« Reply #1 on: February 04, 2012, 11:53:17 pm »
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.




Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Pt-Mask
« Reply #2 on: February 05, 2012, 06:07:03 am »
For Pt-Mask()r, actually:

00 = transparent
01 = white
10 = xor
11 = black
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Pt-Mask
« Reply #3 on: February 05, 2012, 10:59:59 am »
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.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Pt-Mask
« Reply #4 on: February 05, 2012, 03:31:24 pm »
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 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

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Pt-Mask
« Reply #5 on: February 05, 2012, 03:46:21 pm »
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.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline ZippyDee

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +83/-8
  • Why not zoidberg?
    • View Profile
Re: Pt-Mask
« Reply #6 on: February 05, 2012, 04:32:47 pm »
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.
There's something about Tuesday...


Pushpins 'n' stuff...