Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: dinosteven on July 25, 2012, 06:05:56 pm

Title: Input
Post by: dinosteven on July 25, 2012, 06:05:56 pm
I tried looking at the source of a bunch of Axe games, but all I got was a bunch of stuff like :" YTOJEB"
??? It made no sense!
I've tried using the input command, but I couldn't get that to work, either.

So, how?
Title: Re: Input
Post by: DJ Omnimaga on July 25, 2012, 08:49:22 pm
I'm not sure, but if I recall correctly, the Input command was kinda buggy in Axe and it was never fixed, due to OS limitations. You had to create your own name input routine.

Not sure what's YTOJEB though.
Title: Re: Input
Post by: parserp on July 25, 2012, 09:00:44 pm
I always just used ztrumpet's routine (http://ourl.ca/4129/122465) for text input. :)
Title: Re: Input
Post by: dinosteven on July 25, 2012, 09:02:01 pm
I got it from ztrumpet's Jump! source. Here's the code that he used to input a name:
Spoiler For Spoiler:
:Disp "Type Your Name:"
:Output(0,5)
:"WRMH"→GDB5
:det(3)
:"VQLG"
:det(3)
:"ZUPKFC"
:det(1)
:" YTOJEB"
:det(2)
:"XSNIDA"
:"                "→GDB9
:
:Repeat B=54 and (A≠0
:getKey→B
:If B=56 and (A≠0
:A-1→A
:Output(A,5,' '►Frac)
:Output(A,5)
:End
:If B=15
:0→A
:Output(0,5,GDB9)
:Output(0,5)
:End
:If A<16
:If B>10 and (B<48)
:If {B+GDB5-11}→C
:Disp C►Frac
:C→{A+L1}
:A+1→A
:End
:End
:End
:End
:While A<19
:0→{A+L1}
:A+1→A
:End

It starts with the setting of some strings, then somehow uses those strings as a 'getKey # to letter' algorithm. Now that I think about it and look at my calc's keys, they look like the letters in each column of keys... I still don't fully understand how it works, though.

EDIT:  :ninja:, and thanks!
Title: Re: Input
Post by: shmibs on July 25, 2012, 09:40:20 pm
this routine first checks if the key pressed is within the range of values 10 and 48, meaning it's one of the keys in the alphanumeric section. then it subtracts 11 from that, so key 11 would point to entry 0 in GDB5, 12 to 1, and so on. z has the GDB stored so that every value points to its proper letter, with keys in that region that don't have a letter pointing to the value 0 instead.
Title: Re: Input
Post by: dinosteven on July 25, 2012, 11:23:04 pm
Thanks, makes sense.