Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: nemo on June 22, 2010, 12:19:51 pm

Title: String Help
Post by: nemo on June 22, 2010, 12:19:51 pm
why does this code only display 15 characters rather than 16?
Code: [Select]
.TEST
"0123456789ABCDEF->Str1
Fix 5                 // text is displayed on buffer
Fix 1                // large text
Text(0,0,Str1
DispGraph
Fix 0       
Fix 4                 // reset flags

i get 0123456789ABCDE displayed on my calculator, how can i make it display the F as well?
Title: Re: String Help
Post by: SirCmpwn on June 22, 2010, 12:20:54 pm
:\ This is weird...
Err...
No idea.  Add another character to the string and post the results.
Title: Re: String Help
Post by: nemo on June 22, 2010, 12:22:52 pm
same thing happens sir. only 15 characters are displayed  :-\ i'm making a small sprite editor for myself when i saw runner112's but knew i didn't need that many features. i notice that he has hex displayed at the bottom but i can't get mine to do the same.
Title: Re: String Help
Post by: SirCmpwn on June 22, 2010, 12:24:34 pm
Try Str1+1 in the Text( command
Title: Re: String Help
Post by: nemo on June 22, 2010, 12:27:37 pm
then i just get 123456789ABCDEF which is still 15 characters. i tried having 00123456789ABCDEFF to no avail. there SHOULD be enough room on the screen to display the text... right?
Title: Re: String Help
Post by: SirCmpwn on June 22, 2010, 12:28:37 pm
Maybe...
Well, look at it this way.  Is the 15th character nuzzled up on the edge?
Title: Re: String Help
Post by: Magic Banana on June 22, 2010, 01:07:33 pm
This is weird. I just copied the code above (added DiagnosticOff so Done doesn't get in the way) and I got "_23456789ABCDEF_"

EDIT: Whoops, forgot the '0' at the beginning, but when I added that, it now says "p123456789ABCDE_"
Title: Re: String Help
Post by: calcdude84se on June 22, 2010, 02:09:55 pm
I'll just answer the question from the top: Text( in Axe uses the same BCALL that Text( in BASIC does. If you've ever tried to display a 3-wide character (most of them), and the space after it would be the 95th column, it doesn't display (This is actually true for all chars). Basically, TI doesn't want you trying to draw to the 95th column. (This is the last column, indexed from 0, as is normal)
Silly, silly TI...
Title: Re: String Help
Post by: nemo on June 22, 2010, 02:13:03 pm
well, that's ok. i just decided to have it look awkward like so:

                        F
0123456789ABCDE
Title: Re: String Help
Post by: SirCmpwn on June 22, 2010, 02:21:11 pm
Aww :\
Sorry you couldn't figure it out.  Stupid TI.

1000th Post! ;D
Title: Re: String Help
Post by: DJ Omnimaga on June 22, 2010, 02:56:06 pm
ouch, I thought TI let us draw text there in ASM at least... Oh well I guess we need to rely on custom font routines then or simply not use that column of pixels for text x.x

What I hate the most is when slightly drawing text out of the screen, the entire char won't even display at all. When scrolling text out of the screen, it looks so glitchy
Title: Re: String Help
Post by: Runer112 on June 22, 2010, 08:59:58 pm
If you were wondering how I did it, I just used a sort of cheap way. I drew all the characters not on the right edge of the screen normally. Then, I drew the character that should be on the right edge somewhere else, in an unused spot on the screen, and used For() loops to loop through every pixel, copy the pixel to where it should be, and unset the pixels in the place I drew the character.
Title: Re: String Help
Post by: FinaleTI on June 22, 2010, 09:03:21 pm
When scrolling text out of the screen, it looks so glitchy
*cough* conj( *cough*
Title: Re: String Help
Post by: Runer112 on June 22, 2010, 09:07:10 pm
conj() works great for vertical scrolling, but won't work for horizontal scrolling.
Title: Re: String Help
Post by: FinaleTI on June 22, 2010, 09:09:08 pm
Though if you through in some Horizontal +/-'s before you DispGraph, then it would work to a degree, as long as you're not trying to do a greyscale background or anything like that.
Title: Re: String Help
Post by: Quigibo on June 22, 2010, 09:09:13 pm
I think he means smooth scrolling, not block by block scrolling.  Both can be done with the Copy() command, but when the letters get to the edge with smooth scrolling, they disappear suddenly.  You can fix that by copying the non-text part of the screen to the back buffer, using the Horizontal Scroll command, and then copying the buffer back, but that's more complicated and can't always be done.

EDIT: Ninja'd
Title: Re: String Help
Post by: DJ Omnimaga on June 23, 2010, 02:01:13 am
Personally if I want to draw text out of the screen, I migth just use custom fonts or something, so it won't end up too complicated if I do not have a lot of text to display or if I am using a routine to display it all. But I guess your tricks could work too (with Copy() and stuff)