Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Raylin on April 21, 2010, 01:56:46 pm
-
Could I possibly have an example on how to use this correctly?
-
/me goes to experiment with it
-
If your background is in Pic1, then just draw it to the backbuffer:
[Pic1]->Pic1
det(12)
conj(Pic1,L3,768)
It will appear gray behind your foreground. I haven't really added any grayscale drawing yet, so there is very limited usability right now. But I'm sure you can do tricks with exchanging the buffers.
-
Well, after experimentation, I was able to draw sprites in grayscale. What I did was this (in my main loop):
Repeat getKey(15)
ClrDraw
[Draw all your grey sprites here]
Pt-On(0,0,Pic1
StorePic
ClrDraw
[Draw all your black sprites here]
Pt-On(8,0,Pic1
DispGraphr
End
*Edit*
Attached screenshot
-
Exactly. That's what I was thinking of.
But don't get too used to it, there will be much easier and faster ways to do grayscale in the future.
-
Hooray! Okay. I just like making stuff work for the sake of making it work, like MirageOS and full screen pictures ;)
-
That looks quite nice. I can't wait to see the other grayscale commands.
-
I kinda like how that command works. I hope in future builds of Axe, that if you add a new GS command that you also keep this one too, since some ppl may want to be able to do stuff manually easier. At first i was confused how it worked, but i got it after trying it out.
-
Yeah, this one stays. What the new grayscale commands will do is mainly for sprite and pixel routines. Those routines will draw to one or both buffers at the same time so you can have grayscale sprites/draw grayscale pixels.
-
great to hear!
And yes this will come very handy :)