Author Topic: How does 4-level greyscale work in Axe?  (Read 8442 times)

0 Members and 1 Guest are viewing this topic.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8206
  • Rating: +758/-15
  • Yes.
    • View Profile
    • ClrHome
Re: How does 4-level greyscale work in Axe?
« Reply #30 on: June 06, 2010, 10:16:10 pm »
Drawing Sprite A...
Over WhiteOver BlackOver Sprite B
Pt-OnABlackA OR B
Pt-ChangeAA InvertA XOR B
Pt-OffAAA

Also, xoring twice is the same as removing since (A xor B) xor B = A

So Pt-Off is the same as clearing an 8x8 square first, then drawing the sprite?




Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: How does 4-level greyscale work in Axe?
« Reply #31 on: June 06, 2010, 10:47:27 pm »
yes, that is right exactly. If you want more control over what is cleared, use masking.
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline xlibman

  • Now active at https://codewalr.us
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55812
  • Rating: +3149/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • CodeWalrus
Re: How does 4-level greyscale work in Axe?
« Reply #32 on: June 06, 2010, 10:47:39 pm »
yep, it erases a 8x8 square then draws a sprite.

I wonder if it's slower than Pt-On? I mean, for example, would ClrDraw then Pt-On('ing 96 sprites be faster than Pt-Off('ing 96 sprites? (assuming they need to be displayed every frame)
In case you are wondering where I went, I left Omni back in 2015 to form CodeWalrus due to various reasons explained back then, but I stopped calc dev in 2016 and am now mostly active on the CW Discord server at https://discord.gg/cuZcfcF


Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2895
  • Rating: +466/-17
    • View Profile
    • TI-Boy CE
Re: How does 4-level greyscale work in Axe?
« Reply #33 on: June 06, 2010, 10:53:51 pm »
yep, it erases a 8x8 square then draws a sprite.

I wonder if it's slower than Pt-On? I mean, for example, would ClrDraw then Pt-On('ing 96 sprites be faster than Pt-Off('ing 96 sprites? (assuming they need to be displayed every frame)
I think if the sprite is aligned, Pt-Off would be faster. If unaligned, Pt-On would be faster.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: How does 4-level greyscale work in Axe?
« Reply #34 on: June 06, 2010, 10:55:01 pm »
I would think it would be slower, for while ClrDraw is just a single event, it happens for each Pt-Off, with the added fun of sprite drawing. I'd test it to make sure though. (Use an 84+(SE) and a BASIC program enveloping it)
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.