Just as the title says, I quickly crafted up a display page used to convey a few blocks of text to the player (introduction, backstory, etc.), and I need a few pairs of eyes to look it over. xP I am using xLib, so any optimizations using those functions would be awesome since I'm still a newbie with it. But basic, er… BASIC would work just as well too.
Also, keep in mind, there are some DIM errors that I didn't fix intentionally, mostly when the string is shorter than 9 lines (225 characters). I want to keep it super-uber simple instead of adding min() and length(Str) arguments to make it universal. I can customize the strings individually to make sure they work. xP
ALSO: We do have two routines that combined can accomplish this task-ish, but IT HAS NOT BEEN WRITTEN. If it helps though, here they are!
Typewriter Routine: http://tibasicdev.wikidot.com/typewriter
Wordwrapping Text: http://tibasicdev.wikidot.com/wordwrap-text
Displays one-letter at a time (typewriter style) from the top corner (0,0) to the bottom corner (57, 94).
Allows for multiple lines to be displayed.
Pressing 2nd speeds up the text display (roughly six times faster from on-calc timing)
Support for multiple screens would also be awesome, although it might just be as simple as another For() loop, adding a ClrDraw, and replacing the current Text with Text(7A,0,sub(Str1,2+25A+225D), but I don't want to break it just yet. xP
DelVar ADelVar BDelVar C "AAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKLLLLLLLLL->Str1 For(A,0,8 For(B,1,25 Text(7A,0,sub(Str1,2+25A,B For(C,1,15 real(8 C+15(Ans=54->C End End End Pause "
DelVar ADelVar BDelVar CDelvar Str1 // Clears the variables at use and states them at the beginning of the program, a favorite habit of mine. "AAAAAAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEFFFFFFFFFFFFFFFGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKLLLLLLLLL->Str1 // Stores your long displayed string. Must at least be 225 characters long or dim( errors will occur at the shortage point. For(A,0,8 // Begins the first loop, A. This determines which row the string is outputted at, with A=0 at the 1st row, A=1 at the 2nd row, etc. etc. For(B,1,25 // Begins the second loop, B. This determines how many characters are being displayed, continued below. Text(7A,0,sub(Str1,1+25A,B // The bulk of the program. 7A determines the y-position, with text being displayed every 7 pixels. The sub(Str1,1+25A,B) tells the calculator to use Str1, beginning at position 1 + 25 characters per line, for B characters long, determined by the For loop. For(C,1,15 // Begins the third loop, C. This acts as a delay, while simultaneously allowing for getKey input. real(8 // A xLib command subsitute for getKey. For non-xLib calcs, replace this with getKey, then replace "54" below with an arrow key (24,25,26,34) C+15(Ans=54->C // When key 54 (2nd) is pressed, add 15 to C, which then ends the loop because C exceeds the maximum. If not, continue as normal. End End End Pause "