Hayleia recently posted this:
http://ourl.ca/17145It got me thinking: how do I make a "more precise" method for greyscale and I came up with a semi-solution (no interrupts necessary!)
This is a calibration screen. At the end it prints the number to put in A, which is a semi-timer variable.
When I say semi, that means that the ability to do this has completely to do with the time the program takes to run (A is about 12 on my calc, but about 150 or 75 is needed for wabbit in my case.)
This works with 3 and 4 level grayscale, as shown with my screenie.
Without further ado: my code!
.AA
12->A
0->C
0->B
[FFFFFFFFFFFFFFFF]->Pic1
ClrDraw(rr)
For(X,0,11)
For(Y,0,7)
Pt-On(X*8,Y*8,Pic1)(r)
End
End
Repeat (getKey(54))
If (getKey)
Pause 250
End
getKey(4)-getKey(1)->B
A+B->A
If (A=0)
255->A
End
If (A=256)
1->A
End
C++
If (C->A)
DispGraph(r)
0->C
End
End
DispGraphClrDraw(rr)
ClrHome
Output(0,0,A>Dec)
Repeat (getKey(15))
End
The "sweet spot" A depends on the calculator and how quickly the program loops in its normal state, as well as how often you need to refresh the screen.
Possible use: pic viewers
Maybe possible use: non-action games (like chess)
Not possible use: action games
I hope this is helpful!