Author Topic: [TI-BASIC] Calculator Programming  (Read 10299 times)

0 Members and 1 Guest are viewing this topic.

Offline Radical Pi

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1143
  • Rating: +5/-2
    • View Profile
    • RealityRevolution
[TI-BASIC] Calculator Programming
« on: January 10, 2006, 11:27:00 am »
Instead of cluttering the forum with several single-question topics, ask it here. I don't expect this to be a hot topic, but anything is welcome.

I'll start with a question of my own:
How do you do 4-way homescreen scrolling usingc1-->
CODE
ec1For(A,1,8
Output(A,1,sub(Str1,???,16
Endc2
ec2I just can't fugure out the right combination of row and column variables.
One of these days I'll get a sig I'm really proud of.

tenniskid493

  • Guest
[TI-BASIC] Calculator Programming
« Reply #1 on: January 16, 2006, 11:51:00 am »
Please don't double post just to make sure someone will see your message.  As for solving your problem, here's what I came up with.

c1-->
CODE
ec1ClrHome
1->H
26->W
->X
->Y
For(A,1,8)
Output(A,1,sub(Str1,W(A-1)+X+1,16))
Endc2
ec2

Where H is the number of rows your map is going to have and W is the width of each row, X is the horiz. offset and Y is the vert. offset.

Hope that helps. :)smile.gif

Offline Radical Pi

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1143
  • Rating: +5/-2
    • View Profile
    • RealityRevolution
[TI-BASIC] Calculator Programming
« Reply #2 on: January 16, 2006, 01:26:00 pm »
Sorry about the double post.
That only goes left and right. Is there a way to work Y into the equation?

Next question: is it possible for text to wrap on the graphscreen?
One of these days I'll get a sig I'm really proud of.

tenniskid493

  • Guest
[TI-BASIC] Calculator Programming
« Reply #3 on: January 16, 2006, 02:47:00 pm »
I'm completly guessing at this but I think if you change the c1-->
CODE
ec1Output(A,1,sub(Str1,W(A-1)+X+1,16))c2
ec2 to c1
-->
CODE
ec1Output(A,1,sub(Str1,W((A+Y)-1)+X+1,16))c2
ec2 that it should work.  Let me know if it does or not.  

As for the 2nd part, no there is no way to get text to wrap on the graph screen.  You will need to write your own text wrapping routine or else check ticalc.org...maybe there's one there.

Don't worry about the dp..its fine :Dbiggrin.gif

Liazon

  • Guest
[TI-BASIC] Calculator Programming
« Reply #4 on: January 16, 2006, 02:47:00 pm »
does output do that?  I thought Disp didn't

Offline Radical Pi

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1143
  • Rating: +5/-2
    • View Profile
    • RealityRevolution
[TI-BASIC] Calculator Programming
« Reply #5 on: January 16, 2006, 02:58:00 pm »
I fixed the scrolling (I think)

c1-->
CODE
ec1For(A,1,8
R+A-1->B
Text(-54125+1,8A-8,0,sub(Str1,64B-64+C,16
Endc2
ec2

R=row
C=column
64=level width
One of these days I'll get a sig I'm really proud of.

Offline tifreak

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2708
  • Rating: +82/-3
  • My Kung Fu IS strong...
    • View Profile
    • TI-Freakware
[TI-BASIC] Calculator Programming
« Reply #6 on: January 16, 2006, 03:27:00 pm »
m, I believe CDI was gonna make a tutorial for me to post on that, but I am unsure...
Projects: AOD Series: 75% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%

Offline kalan_vod

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2715
  • Rating: +10/-0
    • View Profile
    • kalanrock.us
[TI-BASIC] Calculator Programming
« Reply #7 on: January 16, 2006, 03:47:00 pm »
QuoteBegin-Radical Pi+10 January 2006, 17:27-->
QUOTE (Radical Pi @ 10 January 2006, 17:27)
Instead of cluttering the forum with several single-question topics, ask it here. I don't expect this to be a hot topic, but anything is welcome.

I'll start with a question of my own:
How do you do 4-way homescreen scrolling usingc1-->
CODE
ec1For(A,1,8
Output(A,1,sub(Str1,???,16
Endc2
ec2I just can't fugure out the right combination of row and column variables.

For strings that are scrollable:
QuoteBegin-"BASIC Code"+
-->
QUOTE ("BASIC Code")
::"MAZES
:DelVar W:prgmLEVEL
:Lbl 1:Repeat X-87user posted image4:Output(1,1,sub(Str1,X-87,128:Output(6,8,"*
:xuser posted imageY:Repeat Ans:getKeyuser posted imageuser posted image:End:X+(user posted image=26)-(user posted image=24user posted imageX:X+16((user posted image=34)-(user posted image=25user posted imageX:If sub(Str1,X,1)="O
:Yuser posted imageX:End:W+1user posted imageW:prgmLEVEL:


QuoteBegin-"BASIC Code"+
-->
QUOTE ("BASIC Code")
:If W=4:Then:For(W,1,8:For(X,1,16:Output(W,X,"
:End:End:For(W,1,8:For(X,1,16:Output(W,X,"O
:End:End:For(W,1,8:For(X,1,16:Output(W,X,"
:End:End:Output(4,1,"THE-------------
:Output(5,1,"-------------End
:Output(8,1,"By Kalan
:Stop:End
:If W=3
:"OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOEOOOOOOO OOOOOOO O

CDI

  • Guest
[TI-BASIC] Calculator Programming
« Reply #8 on: January 17, 2006, 12:03:00 am »
Yeah, I have a very nice code for that (acually 2 codes) for smooth scrolling of HUGE maps and screen by screen scrolling of 128 maps... funfun I have the tut ready I just have to load it up

Offline tifreak

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2708
  • Rating: +82/-3
  • My Kung Fu IS strong...
    • View Profile
    • TI-Freakware
[TI-BASIC] Calculator Programming
« Reply #9 on: January 17, 2006, 02:20:00 am »
Oh, ok. :Dbiggrin.gif
Projects: AOD Series: 75% | FFME: 80% | Pokemon: 18% | RPGSK: 60% | Star Trek: 70% | Star Trek 83+: 40% | TI-City: 5%

Offline Radical Pi

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1143
  • Rating: +5/-2
    • View Profile
    • RealityRevolution
[TI-BASIC] Calculator Programming
« Reply #10 on: January 17, 2006, 11:53:00 am »
more tutorials, yay!

Can any ASMers make a program that wraps large font text with the Text( command?
One of these days I'll get a sig I'm really proud of.

Liazon

  • Guest
[TI-BASIC] Calculator Programming
« Reply #11 on: January 17, 2006, 12:05:00 pm »
um... correct me if I'm wrong, but puts definitely wraps automatically, and I'm not sure about vputs.

CDI

  • Guest
[TI-BASIC] Calculator Programming
« Reply #12 on: January 17, 2006, 12:09:00 pm »
no, Text( does NOT wrap, nether does Disp

tenniskid493

  • Guest
[TI-BASIC] Calculator Programming
« Reply #13 on: January 17, 2006, 12:22:00 pm »
he's talking about asm commands puts and vputs...those are the asm commands for putting text onto the graphscreen.  I'm not sure about whether or not they wrap text.  I would say try it but if it doens't work that could be one big calc. crash.  Better off reading the documentation on those two calls.

CDI

  • Guest
[TI-BASIC] Calculator Programming
« Reply #14 on: January 17, 2006, 12:28:00 pm »
oops, read that wrong... most code commands I know people put in quotes (not BASIC ones because everyone knows those)