Re: TIB: GetKey
[Prev][Next][Index][Thread]
Re: TIB: GetKey
I am posting my Getkey routine for everyone again, hopefully, this time
it will be easier to read...
10->A \
10->B *** Sets the starting cordinants
ClrDraw *** Clears the screen
Lbl T *** Defines the start of the loop
Repeat Ans *** Starts the Main loop (use Repeat its faster)
Getkey *** Gathers keypress
End *** Checks for keypress
If Ans>25 *** Determines which secondary loop to use
Goto B *** If Last line true, then shuttles to loop
If Ans==24 *** Start of secondary loop
then *** If last line true, then executes command
B-1->B *** Command
Else *** If test (If Ans==24) is false, then executes
A-1->A *** Command
End *** Ends secondary loop
Pxlon(A,B *** updates graph
GotoT *** Returns to Main loop
Lbl B *** Defines the start of the loop
If Ans==26 *** Start of secondary loop
Then *** If last line true, then executes command
B+1->B *** Command
Else *** If test (If Ans==24) is false, then executes
A+1->A *** Command
End *** Ends secondary loop
Pxlon(A,B *** updates graph
Goto T *** Returns to Main loop
I have made a routing that is almost 25% faster then this, and half the
size, and uses no Gotos. No BS. When it is honed completely, I will
release it.
Josh Cunningham
P.S. Send me ideas for what you want me to include in the RPG engine!
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com