Author Topic: DispGraph(r) and greyscale?  (Read 4828 times)

0 Members and 1 Guest are viewing this topic.

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
DispGraph(r) and greyscale?
« on: April 21, 2010, 01:56:46 pm »
Could I possibly have an example on how to use this correctly?
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







SirCmpwn

  • Guest
Re: DispGraph(r) and greyscale?
« Reply #1 on: April 21, 2010, 07:23:54 pm »
* SirCmpwn goes to experiment with it

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: DispGraph(r) and greyscale?
« Reply #2 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.
« Last Edit: April 21, 2010, 07:29:03 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

SirCmpwn

  • Guest
Re: DispGraph(r) and greyscale?
« Reply #3 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
« Last Edit: April 21, 2010, 09:48:09 pm by SirCmpwn »

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: DispGraph(r) and greyscale?
« Reply #4 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.
« Last Edit: April 21, 2010, 09:51:18 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

SirCmpwn

  • Guest
Re: DispGraph(r) and greyscale?
« Reply #5 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 ;)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: DispGraph(r) and greyscale?
« Reply #6 on: April 21, 2010, 11:59:27 pm »
That looks quite nice. I can't wait to see the other grayscale commands.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: DispGraph(r) and greyscale?
« Reply #7 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.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: DispGraph(r) and greyscale?
« Reply #8 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.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: DispGraph(r) and greyscale?
« Reply #9 on: April 28, 2010, 10:43:06 pm »
great to hear!

And yes this will come very handy :)