Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: boathouse2112 on August 02, 2012, 11:41:25 am

Title: Axe r command
Post by: boathouse2112 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?
Title: Re: Axe r command
Post by: calc84maniac 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.
Title: Re: Axe r command
Post by: Sorunome 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:
Title: Re: Axe r command
Post by: boathouse2112 on August 02, 2012, 11:48:08 am
Thanks for the answer. The code was copypasta from a tutorial.
Title: Re: Axe r command
Post by: Deep Toaster 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.
Title: Re: Axe r command
Post by: Sorunome 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