Voici l'un des programmes que j'ai écrit il y a bien longtemps, en 1985 de mémoire, pour le TI-99/4A.  « Daffy » est écrit en "TI Extended Basic" . Il a été publié dans le n°123 de la revue Hebdogiciel en Février 1986.

Le listing

100 SCJ,F,O=0 :: K=5 :: JO=1 :: DIM FS(5),RNOM$(5)
110 DATA 4,10,3,4,17,2,4,22,3,7,4,2,7,8,8,7,18,11,11,3,6,11,14,7,11,25,1,11,28,3
120 DATA 15,4,9,15,15,1,15,18,1,15,21,9,19,6,4,19,12,3,19,19,4,19,25,2,23,2,30,2
130 DATA 11,6,7,16,7,6,11,28,15,13,15,19,19,10,19,23
140 DATA 5,10,5,12,8,4,8,28,12,18,16,7,16,26
150 DATA 3,15,1,3,18,1,3,24,1,4,10,1,7,4,8,7,14,6,7,22,6,10,3,1,11,8,6
160 DATA 11,19,4,11,25,5,13,3,4,13,30,1,15,8,7,15,17,12,17,3,4,17,29,2
170 DATA 19,15,6,23,2,30,2
180 DATA 3,16,3,25,7,8,7,20,13,4,11,23,15,15,19,18
190 DATA 5,10,4,24,8,24,11,3,12,9,14,30,16,20
200 DATA 4,13,2,4,18,2,7,2,5,7,13,3,7,18,3,7,29,3,8,9,1,8,25,1,11,4,9,11,15,4,11,21,2
210 DATA 11,25,5,15,6,1,15,9,7,15,18,7,15,27,1,19,4,15,19,21,7,23,2,30
220 DATA 7,5,7,16,7,28,11,13,11,19,15,7,15,25,19,19
230 DATA 5,13,5,18,9,9,9,25,12,21,16,12,20,6
240 DATA 3,12,1,4,20,1,3,26,1,7,4,1,7,7,9,7,18,4,7,26,2,7,30,1,11,10,13,11,25,5
250 DATA 11,3,2,15,2,7,15,13,5,15,20,9,15,2,7,19,7,6,19,17,4,19,23,2,23,2,30
260 DATA 11,5,7,16,7,28,7,5,11,23,15,11,15,18,19,21
270 DATA 4,12,5,20,4,26,12,3,12,15,16,7,16,24
280 DATA 7,22,5,4,10,2,4,14,2,4,24,2,7,8,11,7,29,2,11,5,5,11,12,2,11,19,1
290 DATA 11,22,9,15,9,6,15,17,5,16,3,3,16,26,2,19,4,1,19,7,3,19,21,2,19,25,3,23,2,30
300 DATA 7,6,11,10,11,20,19,15,19,5,15,15,19,23,7,27
310 DATA 5,11,5,14,8,24,12,13,5,25,17,4,17,26
320 CALL CLEAR :: CALL DELSPRITE(ALL):: RANDOMIZE :: SC$="" :: TA,TABL=1 :: VIE=4 :: LE=8 :: TI,SC,P1,P2=0 :: CALL SCREEN(2):: CALL MAGNIFY(3)
330 CALL CHAR(40,"FFFFFFFFFFFFFFFF",41,"80C0E0F0F8FCFEFF",127,"0000000000000103",124,"00000000000080C")
340 CALL CHAR(42,"FFFEFCF8F0E0C08",43,"FFFEFCF8F0E0C08",44,"FF7F3F1F0F070301")
350 CALL CHAR(58,"80808080808080FF",107,"FFFFFFFFFFFFFFFFF",92,"000000C0FFC",93,"00002030F8302")
360 CALL CHAR(63,"8181818181818181",59,"01010101010101FF",62,"00000000000000FF",60,"8080808080808080",61,"0101010101010101")
370 CALL CHAR(120,"8040201008040201"&RPT$("0",48),136,"00000001030307030101010703010103000000008044FCF80080C0C0C00080E")
380 CALL CHAR(140,"00000000000203010000000000000001000000103858FCF81010307C781030F8")
390 CALL CHAR(125,"4040405FEF5F404",126,"02202FAFFFA0202",34,"0103070F1F3F7FFF",35,"80C0E0F0F8FCFEFF")
400 CALL CHAR(96,"FF000000000000000000000000000FF000000000000000",36,"0000000007040C0C")
410 CALL CHAR(39,"0C3F3F0C0C7CFCFF",100,"01"&RPT$("0",62),38,"2070697F7E3",37,"4070787C7840404")
420 CALL CLEAR :: CALL COLOR(1,5,1,2,5,1,3,8,1,4,8,1,5,8,1,6,8,1,7,8,1,8,8,1)
430 IF F=1 THEN 480 ELSE DISPLAY AT(1,2):"TEXAS INSTRUMENTS PRESENTE" :: DISPLAY AT(4,2):">>> >>>> >>>> >>>> > >"
440 DISPLAY AT(5,2):"((()=((((<=((((<=((((?(< =(" :: DISPLAY AT(6,2):"(<=(?(:;(<=(: =(: =(:>;(" :: CALL SPRITE(#1,120,8,33,49)
450 DISPLAY AT(7,2):"(:;(?((((<=((< =((< ,(((+" :: DISPLAY AT(8,2):"(((*=(<=(<=(< =(< =(<" :: CALL VCHAR(5,3,61,4)
460 CALL VCHAR(5,31,60,2):: DISPLAY AT(14,5):"FRUITS........100 PTS" :: DISPLAY AT(16,5):"PUITS ........200 PTS" :: DISPLAY AT(24,3):"COPYRIGHT FABRICE MONTUPET"
470 CALL KEY(2,A,B):: IF A=18 THEN F=1 :: GOTO 480 ELSE 470
480 RESTORE 840 :: FOR T=1 TO 7 :: READ DI,NI :: CALL SOUND(DI,NI,0,NI+1,0):: NEXT T
490 CALL DELSPRITE(ALL):: CALL CLEAR :: CALL COLOR(2,16,1,3,16,1,4,16,1)
500 CALL CHAR(58,"0001",78,"002466766E666666",79,"003C7F6666667E3C",83,"003C7E603C467E3C",67,"003C7E7060707E3C")
510 CALL CHAR(82,"003C7E667E7C6666",69,"003C7E6078607E3C",84,"003C7E1818181818",80,"003C7E667E7C606")
520 CALL CHAR(85,"0024666666667E3C",76,"0020606060607E3C",65,"003C7E667E666666",66,"003C7E667C667E3C")
530 T$=STR$(TABL):: DISPLAY AT(12,7):"T A B L E A U "&RPT$("0",2-LEN(T$))&T$ :: DISPLAY AT(14,9):"SCORE "&RPT$("0",6-LEN(SC$))&SC$
540 IF TA<=3 THEN CS$="FFFFFF7B321" :: CR$="000000000077FFFF" :: CG$="03070F0F0F1A12" :: CD$="C0F0F0F8FCDC9C08" :: CA$="FFFFFF7B3210EBDE"
550 CM=15 :: MO$="030FC9DDFF7C3030333F1F070000000080E030B6F67E181090F0F06"
560 IF TA<=3 THEN EG$="607F6060607F606" :: ED$="06FE060606FE0606" :: GOTO 600
570 CS$="FF3C18183CFF" :: CR$="00000000000077FF" :: CD$="E0E08080E0E" :: CG$="070701010707" :: CA$="FF3C18183CFF101"
580 EG$="0303037F0303037F" :: ED$="C0FEC0C0C0FEC0C"
590 CM=12 :: MO$="000824524B1F798D8F5712220000000010244AD1E0F89EB1F1BA4844"
600 CALL CHAR(88,MO$,105,CS$,106,CA$,112,EG$,113,ED$,120,CR$,121,CG$,122,CD$)::CALL CLEAR :: ON TA GOTO 610,620,630,640,650
610 RESTORE 150 :: CS=3 :: CR=4 :: CE=13 :: CF=11 :: GOTO 660
620 RESTORE 110 :: CS=9 :: CR=10 :: CE=9 :: CF=14 :: GOTO 660
630 RESTORE 200 :: CS=6 :: CR=8 :: CE=5 :: CF=7 :: GOTO 660
640 RESTORE 240 :: CS=9 :: CR=10 :: CE=7 :: CF=8 :: GOTO 660
650 RESTORE 280 :: CS=9 :: CR=8 :: CE=14 :: CF=5
660 CALL COLOR(9,11,1,14,11,1,1,15,1,10,CS,1,12,CR,1,11,CE,1,13,CF,1)
670 CALL CHAR(100,"0F3F7F7FFFFFFFFF7F7F3F0F0000000080E0F0F0F8F8F8F8F0F0E0C")
680 FOR S=1 TO 19 :: READ T,U,V :: CALL HCHAR(T,U,105,V):: CALL HCHAR(T-1,U,120,V):: CALL HCHAR(T,U-1,121):: CALL HCHAR(T,U+V,122)
690 CALL HCHAR(T-2,U+1,58):: CALL HCHAR(T-1,U-1,127):: CALL HCHAR(T-1,U+V,124)::NEXT S :: CALL HCHAR(23,32,105):: CALL HCHAR(22,32,120)
700 IF TA=1 THEN RESTORE 180 ELSE IF TA=2 THEN RESTORE 130 ELSE IF TA=3 THEN RESTORE 220 ELSE IF TA=4 THEN RESTORE 260
701 IF TA=5 THEN RESTORE 300
710 FOR E=1 TO 8 :: READ T,U :: CALL VCHAR(T,U,112,4):: CALL VCHAR(T,U+1,113,4):: CALL VCHAR(T-1,U,124):: CALL VCHAR(T-1,U+1,127):: NEXT E
720 ON TA GOTO 730,740,750,760,770
730 RESTORE 190 :: F$="103C7E7A7A3C1" :: GOTO 780
740 RESTORE 140 :: F$="347EFFFDFDFF7E3C" :: GOTO 780
750 RESTORE 230 :: F$="10387C747438381" :: GOTO 780
760 RESTORE 270 :: F$="1010D37E7EC3" :: GOTO 780
770 RESTORE 310 :: F$="107C7E7C1010101"
780 CALL CHAR(128,F$):: FOR F=1 TO 7 :: READ T,U :: CALL SOUND(-1,1500,0):: CALLHCHAR(T,U,128):: CALL HCHAR(T-1,U,106):: NEXT F
790 DISPLAY AT(1,1):"SCORE 000000 TOP \] 000000" :: CALL HCHAR(19,30,34):: CALL HCHAR(20,29,36)
800 CALL HCHAR(19,31,35):: CALL HCHAR(20,30,125):: CALL HCHAR(20,31,126):: CALL HCHAR(22,30,107,2):: CALL HCHAR(21,30,107,2)
810 CALL HCHAR(3,28,100):: CALL HCHAR(4,28,101):: CALL HCHAR(3,29,102):: CALL HCHAR(4,29,103)
820 DATA 156,128,4,126,30,-4,96,250,4,64,80,-8,32,100,-6
830 DATA 600,165,500,165,200,165,600,165,600,196,200,185,600,185,200,165,600,165,400,156,600,165
840 DATA 100,300,100,400,100,500,200,625,100,400,600,500,-1,44731
850 IF TABL=18 THEN TABL=18 :: NI=2
860 CALL HCHAR(24,3,32,VIE+1):: CALL HCHAR(24,3,38,VIE):: CALL HCHAR(24,14,37,TABL)
870 CALL SPRITE(#1,140,11,161,256):: FOR Y=256 TO 224 STEP -8 :: CALL SOUND(-1,-3,0):: CALL LOCATE(#1,161,Y):: NEXT Y :: GOSUB 1030
880 CALL SPRITE(#28,96,2,177,233):: RESTORE 820 :: FOR T=3 TO 7 :: READ YM,XM,VM:: D=(INT(RND*3)-1)*VM :: IF D=0 THEN D=VM
890 CALL SOUND(-50,-7,0):: CALL SPRITE(#T,88,CM,YM,XM,0,D*2):: NEXT T :: Y=161 :: X=224 :: PAT=140
900 GOSUB 1120 :: CALL JOYST(2,A,B):: IF A=4 THEN 1390 ELSE IF A=-4 THEN 1400 ELSE IF B=4 THEN 930 ELSE IF B=-4 THEN 950 ELSE CALL KEY(2,T1,T2):: IF T1=18 THEN 980
910 TI=TI+5 :: IF X<8 THEN X=248 ELSE IF X>240 THEN X=8 ELSE CALL GCHAR(Y/8+3,X/8+1,LL):: IF LL=32 OR LL=122 OR LL=58 THEN 970
920 GOSUB 1120 :: CALL SPRITE(#1,PAT,11,Y,X):: GOTO 900
930 CALL GCHAR(Y/8+2,X/8+1,LL):: IF LL=112 THEN 940 ELSE 910
940 GOSUB 1120 :: FOR M=Y TO Y-32 STEP -LE :: GOSUB 1120 :: CALL LOCATE(#1,M,X):: CALL SOUND(-1,-3,0):: NEXT M :: Y=Y-32 :: GOTO 910
950 CALL GCHAR(Y/8+3,X/8+1,LL):: IF LL=112 THEN 960 ELSE 910
960 GOSUB 1120 :: FOR M=Y TO Y+32 STEP LE :: GOSUB 1120 :: CALL LOCATE(#1,M,X)::CALL SOUND(-1,-3,0):: NEXT M :: Y=Y+32 :: GOTO 910
970 Y=Y+8 :: CALL LOCATE(#1,Y,X):: GOSUB 1120 :: CALL GCHAR(Y/8+3,X/8+1,LL):: IF LL=105 THEN 910 ELSE 970
980 IF Y<8 THEN 910 ELSE CALL GCHAR(Y/8+2,X/8+1,V1):: CALL GCHAR(Y/8,X/8+1,V2)::IF V1=107 AND V2=125 THEN GOSUB 1040 ELSE IF FR=1 THEN 910
990 Y=Y-4 :: CALL LOCATE(#1,Y,X):: CALL GCHAR(Y/8+1,X/8+1,L1):: GOSUB 1120 :: CALL GCHAR(Y/8,X/8+1,L2):: IF L1=128 OR L2=128 THEN 1000 ELSE Y=Y+4 :: CALL LOCATE(#1,Y,X):: GOTO 910
1000 FOR E=3 TO 7 :: CALL COLOR(#E,5):: NEXT E :: IF L1=128 THEN PP=1 ELSE PP=0
1010 CALL HCHAR(Y/8+PP,X/8+1,32):: CALL HCHAR(Y/8+PP-1,X/8+1,105)
1020 FOR E=1 TO 30 STEP 5 :: CALL SOUND(-100,1500,E):: NEXT E :: Y=Y+4 :: CALL LOCATE(#1,Y,X):: SC=SC+100 :: GOSUB 1030 :: P1=P1+1 :: FR=1
1021 FOR E=3 TO 7 :: CALL COLOR(#E,CM):: NEXT E :: GOSUB 1120 :: GOTO 910
1030 SC$=STR$(SC):: SCM=MAX(SC,SCM):: SCM$=STR$(SCM):: DISPLAY AT(1,7)SIZE(6):RPT$("0",6-LEN(SC$))&SC$
1031 DISPLAY AT(1,23)SIZE(6):RPT$("0",6-LEN(SCM$))&SCM$ :: RETURN
1040 IF FR=1 OR P1=7 THEN 1050 ELSE RETURN
1050 FOR G=3 TO 7 :: CALL COLOR(#G,5):: NEXT G :: CALL SOUND(-10,-1,0):: CALL PATTERN(#1,140):: FOR D=X TO X-24 STEP -4 :: CALL LOCATE(#1,Y,D):: CALL SOUND(-1,-3,0):: NEXT D
1060 CALL SPRITE(#13,100,CS,161,236):: X=X-24 :: CALL PATTERN(#1,136):: P2=P2+1:: IF P1<>7 THEN 1100 ELSE BON=1100*P2-TI :: IF BON<=0 THEN BON=0 :: GOTO 1080
1070 SC=SC+BON :: BON$=STR$(BON):: DISPLAY AT(2,1)SIZE(12):"BONUS "&RPT$("0",6-LEN(BON$))&BON$ :: GOSUB 1030
1080 RESTORE 840 :: FOR T=1 TO 7 :: READ DI,NI :: CALL SOUND(DI,NI,0,NI+1,0):: NEXT T :: TI,FR,P1,P2=0 :: TABL=TABL+1 :: TA=TA+1
1090 IF TA=6 THEN TA=1 :: VIE=VIE+1 :: LE=4 :: GOTO 490 ELSE 490
1100 CALL SPRITE(#27,128,CF,Y-4,X+4,-6,6):: FOR E=1 TO 88 :: NEXT E :: CALL MOTION(#27,8,2):: FOR E=1 TO 88 :: NEXT E
1110 CALL DELSPRITE(#27,#13):: FOR E=1 TO 30 STEP 6 :: CALL SOUND(-100,-7,E):: NEXT E :: SC=SC+200 :: GOSUB 1030 :: FR=0 :: FOR G=3 TO 7 :: CALL COLOR(#G,CM)::NEXT G :: RETURN
1120 CALL COINC(ALL,@):: IF @=0 THEN RETURN ELSE 1130
1130 CALL COLOR(#1,4):: CALL POSITION(#1,YY,XX):: IF YY>=145 THEN 1140 ELSE CALLMOTION(#1,40,0):: GOTO 1130
1140 CALL MOTION(#1,0,0):: CALL LOCATE(#1,161,X):: CALL SOUND(-100,-7,0):: FR=0
1150 FOR RT=1 TO 4 :: CALL PATTERN(#1,136):: FOR T=1 TO 15 :: NEXT T :: CALL PATTERN(#1,140):: FOR T=1 TO 15 :: NEXT T :: NEXT RT
1160 CALL COLOR(#1,16):: Y=161 :: IF X>220 THEN X=220
1170 FOR T=1 TO 10 :: CALL KEY(0,A,B):: IF A=6 THEN 1180 ELSE 1190
1180 RANDOMIZE :: SC$="" :: TA,TABL=1 :: VIE=4 :: LE=8 :: TI,SC,P1,P2=0 :: GOTO 490
1190 NEXT T :: CALL DELSPRITE(#1)
1200 CALL GCHAR(Y/8+2,X/8+1,LL):: CALL HCHAR(Y/8+2,X/8+1,39):: RESTORE 830 :: FOR T=1 TO 11 :: READ D,N :: CALL SOUND(D,N,0,N+1,0):: NEXT T
1210 CALL HCHAR(Y/8+2,X/8+1,LL):: VIE=VIE-1 :: IF VIE=-1 THEN GOSUB 1030 :: GOTO 1230 ELSE CALL DELSPRITE(ALL):: GOTO 850
1220 RETURN
1230 CALL CLEAR :: CALL DELSPRITE(ALL):: FS(5)=SC :: RNOM$(5)=NOM$ :: CALL CHARSET :: FOR T=9 TO 12 :: CALL COLOR(T,9,1,T-4,5,1):: NEXT T
1240 CALL COLOR(2,8,1,3,16,1,4,16,1):: DISPLAY AT(1,9):"PLAYERS SCORES" :: DISPLAY AT(24,10):"GAME OVER"
1250 DISPLAY AT(20,5):"PRESS <REDO> TO PLAY" :: DISPLAY AT(21,11):"<BACK> TO STOP"
1260 FOR E=65 TO 90 STEP 3 :: CALL CHARPAT(E,E$,E+1,EE$,E+2,EF$):: CALL CHAR(E+32,E$,E+33,EE$,E+34,EF$):: NEXT E
1270 CALL CHAR(123,"00000000001818",124,"006CFEFEFE7C381"):: IF SC<FS(4)OR SC=0 THEN 1320
1280 GOSUB 1340 :: RNOM$(5)=NOM$ :: FOR I=0 TO 4 :: FOR J=I+1 TO 5 :: IF FS(J)>FS(I)THEN NOM$=RNOM$(I):: RNOM$(I)=RNOM$(J):: RNOM$(J)=NOM$ :: SC2=FS(I):: FS(I)=FS(J):: GOTO 1300
1290 GOTO 1310
1300 FS(J)=SC2
1310 NEXT J :: NEXT I
1320 FOR I=0 TO 4 :: U$=RNOM$(I):: H$=STR$(FS(I)):: DISPLAY AT(6+I,7):USING "##":STR$(I+1):: DISPLAY AT(6+I,11):RPT$("0",6-LEN(H$))&H$&"...."&U$ :: NEXT I
1330 CALL KEY(0,A,B):: DISPLAY AT(24,10):"GAME OVER" :: IF A=15 THEN END ELSE IF A=6 THEN 320 ELSE DISPLAY AT(24,10):"" :: GOTO 1330
1340 YC=18 :: XC=21 :: A=97 :: NOM$="" :: DISPLAY AT(YC,XC-5)SIZE(4):"NOM:"
1350 CALL JOYST(2,X,Y):: CALL KEY(2,R,B):: N$=CHR$(A):: IF Y=4 THEN A=A-1 :: CALL SOUND(1,1000,0)ELSE IF Y=-4 THEN A=A+1 :: CALL SOUND(1,1500,0)
1360 IF A=125 THEN A=97 ELSE IF A=96 THEN A=124
1370 DISPLAY AT(YC,XC)SIZE(1):N$ :: IF R=18 THEN CALL SOUND(1,880,0):: NOM$=NOM$&N$ :: A=97 :: L=L+1 :: N$="" :: XC=XC+1
1380 IF L=3 THEN L=0 :: RETURN ELSE 1350
1390 PAT=136 :: X=X+8 :: GOTO 910
1400 PAT=140 :: X=X-8 :: GOTO 910
1500 ! BONNE CHANCE A TOUS !
3000 GOTO 3000

 

Note: le jeu se joue nativement avec le joystick N°2. Dans l'émulateur Win994A, le Joystick est émulé à l'aide des touches du pavé numérique, la case "Map Keyboard/Joystick" devant être cochée dans le sous-menu "preference" du menu "File". Hélas, l'émulateur ne sait émuler que le joystick N°1 et pas le N°2.

Pour une raison que je n'explique pas aujourd'hui, j'ai utilisé le Joystick N°2 pour contrôler les mouvements de mon personnage ...  Pour corriger ce problème en utilisant le Joystick n°1, il suffit de changer de paramètre dans CALL JOYST et CALL KEY : En lignes 470, 900 et 1350, remplacez la valeur "2" par "1".

Télécharger une image disque contenant le programme: ici



Contenu de ce site ©1999-2019 Fabrice Montupet