Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Raylin on April 21, 2010, 01:56:46 pm

Title: DispGraph(r) and greyscale?
Post by: Raylin on April 21, 2010, 01:56:46 pm
Could I possibly have an example on how to use this correctly?
Title: Re: DispGraph(r) and greyscale?
Post by: SirCmpwn on April 21, 2010, 07:23:54 pm
/me goes to experiment with it
Title: Re: DispGraph(r) and greyscale?
Post by: Quigibo on April 21, 2010, 07:27:32 pm
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.
Title: Re: DispGraph(r) and greyscale?
Post by: SirCmpwn on April 21, 2010, 09:17:14 pm
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
Title: Re: DispGraph(r) and greyscale?
Post by: Quigibo on April 21, 2010, 09:50:55 pm
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.
Title: Re: DispGraph(r) and greyscale?
Post by: SirCmpwn on April 21, 2010, 09:51:59 pm
Hooray!  Okay.  I just like making stuff work for the sake of making it work, like MirageOS and full screen pictures ;)
Title: Re: DispGraph(r) and greyscale?
Post by: DJ Omnimaga on April 21, 2010, 11:59:27 pm
That looks quite nice. I can't wait to see the other grayscale commands.
Title: Re: DispGraph(r) and greyscale?
Post by: DJ Omnimaga on April 28, 2010, 10:32:40 pm
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.
Title: Re: DispGraph(r) and greyscale?
Post by: Quigibo on April 28, 2010, 10:40:56 pm
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.
Title: Re: DispGraph(r) and greyscale?
Post by: DJ Omnimaga on April 28, 2010, 10:43:06 pm
great to hear!

And yes this will come very handy :)