Author Topic: [Axe]Title Screen  (Read 15818 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
[Axe]Title Screen
« on: November 06, 2010, 12:00:13 pm »
Hey everyone, I have small knwoledge on axe and would like to know how to make a VERY SIMPLE title screen.

Can I use the same menus as in TI BASIC:

Code: [Select]
Menu("Choose","Play",1,"About",2,"Quit",3)
or

Code: [Select]
:ClrHome
:AxesOff
:ClrDraw
:1?W
:While W
:While W=1
:Text(1,1,"CHOOSE FORMULA
:Text(7,1,"1:CIRCLE AREA
:Text(14,1,"2:SPHERE VOL.
:Text(21,1,"3:CYLINDER VOL.
:Text(28,1,"4:CONE VOL.
:Text(35,1,"5:CONE SURFACE AREA
:Text(42,1,"6:QUADR. PYR. VOL.
:Text(49,1,"7:CYLINDER SURFACE AREA
:Text(56,1,"8:MORE FORMULAS
:Repeat 2>abs(5-abs(5-abs(Ans-83
:getKey
:End
:Ans?K
:If K=73
:Then
:ClrDraw
:2?W
:Else
:If K=92
:Then
:ClrHome
:Prompt R
:Output(4,2,"VOLUME IS:":Output(5,2,RRp
:End
:If K=93
:Then
(...)


Thanks
« Last Edit: November 06, 2010, 12:00:31 pm by ScoutDavid »

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: [Axe]Title Screen
« Reply #1 on: November 06, 2010, 12:11:02 pm »
Menu() is the correct command if you want a simple title screen.
Make sure your labels match when you use it though.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: [Axe]Title Screen
« Reply #2 on: November 06, 2010, 12:12:17 pm »
Menu() is the correct command if you want a simple title screen.
Make sure your labels match when you use it though.

I think he wants to know how to do it in Axe. (Axe doesn't support Menu(), does it?)

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: [Axe]Title Screen
« Reply #3 on: November 06, 2010, 12:15:10 pm »
Oh. It just said Title Screen. My fault.
If you want a menu in Axe, you'll have to hand make it and handle all input.
Axe doesn't handle anything on its own in regards to input or a native Menu() command.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [Axe]Title Screen
« Reply #4 on: November 06, 2010, 12:41:27 pm »
Code: [Select]
:ClrHome
:AxesOff
:ClrDraw
:1?W
:While W
:While W=1
:Text(1,1,"CHOOSE FORMULA
:Text(7,1,"1:CIRCLE AREA
:Text(14,1,"2:SPHERE VOL.
:Text(21,1,"3:CYLINDER VOL.
:Text(28,1,"4:CONE VOL.
:Text(35,1,"5:CONE SURFACE AREA
:Text(42,1,"6:QUADR. PYR. VOL.
:Text(49,1,"7:CYLINDER SURFACE AREA
:Text(56,1,"8:MORE FORMULAS
:Repeat 2>abs(5-abs(5-abs(Ans-83
:getKey
:End
:Ans?K
:If K=73
:Then
:ClrDraw
:2?W
:Else
:If K=92
:Then
:ClrHome
:Prompt R
:Output(4,2,"VOLUME IS:":Output(5,2,RRp
:End
:If K=93
:Then
(...)

Something like that would work?

Offline Raylin

  • Godslayer
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1392
  • Rating: +83/-25
  • I am a certifiable squirrel ninja.
    • View Profile
    • Ray M. Perry
Re: [Axe]Title Screen
« Reply #5 on: November 06, 2010, 12:57:05 pm »
Something like that.
Bug me about my book.

Sarah: TI-83 Plus Silver Edition [OS 1.19]
Cassie: TI-86 [OS 1.XX]
Elizabeth: TI-81 [OS 1.XX]
Jehuty: TI-83 Plus Silver Edition [OS 1.19]
Tesla: CASIO Prizm







Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [Axe]Title Screen
« Reply #6 on: November 06, 2010, 01:18:27 pm »
Something like that.

K, I'll try it.

BTW:

Code: [Select]
:.VIRUS
:ClrHome
:For(A,1,9999
:Pause 9999
:Pause 9999
:Pause 9999
:Pause 9999

Would this work as a successful virus in Axe?

I can't try it in my calculator, though

It doesn't work in the ROM: error: Block
« Last Edit: November 06, 2010, 01:20:27 pm by ScoutDavid »

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: [Axe]Title Screen
« Reply #7 on: November 06, 2010, 01:23:21 pm »
this would be more effective

Code: [Select]
.Axe
While 1
End

Impossible for the user to break out of without pulling the battery.  That, or

Code: [Select]
.Axe
Asm(C7)

Just shuts down the calc and resets ram, pretty much what you are going for

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: [Axe]Title Screen
« Reply #8 on: November 06, 2010, 01:24:11 pm »
This code works while you add a new line with 'end', since youre use For.
Also, it isnt very fun, if you let execute this by someone who have important things in the RAM and doesnt know that  he has just to wait.
« Last Edit: November 06, 2010, 01:34:28 pm by Aichi »

Offline alberthrocks

  • Moderator
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 876
  • Rating: +103/-10
    • View Profile
Re: [Axe]Title Screen
« Reply #9 on: November 06, 2010, 01:28:04 pm »
Be sure to flip X and Y. For instance:
Code: [Select]
:Text(1,14,"2:SPHERE VOL.instead of the original
Code: [Select]
:Text(14,1,"2:SPHERE VOL.In Axe, it's Text(X,Y, "text here"), not weird TI's Text(Y,X, "text here"). :)

Also, Prompt will not work. It's not an implemented command yet. Input is there, but it has yet to be seen if it will work or not. (on 2.53MP) Syntax IIRC is:
Code: [Select]
input->Str0...or whatever variable you wish to use :)

Then is not used at all with Ifs. You can simply remove them.

Finally, your keycodes are invalid - the one Axe uses is Xlib ones. The plus side though is that you can have multiple keys with:
Code: [Select]
If getKey(1) and getKey(2)
Here's a really simple key ref program. Just compile and run! :)
Code: [Select]
.AXEKEYF Axe key finder
ClrHome

0->Z
0->Q
Text(0,0,"Axe Key Finder v1.0")
Text(0,0,"--------------------")
Text(0,57,"(C) Albert H. - Axe by Quigbo")
Text(0,12,"Key:")
While Q!=1 (this is the does not equal to sign, not a ! and a =)
getKey->Z
If Z!=0
Text(14,12,"                ")
Text(14,12,Z>Dec)

If Z=15

If Q=2
1->Q
End

If Q=0
Text(0,24,"Press CLEAR again to exit.")
2->Q
End

Else
Text(0,24,"                                                                                            ")
0->Q
End

End

End
ClrHome

Have fun in Axe! :) It does take some guts to break some old BASIC habits, but once you're in, you'll have a LOT of fun! :D
Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/


Proud member of ClrHome!

Miss my old signature? Here it is!
Spoiler For Signature:
Alternate "New" IRC post notification bot (Newy) down? Go here to reset it! http://withg.org/albert/cpuhero/

Withgusto Networks Founder and Administrator
Main Server Status: http://withg.org/status/
Backup Server Status: Not available
Backup 2/MC Server Status: http://mc.withg.org/status/

Activity remains limited due to busyness from school et al. Sorry! :( Feel free to PM, email, or if you know me well enough, FB me if you have a question/concern. :)

Don't expect me to be online 24/7 until summer. Contact me via FB if you feel it's urgent.


Proud member of ClrHome!

Spoiler For "My Projects! :D":
Projects:

Computer/Web/IRC Projects:
C______c: 0% done (Doing planning and trying to not forget it :P)
A_____m: 40% done (Need to develop a sophisticated process queue, and a pretty web GUI)
AtomBot v3.0: 0% done (Planning stage, may do a litmus test of developer wants in the future)
IdeaFrenzy: 0% done (Planning and trying to not forget it :P)
wxWabbitemu: 40% done (NEED MOAR FEATURES :P)

Calculator Projects:
M__ C_____ (an A____ _____ clone): 0% done (Need to figure out physics and Axe)
C2I: 0% done (planning, checking the demand for it, and dreaming :P)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Axe]Title Screen
« Reply #10 on: November 07, 2010, 01:17:25 am »
About viruses, I would avoid using them maliciously except maybe if someone did lot of trouble to you or something :P, but even then it isn't a really good practice. :P

And yeah it took me a while to break some habits I had, especially using Output(0,0 instead of Output(1,1, not updating the screen every frame or locking myself inside endless loops X.x.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [Axe]Title Screen
« Reply #11 on: November 07, 2010, 09:27:42 am »
I can make a menu, my doubts is the GetKey, that's what I need to learn: getkeys, have no idea of how to use them :S



I know these are the keys, but I can't make getkeys :S

Offline Aichi

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 290
  • Rating: +76/-3
    • View Profile
    • Devrays
Re: [Axe]Title Screen
« Reply #12 on: November 07, 2010, 09:37:49 am »
Code: [Select]
ClrHome
Disp "Menu" ,i, "1) Start" ,i, "2) Options" ,i, "3) Help" ,i, "4) About" ,i, "5) Exit"
Repeat G=27
getkey->G
If G=34
sub(S)
End
If G=26
sub(O)
End
If G=18
sub(H)
End
If G= 35
sub(A)
End
End
ClrHome

What about reading the documentation and the commands list?

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: [Axe]Title Screen
« Reply #13 on: November 07, 2010, 09:54:29 am »
Thanks everyone, I'm getting some success:

Code: [Select]
ClrDraw
ClrHome
Text(0,0,"Title
Text(0,10,"1:Play
Text(0,20,"2:About
Text(0,30,"3:Help
Text(0,40,"4:Quit
getkey->Z
If G=34
// CODE FOR GAME
End
If G=26
ClrHome
Disp "GAME BY DAVID"
End
If G=18
Disp "HELP ..."
End
If G=35
Stop

What do you think
« Last Edit: November 07, 2010, 10:04:59 am by ScoutDavid »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Axe]Title Screen
« Reply #14 on: November 07, 2010, 01:17:26 pm »
To use Getkey, for example,

Repeat getkey(15)
End

would cause a loop until you press key #15, which happens to be CLEAR. Getkey=15 also works, but it is not as responsive, although it is more like the TI-OS getkey, so it's easier to navigate menus.