Author Topic: Axe r command  (Read 7258 times)

0 Members and 1 Guest are viewing this topic.

Offline boathouse2112

  • LV2 Member (Next: 40)
  • **
  • Posts: 23
  • Rating: +0/-0
    • View Profile
Axe r command
« on: August 02, 2012, 11:41:25 am »
In a few programs, like this greyscale snippet:
Code: [Select]
[ffff0000ff00ff00]->Pic1F
[ff00ffff00ff00ff]->Pic1B
[ffffffff00000000]->Pic2F
[ffffff00ffff0000]->Pic2B
ClrDraw
ClrDrawr
repeat getkey(15)
Pt-Off(0,0,Pic1F)
Pt-Off(0,0,Pic1B)r
DispGraphrr
Pt-Off(0,0,Pic2F)
Pt-Off(0,0,Pic2B)r
DispGraphrr
End
there's a command "r" following some of the parentheses. I tried looking it up in the documentation, but can't find anything on it. Any help as to what it is?

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Axe r command
« Reply #1 on: August 02, 2012, 11:43:26 am »
The "r" suffix (which is the radian symbol from the ANGLE menu) is typically used to denote an alternate version of a command. In the case of graphics commands, usually it means that it should be drawn to the second buffer, or "backbuffer". Grayscale uses the main buffer and the backbuffer together to create the full 4-level image.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Axe r command
« Reply #2 on: August 02, 2012, 11:44:31 am »
First of all, it is the radian r.
Second, used behind something drawing thingy (like pt-off) it tells it to draw it to backup-buffer, and you need DispGraphrr instead of DispGraph for 4-level greyscale.
DispGraphrr must be called very often otherwise it won't appear as greyscale

You could also optimize that code :P
Spoiler For Spoiler:
Code: [Select]
[ffff0000ff00ff00]->Pic1F
[ff00ffff00ff00ff]->Pic1B
[ffffffff00000000]->Pic2F
[ffffff00ffff0000]->Pic2B
ClrDraw
ClrDrawr
Pt-Off(0,0,Pic1F)
Pt-Off(0,0,Pic1B)r
Pt-Off(0,0,Pic2F)
Pt-Off(0,0,Pic2B)r
repeat getkey(15)
DispGraphrr
End
EDIT: y u ninja me calc84maniac D:
« Last Edit: August 02, 2012, 11:45:06 am by Sorunome »

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline boathouse2112

  • LV2 Member (Next: 40)
  • **
  • Posts: 23
  • Rating: +0/-0
    • View Profile
Re: Axe r command
« Reply #3 on: August 02, 2012, 11:48:08 am »
Thanks for the answer. The code was copypasta from a tutorial.

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: Axe r command
« Reply #4 on: August 02, 2012, 11:48:21 am »
If you look in Commands.html (it's got all the Axe commands documented), you'll see the commands that have a radian r suffix. It'll tell you what it does to the command.




Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Axe r command
« Reply #5 on: August 02, 2012, 11:48:41 am »
Oh, lol
Then the tutorial isn't good :P

EDIT: forget my 'optimization', i didn't look at the possition of the sprites, lol
« Last Edit: August 02, 2012, 11:51:12 am by Sorunome »

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!