
Aide pour un programme en Axe Parser
Re: Aide pour un programme en Axe Parser
Le source : dans les deux 

Tutoriel sur l'axe parser, un langage de programmation pour z80 ultra rapide et beaucoup plus facile que l'ASM !
-
kindermoumouteProgrammeur
Niveau 14: CI (Calculateur de l'Infini)- Posts: 849
- Joined: 30 Sep 2009, 00:00
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: Ecole d'ingénieur informatique et industriel
Re: Aide pour un programme en Axe Parser
Je mettrai ça demain matin, ça devrait être sera rapide.
(et pour actualiser ?
)
(et pour actualiser ?

La procrastination, c'est rigolo.
-
WellenPremium
Niveau 11: LV (Légende Vivante)- Posts: 447
- Joined: 17 Dec 2010, 00:00
- Location: Compiègne (Picardie)
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: étudiant UTC
Re: Aide pour un programme en Axe Parser
Envoie un MP à Critor ou Mic pour mettre une nouvelle version. Cela prend 5 secondes de mettre le source en ligne : http://tiforge.info/ti_editor/
Tutoriel sur l'axe parser, un langage de programmation pour z80 ultra rapide et beaucoup plus facile que l'ASM !
-
kindermoumouteProgrammeur
Niveau 14: CI (Calculateur de l'Infini)- Posts: 849
- Joined: 30 Sep 2009, 00:00
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: Ecole d'ingénieur informatique et industriel
Re: Aide pour un programme en Axe Parser
Ba oui mais jl'ai pas encore modifié, je le mettrai une fois fini 

La procrastination, c'est rigolo.
-
WellenPremium
Niveau 11: LV (Légende Vivante)- Posts: 447
- Joined: 17 Dec 2010, 00:00
- Location: Compiègne (Picardie)
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: étudiant UTC
Re: Aide pour un programme en Axe Parser
Pour mettre à jour un programme, envoie le par mail à: info@tiplanet.org
Mes programmes => ici !
-
Loulou 54Premium
Niveau 13: CU (Calculateur Universel)- Posts: 1985
- Images: 8
- Joined: 02 Aug 2009, 00:00
- Location: 54, près de Metz
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: Ingé Logiciel chez Amazon
Re: Aide pour un programme en Axe Parser
Ouaip^^
Je vais faire ça dans mon lit et je re-poste ici pour prévenir demain matin normalement
Je vais faire ça dans mon lit et je re-poste ici pour prévenir demain matin normalement

La procrastination, c'est rigolo.
-
WellenPremium
Niveau 11: LV (Légende Vivante)- Posts: 447
- Joined: 17 Dec 2010, 00:00
- Location: Compiègne (Picardie)
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: étudiant UTC
Re: Aide pour un programme en Axe Parser
Bon alors on va faire comme ça : j'ai ajouté trois modes de vitesse : lent, normal et rapide.
Je poste le code, vous le compilez de votre coté et vous me donnez votre avis.. Je vois pas trop d'autre solution qui évite de faire un MAJ inutile sur Tibank ( au cas ou faut rechanger )
Pour le score, c'est ok on ne peut plus passer "en-dessous" de zéro et atteindre des 6533X points
Dommage pour vous
Let's go :
Kinder : le source dans le Zip, en format texte ou TI ?
Note : il est tout à fait probable que des optimisations soient possibles mais c'est mon premier programme en Axe,
j'ai essayé de faire de mon mieux et je trouve que je me suis pas trop mal débrouillé
Je poste le code, vous le compilez de votre coté et vous me donnez votre avis.. Je vois pas trop d'autre solution qui évite de faire un MAJ inutile sur Tibank ( au cas ou faut rechanger )
Pour le score, c'est ok on ne peut plus passer "en-dessous" de zéro et atteindre des 6533X points


Let's go :
- Code: Select all
:.JPONG
:
:ClrDraw:ClrHome:DiagnosticOff
:[0000]→GDB1
:[0000]→GDB2
:[0000]→GDB3
:[0000]→GDB4
:[0000]→GDB5
:1→F+7→G
:sub(P)
:Lbl 0
:[003C4E5E7E7E3C00]→Pic0
:25→B:45→A
:‾1→H
:rand^2→L
:!If L
:‾1→L
:End
:40→X
:0→C→I→W→U→V→P→Q→R→S+1→Θ+1→D
:15→Y:4→Z
:
:Text(35,0,"+JPONG+")
:Text(8,57,"(c) Jean Vintache - 2011")
:Text(12,8,"Jouer !")
:Text(12,18,"Instructions")
:Text(12,28,"Scores")
:Text(12,38,"Complements")
:Text(12,48,"Quitter")
:Repeat getKey(9) or getKey(54)
:If getKey(1)
:G+10→G
:1→Θ:F+1→F
:If G50
:8→G:1→F
:End
:ElseIf getKey(4)
:G-10→G
:1→Θ:F-1→F
:If G=65534
:48→G:5→F
:End
:End
:If Θ=1
:For(Θ,0,4)
:Text(8,Θ*10+8," ")
:End
:Text(57,38," ")
:Text(35,8," ")
:Text(35,28," ")
:Text(36,48," ")
:Text(54,18," ")
:Text(8,G,"")
:If F=4
:Text(57,G,"")
:ElseIf F=1 or (F=3)
:Text(35,G,"")
:ElseIf F=2
:Text(54,G,"")
:ElseIf F=5
:Text(36,G,"")
:End
:0→Θ
:Pause 200
:End
:End
:
:If F=1
:rand^1000+200→U
:sub(1)
:sub(P)
:0→Θ
:Goto 0
:ElseIf F=2
:sub(2)
:0→Θ
:Goto 0
:ElseIf F=3
:sub(S)
:0→Θ
:Goto 0
:ElseIf F=4
:sub(4)
:0→Θ
:Goto 0
:ElseIf F=5
:Goto F
:End
:
:Lbl 1
:ClrDraw
:ClrHome
:Fix 3
:Output(0,0," VITESSE DE JEU ")
:Fix 2
:Output(3,4,""
:Output(12,4,"")
:1→J
:Output(5,4,"MOYEN")
:Pause 100
:Repeat getKey(9) or getKey(54)
:If getKey(2)
:!If J
:2→J
:Else
:J-1→J
:End
:ElseIf getKey(3)
:If J=2
:0→J
:Else
:J+1→J
:End
:End
:!If J
:Output(5,4," LENT ")
:ElseIf J=1
:Output(5,4,"NORMAL")
:ElseIf J=2
:Output(5,4,"RAPIDE")
:End
:Pause 170
:End
:
:ref(X,60,Y,2):Pt-On(A,B,Pic0)
:DispGraph
:Output(4,0,"Appuyez"):Output(6,1,"sur")
:Output(5,2,"[2ND]")
:Pause 300
:Repeat getKey(54)
:End
:
:Repeat B70
:If getKey(55)
:Output(5,0,"PAUSE")
:Output(1,1,"SCORE:"):Output(6,1,S►Dec)
:Output(5,2,"[2ND]"):Output(1,3,"pour reprendre")
:Repeat getKey(54)
:End
:End
:
:If D=2
:If (getKey(2) and (C=0) and (X1)) or (getKey(2) and (C=1) and (X2))
:X-D→X
:ElseIf getKey(3) and (X+Y95)
:X+D→X
:End
:ElseIf D=‾2
:If getKey(2) and (X+Y95)
:X-D→X
:ElseIf getKey(3) and (X1)
:X+D→X
:End
:End
:
:If A=89 or (A=0 and (C=0))
:‾L→L
:End
:If B≤1
:‾H→H
:End
:
:If Pxl-Test(A+4,B+7)=0 and (Pxl-Test(A+1,B+7)=1
:If L=65535
:1→L
:End
:‾H→H
:ElseIf Pxl-Test(A+3,B+7)=0 and (Pxl-Test(A+6,B+7)=1
:If L=1
:65535→L
:End
:‾H→H
:ElseIf Pxl-Test(A+3,B+7)=1 and (Pxl-Test(A+4,B+7)=1
:‾H→H
:End
:If C=1
:If Pxl-Test(A,B+4)=0 and (Pxl-Test(A,B+1)=1)
:If H=65535
:1→H
:End
:‾L→L
:ElseIf Pxl-Test(A,B+3)=0 and (Pxl-Test(A,B+6)=1)
:If H=1
:65535→H
:End
:‾L→L
:ElseIf Pxl-Test(A,B+3)=1 and (Pxl-Test(A,B+4)=1)
:‾L→L
:End
:End
:
:If getKey(15) or (C=1 and (A=65529))
:80→B
:End
:
:If V=U
:sub(B)
:End
:
:If R=80
:0→R
:S+1→S
:End
:
:!If J
:Pause 20
:ElseIf J=1
:Pause 10
:End
:
:V+1→V
:A+L→A:B+H→B
:R+1→R
:ClrDraw
:If C=1
:ref(0,46-(X*46/80),2,15)
:End
:ref(X,60,Y,2)
:Pt-On(A,B,Pic0):DispGraph
:End
:ClrHome
:Text(20,0,"= FIN DE PARTIE =")
:Text(0,8,"Score :"):Text(75,8,S►Dec)
:Text(0,18,"Bonus reussis :"):Text(75,18,P►Dec)
:Text(0,28,"Bonus rates :"):Text(75,28,Q►Dec)
:!If (P+Q)=0
:Text(0,38,"Reussite aux bonus :")
:Text(75,38,P*100/(P+Q)►Dec):Text(88,38,37►Frac)
:End
:If S{GDB5}supr/sup
:If S{GDB1}supr/sup
:{GDB4)→{GDB5}supr/sup
:{GDB3}supr/sup→{GDB4}supr/sup
:{GDB2}supr/sup→{GDB3}supr/sup
:{GDB1}supr/sup→{GDB2}supr/sup
:S→{GDB1}supr/sup
:1→E
:ElseIf S{GDB2}supr/sup and (S{GDB1}supr/sup
:{GDB4}supr/sup→{GDB5}supr/sup:{GDB3}supr/sup→{GDB4}supr/sup:{GDB2}supr/sup→{GDB3}supr/sup:S→{GDB2}supr/sup
:2→E
:ElseIf S{GDB3}supr/sup and (S{GDB2}supr/sup
:{GDB4}supr/sup→{GDB5}supr/sup:{GDB3}supr/sup→{GDB4}supr/sup:S→{GDB3}supr/sup
:3→E
:ElseIf S{GDB4}supr/sup and (S{GDB3}supr/sup
:{GDB4}supr/sup→{GDB5}supr/sup:S→{GDB4}supr/sup
:4→E
:ElseIf S{GDB5}supr/sup and (S{GDB4}supr/sup
:S→{GDB5}supr/sup
:5→E
:End
:Fix 3
:Text(20,47," HIGHSCORE n° ")
:Text(70,47,E►Dec)
:Fix 2
:End
:Text(40,57,"[2ND]=Continuer")
:Repeat getKey(54):End
:ClrDraw
:Return
:
:
:Lbl P
:For(Θ,0,95)
:Pxl-On(Θ,7):Pxl-On(95-Θ,56):DispGraph:End
:For(Θ,0,64)
:Pxl-On(5,Θ):Pxl-On(89,64-Θ):DispGraph:End
:Pxl-Off(5,7)
:Pxl-Off(89,56)
:Pxl-Off(5,56)
:Pxl-Off(89,7)
:DispGraph
:Return
:
:Lbl 2
:DispGraph
:Text(20,0,"+Instructions+")
:Text(6,10,"-Deplacez le palet avec")
:Text(7,16,"les fleches.")
:Text(6,26,"-[MODE] = Pause")
:Text(6,36,"-[CLEAR] arrete la")
:Text(7,42,"partie en cours.")
:Text(42,57,"[2ND]=Suivant")
:Repeat getKey(54)
:End
:DispGraph
:Text(20,0,"+Instructions+")
:Text(7,10,"Vous devrez appuyer")
:Text(7,17,"sur les touches F1 a F5")
:Text(7,24,"pour gagner des points.")
:Text(7,31,"Vous aurez un 'malus' si")
:Text(7,38,"vous n'appuyez pas sur")
:Text(7,45,"la touche indiquee.")
:Text(51,57,"[2ND]=Menu")
:Repeat getKey(54)
:End
:DispGraph
:Return
:
:Lbl S
:DispGraph
:Text(23,0,"+Highscores+")
:Text(15,8,"1."):Text(30,8,{GDB1}supr/sup►Dec)
:If {GDB1}supr/sup100
:Text(40,8,"Et les 100pts??")
:Else
:Text(53,8,"Pas mal =D")
:End
:Text(15,18,"2."):Text(30,18,{GDB2}supr/sup►Dec)
:Text(15,28,"3."):Text(30,28,{GDB3}supr/sup►Dec)
:Text(15,38,"4."):Text(30,38,{GDB4}supr/sup►Dec)
:Text(15,48,"5."):Text(30,48,{GDB5}supr/sup►Dec)
:Text(44,57,"[2ND]=Retour")
:Repeat getKey(54):End
:DispGraph
:Return
:
:Lbl 4
:DispGraph
:Text(20,0,"+Complements+")
:Text(6,10,"-Programme Axe Parser")
:Text(6,20,"-Merci au forum TI-Bank")
:Text(7,38,"questions, bugs, idees ?")
:Text(5,47,"jean.vintache orange.fr"):Text(50,47,64►Frac)
:Text(44,57,"[2ND]=Retour")
:Repeat getKey(54)
:End
:DispGraph
:Return
:
:Lbl B
:rand^1000+200→U
:0→V→C+2→D+2→Z+11→Y
:X-3→X
:For(Θ,0,4)
:Pxl-On(89+Θ,5)
:Pxl-On(89+Θ,45):End
:Pxl-On(89,6):Pxl-On(93,6):Pxl-On(89,44):Pxl-On(93,44)
:DispGraph
:rand^5+49→T
:If T=53
:Pt-Off(80,20,[00F286E282828700])
:ElseIf T=52
:Pt-Off(80,20,[00F689E182848F00])
:ElseIf T=51
:Pt-Off(80,20,[00F689E182818906])
:ElseIf T=50
:Pt-Off(80,20,[00F286EA8F828200])
:ElseIf T=49
:Pt-Off(80,20,[00F784E781818700])
:End
:For(Θ,0,38)
:Pxl-On(90,Θ+6)
:Pxl-On(91,Θ+6)
:Pxl-On(92,Θ+6)
:End
:DispGraph
:For(Θ,0,38)
:Pxl-Off(90,Θ+6):Pxl-Off(91,Θ+6):Pxl-Off(92,Θ+6):DispGraph
:Pause 20
:!If J
:Pause 5
:End
:If getKey(T)
:0→V
:P+1→P
:S+10→S
:Output(1,1,"Bien vu !"):Output(0,2,"+10 pts")
:Pause 1050
:Return
:End
:End
:If L=1 or A≥70
:rand^3→W
:Else
:rand^2→W
:End
:If W=0
:‾2→D
:Output(0,0,"Inversion des"):Output(0,1,"fleches")
:ElseIf W=1
:1→Z+8→Y:X+3→X
:Output(1,0,"Palet retreci")
:ElseIf W=2
:1→C
:46-(X*46/80)→I
:Output(0,0,"Ajout d'un"):Output(0,1,"palet")
:End
:Output(0,2,"-5 pts")
:Q+1→Q
:S-5→S
:If S≤65535 and (S≥65529
:0→S
:End
:Pause 1050
:Return
:
:Lbl F
:For(Θ,0,32)
:For(A,0,95)
:Pxl-On(A,Θ)
:Pxl-On(A,64-Θ)
:End
:DispGraph
:End
:For(Θ,0,32)
:For(A,0,95)
:Pxl-Off(A,32-Θ):Pxl-Off(A,32+Θ):End
:DispGraph
:End
Kinder : le source dans le Zip, en format texte ou TI ?
Note : il est tout à fait probable que des optimisations soient possibles mais c'est mon premier programme en Axe,
j'ai essayé de faire de mon mieux et je trouve que je me suis pas trop mal débrouillé

La procrastination, c'est rigolo.
-
WellenPremium
Niveau 11: LV (Légende Vivante)- Posts: 447
- Joined: 17 Dec 2010, 00:00
- Location: Compiègne (Picardie)
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: étudiant UTC
Re: Aide pour un programme en Axe Parser
- Code: Select all
46-(X*46/80) = -X*46/80+46
(P+Q)=0 vaut P+Q=0
Il n'y a pas de règle de priorité de calcul.
Ton système de sauvegarde de classement des points est très intéressant, cependant, il peut être simplifiable au niveau de pointeurs :
- Code: Select all
:[0000]→GDB1
:.+0
:[0000]
:.+2
:[0000]
:.+4
:[0000]
:.+6
:...
:Et les autres datas s'obtiennent en faisant GDB1+2
:...
Ce code :
- Code: Select all
:If Pxl-Test(A+4,B+7)=0 and (Pxl-Test(A+1,B+7)=1
:If L=65535
:1→L
:End
:‾H→H
:ElseIf Pxl-Test(A+3,B+7)=0 and (Pxl-Test(A+6,B+7)=1
:If L=1
:65535→L
:End
:‾H→H
:ElseIf Pxl-Test(A+3,B+7)=1 and (Pxl-Test(A+4,B+7)=1
:‾H→H
:End
:If C=1
:If Pxl-Test(A,B+4)=0 and (Pxl-Test(A,B+1)=1)
:If H=65535
:1→H
:End
:‾L→L
:ElseIf Pxl-Test(A,B+3)=0 and (Pxl-Test(A,B+6)=1)
:If H=1
:65535→H
:End
:‾L→L
:ElseIf Pxl-Test(A,B+3)=1 and (Pxl-Test(A,B+4)=1)
:‾L→L
:End
:End
est grandement simplifiable à l'aide d'une fonction :
- Code: Select all
:If sub(PXT,4,7,0) and sub(PXT,1,7,1)
:If L=65535
:→L
:End
:sub(MH)
:ElseIf sub(PXT,3,7,0) and sub(PXT,6,7,1)
:If L=1
:-2→L
:End
:sub(MH)
:ElseIf sub(PXT,3,7,1) and sub(PXT,4,7,1)
:sub(MH)
:End
:If C=1
:If sub(PXT,0,4,0) and sub(PXT,0,1,)
:If H=65535
:→H
:End
:sub(ML)
:ElseIf sub(PXT,0,3,0) and sub(PXT,0,6,1)
:If H=1
:-2→H
:End
:sub(ML)
:ElseIf sub(PXT,0,3,1) and sub(PXT,0,4,1)
:sub(ML)
:End
:End
:...
:Plus loin dans le code
:...
:Lbl PXT
:Pxl-Test(A+r1,B+r2)=r3
:Return
:
:Lbl MH
:‾H→H
:Return
:
:Lbl ML
:‾L→L
:Return
Et encore, je n'ai pas trop regardé à quoi il servait, mais c'était pour montrer un exemple.

La deuxième partie de mon tutoriel t'éclairera un peu plus sur les Datas, donc je retourne bosser.
Tutoriel sur l'axe parser, un langage de programmation pour z80 ultra rapide et beaucoup plus facile que l'ASM !
-
kindermoumouteProgrammeur
Niveau 14: CI (Calculateur de l'Infini)- Posts: 849
- Joined: 30 Sep 2009, 00:00
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: Ecole d'ingénieur informatique et industriel
Re: Aide pour un programme en Axe Parser
Vraiment merci
Tout à fait d'accord pour attendre la prochaine partie de ton tuto (que je trouve très bien d'ailleurs
), je ne connaissais pas les data ni les pointeurs (sauf en C, mais bon) et je n'avais pas trop compris dans la doc ^^
Bonne chance pour le tuto

Tout à fait d'accord pour attendre la prochaine partie de ton tuto (que je trouve très bien d'ailleurs

Bonne chance pour le tuto

La procrastination, c'est rigolo.
-
WellenPremium
Niveau 11: LV (Légende Vivante)- Posts: 447
- Joined: 17 Dec 2010, 00:00
- Location: Compiègne (Picardie)
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: étudiant UTC
Re: Aide pour un programme en Axe Parser
kindermoumoute wrote:
- Code: Select all
46-(X*46/80) = -X*46/80+46
- Code: Select all
.575X+46
Show/Hide spoilerAfficher/Masquer le spoiler
46*1/80 = 46/80 = 0.575
-
Kiligolo
Niveau 11: LV (Légende Vivante)- Posts: 1465
- Joined: 17 May 2010, 00:00
- Gender:
- Calculator(s):→ MyCalcs profile
- Class: 1reS
Return to Langages alternatifs
Who is online
Users browsing this forum: ClaudeBot [spider] and 3 guests