Hebdogiciel n°87

Note: L'EXL100 ne pouvant charger la totalité de ce programme en mémoire, 3D Teuf Teuf est scindé en deux programmes «3DTEUFTEUF0.BAS» et «3DTEUFTEUF1.BAS». Le listing a été adapté pour une utilisation sur disquette. Exécutez le premier programme, la seconde partie se lancera automatiquement.

1ER LISTING:

150 ! (C) MEYNADIER L. 1985
160 ! 3D TEUF TEUF
170 !
PARTIE 1
180 CALL RAZ:CALL DEF:CLS "Bbb":DIM A(60),B(60),E(60),F(60)
190 CALL HRON("B",1,18):RANDOMIZE
200 ! DATA LINE
210 DATA 25,10,40,15,40,15,30,20,30,20,40,25,40,25,25,30,45,10,60,20,60,20
220 DATA 60,25,60,25,45,30,45,30,45,10,80,10,100,10,90,10,90,30,120,10,105,15
230 DATA 105,15,105,25,105,25,120,30,105,20,115,20,130,10,130,25,130,25,135,30
240 DATA 135,30,145,30,145,30,150,25,150,25,150,10,170,10,155,10,155,10,155,30
250 DATA 155,20,160,20,175,20,185,20,190,10,210,10,200,10,200,30,230,10,215,15
260 DATA 215,15,215,25,215,25,230,30,215,20,225,20,240,10,240,25,240,25,245,30
270 DATA 245,30,255,30,255,30,260,25,260,25,260,10,280,10,265,10,265,10,265,30
280 DATA 265,20,270,20,1,40,150,60,150,60,150,80,150,80,0,179,319,40,170,60
290 DATA 170,60,170,80,170,80,319,179,130,57,130,93,105,55,105,110,75,50,75,130
300 DATA 40,45,40,155,190,57,190,93,215,55,215,110,245,50,245,130,280,45,280,155
310 FOR Y=1 TO 51:READ A(Y),B(Y),E(Y),F(Y):NEXT
320 O$="R":FOR Y=1 TO 51:CALL LINE(O$,A(Y),B(Y),E(Y),F(Y))
330 IF Y=37 THEN O$="B"
340 NEXT:CALL TEUF(27)
350 CALL EXP(3):CALL EXP(35)
360 CALL COLOR("0Cb"):LOCATE (19,1)
370 PRINT "Voulez-vous les regles"
380 LOCATE (20,7):PRINT "[O/N] ?"
389 A$=KEY$:IF A$="O" THEN 410
392 IF A$="N" THEN CALL HROFF ELSE 389:CALL DEF:CLS "RGG":CALL SPEECH("A,")
393 PRINT "JE CHARGE LA SUITE DU JEU"
395 CALL DOS("LOADRUN 3DTEUFTEUF1.BAS"):END
410 CALL SPEECH("A,"):CALL HROFF:CALL ECR(2,"3D TEUF TEUF")
420 CALL ECR(4,"(C) MEYNADIER Ludovic 1985")
430 CALL ECR(6,"VOUS AVEZ PARIE AVEC UN COPAIN")
440 CALL ECR(7,"QUE VOUS FRANCHIRIEZ UN TUNNEL PLEIN")
450 CALL ECR(8,"D'EMBUCHES SANS LE MOINDRE INCIDENT.")
460 CALL ECR(9,"CELA PEUT PARAITRE SIMPLE,MAIS")
470 CALL ECR(10,"LE TUNNEL FAIT 50 KMS DE LONG,")
480 CALL ECR(11,"ET VOUS ETES A BORD D'UN VIEUX")
490 CALL ECR(12,"TACOT RECALCITRANT.")
500 CALL ECR(14,"VOUS POUVEZ UTILISER LES TOUCHES:")
510 CALL ECR(15,"- ^ POUR ACCELERER")
520 CALL ECR(16,"- "&CHR$(14)&" POUR RALENTIR")
530 CALL ECR(17,"   - -> POUR ALLER A DROITE")
540 CALL ECR(18,"   - <- POUR ALLER A GAUCHE")
550 CALL ECR(20,"VOTRE VITESSE MINIMUM EST DE 10 KM/H ")
560 CALL ECR(21,"ET VOTRE VITESSE MAXIMUM EST DE 100 KM/H")
570 CALL ECR(22,"TAPER SUR UNE TOUCHE ")
580 A$=KEY$:CLS "RGG":CALL DEF:GOTO 393
590 ! DEF --> DEFINITION CARACTERES
600 SUB DEF:! TACOT(65-78)
610 CALL CHAR(65,"FFC0404040404040474A")
620 CALL CHAR(66,"FF030202020202028242")
630 CALL CHAR(68,"4A535F4949474242417F")
640 CALL CHAR(69,"42E222424282020202FE")
650 CALL CHAR(67,"00000000000007070202")
660 CALL CHAR(70,"000000000000E0E0404")
670 CALL CHAR(71,"0306748C043434343434")
680 CALL CHAR(72,"C0031C30684482818181")
690 CALL CHAR(73,"03C038040E1221418181")
700 CALL CHAR(74,"C0602E31202C2C2C2C2C")
710 CALL CHAR(75,"74747C7472323231303")
720 CALL CHAR(76,"82844870201807807F")
730 CALL CHAR(77,"4121120E0C18E001FE")
740 CALL CHAR(78,"2E2E3E2E4E4C4C8C0C0C")
750 ! FUMEE (79-84)
760 CALL CHAR(79,"0000000102050C10007E")
770 CALL CHAR(80,"000662900608")
780 CALL CHAR(81,"000000C0203008C42412")
790 CALL CHAR(82,"003F0001")
800 CALL CHAR(83,"00041801E01C03")
810 CALL CHAR(84,"120284041810F0C")
820 ! EXPLOSION (48-54)
830 CALL CHAR(48,"0000000101010101080C")
840 CALL CHAR(49,"000002020286864AAAB2")
850 CALL CHAR(50,"000000000000102060A7")
860 CALL CHAR(51,"0B6B392010D07423E221")
870 CALL CHAR(52,"13020010929FE28")
880 CALL CHAR(53,"4A740F00018281A04043")
890 CALL CHAR(54,"0000F0408000FC10E")
900 SUBEND
910 ! RAZ -->REMISE A ZERO CARACTERES
920 SUB RAZ
930 FOR Y=0 TO 127
940 CALL CHAR(Y,"0"):NEXT:SUBEND
950 ! TEUF --> AFF. TACOT
960 SUB TEUF(Q)
970 CALL COLOR("1Bb")
980 LOCATE (19,Q):PRINT " AB"
990 LOCATE (20,Q):PRINT "CDEF"
1000 LOCATE (21,Q):PRINT "GHIJ"
1010 LOCATE (22,Q):PRINT "KLMN"
1020 ! ECH --> FUMEE D'ECHAPPEMENT
1030 CALL COLOR("1BbF")
1040 LOCATE (21,Q+4):PRINT "OPQ"
1050 LOCATE (22,Q+4):PRINT "RST"
1060 CALL SPEECH("R,60A0BD0612450AF05A3FF7FC"):SUBEND
1070 ! EXP --> EXPLOSION
1080 SUB EXP(Q):CALL COLOR("1RbF")
1090 LOCATE (19,Q):PRINT "    "
1100 LOCATE (20,Q):PRINT "    "
1110 LOCATE (21,Q):PRINT "012 "
1120 LOCATE (22,Q):PRINT "3456":SUBEND
1130 ! ECR --> FORMATAGE ECRITURE
1140 SUB ECR(Q,Q$):CALL COLOR("0Cb")
1150 Q1=INT((42-LEN(Q$))/2):LOCATE (Q,Q1):PRINT Q$:SUBEND

 

2EME LISTING:

1 !
2 !  (C) MEYNADIER L. 1985
3 !       PARTIE 2
4 !
5 ! CHARGER CE PROGRAMME APRES AVOIR
6 ! CHARGE LA PARTIE 1 OU SE TROUVE
7 ! LA PRESENTATION, LA REGLE DU JEU
8 ! ET LES DEF. DE CARACTERES
9 !
10 ! TABLEAU DE VARIABLE
11 !
12 ! C,D      CALL KEY1
13 ! U        DEFILEMENT
14 ! Z        CHOIX D'OBSTACLE
15 ! DIST     DISTANCE
16 ! VIT      VITESSE
17 ! SC       SCORE
18 ! POSE     PAUSE
19 !
20 CLS "Cbb":RANDOMIZE:!INIT. 2e PARTIE
21 ! RAPPEL :
22 !   LES LIGNES COMMENCANT PAR !
23 !   NE SONT PAS OBLIGATOIRES
24 !
25 ! DONNEES DE DEPART
26 !
27 SC=0:POSE=.5:Z=5:DIST=50:U=1
28 CALL HRON("b",3,16):XT=15
29 CALL LINE("M",24,1,149,50):CALL LINE("M",306,1,171,50)
30 !
31 ! DEBUT JEU
32 !
33 CALL KEY1(C,D):VIT=(1-POSE)*100
34 !
35 ! CALCUL DISTANCE
36 !
37 DIST=DIST-((1-POSE)/10)
38 CALL TEUF(XT):PAUSE POSE/2
39 CALL ECR(1," VOUS ROULEZ A "&STR$(VIT)&" KM/H  ")
40 CALL ECR(2," ET IL VOUS RESTE "&STR$(INT(DIST))&" KMS ")
41 !
42 ! DEPLACEMENT TACOT
43 !
44 IF C=128 AND POSE>0 THEN POSE=POSE-.1
45 IF C=79 AND XT<28 AND POSE>0 THEN POSE=POSE-.1:XT=XT+2
46 IF C=129 AND XT<28 THEN XT=XT+2
47 IF C=72 AND XT<28 AND POSE<.9 THEN POSE=POSE+.1:XT=XT+2
48 IF C=130 AND POSE<.9 THEN POSE=POSE+.1
49 IF C=60 AND XT>5 AND POSE<.9 THEN POSE=POSE+.1:XT=XT-2
50 IF C=131 AND XT>5 THEN XT=XT-2
51 IF C=84 AND XT>5 AND POSE>0 THEN POSE=POSE-.1:XT=XT-2
52 IF U>3 THEN GOSUB 63:! INIT. OBSTACLE
53 !
54 ! ENVOI EN S.P OBSTACLE
55 !
56 ON Z GOSUB 72,84,96,109,57,57
57 GOSUB 145:U=U+1:! S.P DEFILEMENT
58 IF DIST<.01 THEN 121:! S.P FIN
59 GOTO 33
60 ! INIT. OBSTACLE (n.1 a 4)
61 !
62 !
63 Z=INTRND(6):U=1
64 IF Z=1 THEN T1=150:T2=75:T4=100
65 IF Z=2 THEN T2=75:T3=170:T4=100
66 IF Z=3 THEN T1=150:T2=80:T3=170:T4=100
67 IF Z=4 THEN T2=110:T3=220:T4=120
68 RETURN
69 !
70 ! MUR ELECTROMAGNETIQUE GAUCHE
71 !
72 FOR Y=T1 TO 160 STEP 5
73 CALL LINE("B",Y,T2,Y,T4):NEXT
74 T1=T1-70:T2=T2-9:T4=T4+25
75 IF U=3 THEN 77
76 RETURN
77 FOR Y=10 TO 160 STEP 5
78 CALL LINE("b",Y,57,Y,150):NEXT
79 IF XT<18 THEN CALL EXP(XT):PAUSE 1:GOTO 121
80 RETURN
81 !
82 ! MUR ELEC. DROIT
83 !
84 FOR Y=160 TO T3 STEP 5
85 CALL LINE("B",Y,T2,Y,T4):NEXT
86 T2=T2-9:T3=T3+70:T4=T4+25
87 IF U=3 THEN 89
88 RETURN
89 FOR Y=160 TO 310 STEP 5
90 CALL LINE("b",Y,57,Y,150):NEXT
91 IF XT>18 THEN CALL EXP(XT):PAUSE 1:GOTO 121
92 RETURN
93 !
94 ! OBS. DIT DE TOILE D'ARAIGNEE
95 !
96 CALL LINE("R",T1,T2,T3,T4)
97 CALL LINE("R",T1,T4,T3,T2)
98 T1=T1-10:T2=T2-10:T3=T3+10:T4=T4+10
99 IF U=3 THEN 101
100 RETURN
101 PAUSE .1
102 CALL LINE("b",130,60,190,120)
103 CALL LINE("b",130,120,190,60)
104 IF XT>14 AND XT<21 THEN CALL EXP(XT):PAUSE 1:GOTO 121
105 RETURN
106 !
107 ! BARRIERE ELEC.
108 !
109 FOR Y=T2 TO T4 STEP 5
110 CALL LINE("G",160,Y,T3,Y):NEXT
111 T2=T2-10:T3=T3+15:T4=T4+15
112 IF U=3 THEN 114
113 RETURN
114 FOR Y=90 TO 150 STEP 5
115 CALL LINE("b",160,Y,250,Y):NEXT
116 IF XT>18 THEN CALL EXP(XT):PAUSE 1:GOTO 121
117 RETURN
118 !
119 ! S.P FIN
120 !
121 CALL HROFF:CLS "MbW"
122 SC=INT((VIT+(50-DIST))*7+U)
123 CALL ECR(5,"SCORE : "&STR$(SC)&" pts")
124 IF SC>RE THEN RE=SC
125 CALL ECR(9,"RECORD : "&STR$(RE)&" pts")
126 DIST=50-DIST
127 !
128 ! QUALITE DU JOUEUR
129 !
130 IF SC<500 THEN Q$="VRAIMENT NUL !!!"
131 IF SC>499 AND SC<750 THEN Q$="MAUVAIS"
132 IF SC>749 AND SC<900 THEN Q$="MOYEN"
133 IF SC>899 AND SC<1000 THEN Q$="PRESQUE BON"
134 IF SC>999 AND SC<1200 THEN Q$="C'EST BON"
135 IF SC>1199 AND SC<1400 THEN Q$="SUPER"
136 IF SC>1399 THEN Q$="VOUS ETES UN AS DU VOLANT"
137 CALL ECR(14,"DISTANCE PARCOURUE : "&STR$(DIST)&" KMS")
138 CALL ECR(18,Q$)
139 CALL ECR(21,"VOULEZ-VOUS REJOUER (O/N) ?")
140 A$=KEY$:IF A$="O" THEN 20
141 IF A$="N" THEN CLS "BCC":END ELSE 140
142 !
143 ! DEFILEMENT HAUT ECRAN
144 !
145 ON U GOTO 149,159,169
146 !
147 ! PHASE 1
148 !
149 CALL LINE("R",150,50,170,50)
150 CALL LINE("R",75,20,255,20)
151 CALL LINE("b",125,40,195,40)
152 CALL LINE("b",100,30,220,30)
153 CALL LINE("b",50,10,280,10)
154 CALL LINE("b",25,1,305,1)
155 RETURN
156 !
157 ! PHASE 2
158 !
159 CALL LINE("R",125,40,195,40)
160 CALL LINE("R",50,10,280,10)
161 CALL LINE("b",150,50,170,50)
162 CALL LINE("b",75,20,255,20)
163 CALL LINE("b",100,30,220,30)
164 CALL LINE("b",25,1,305,1)
165 RETURN
166 !
167 ! PHASE 3
168 !
169 CALL LINE("R",100,30,220,30)
170 CALL LINE("R",25,1,305,1)
171 CALL LINE("b",150,50,170,50)
172 CALL LINE("b",125,40,195,40)
173 CALL LINE("b",75,20,255,20)
174 CALL LINE("b",50,10,280,10)
175 RETURN
176 !
177 ! TEUF --> AFF. TACOT
178 !
179 SUB TEUF(Q)
180 CALL COLOR("1Bb"):
181 LOCATE (19,Q):PRINT "   AB  "
182 LOCATE (20,Q):PRINT "  CDEF  "
183 LOCATE (21,Q):PRINT "  GHIJ"
184 LOCATE (22,Q):PRINT "  KLMN"
185 CALL COLOR("1BbF")
186 LOCATE (21,Q+6):PRINT "OPQ  "
187 LOCATE (22,Q+6):PRINT "RST  "
188 SUBEND
189 !
190 ! EXP --> EXPLOSION
191 !
192 SUB EXP(Q):CALL COLOR("1RbF")
193 EX1$="L,0BA02163031B18008D1E139840073A108100F0901E81080480478F0844200205"
194 EX2$="70CEBD02110840704E118840043CE0010F78C00316B080052C20010948800214A0"
195 EXP$=EX1$&EX2$&"000528"
196 CALL SPEECH(EXP$)
197 LOCATE (19,Q):PRINT "         "
198 LOCATE (20,Q):PRINT "         "
199 LOCATE (21,Q):PRINT "  012     "
200 LOCATE (22,Q):PRINT "  3456    ":SUBEND
201 !
202 ! ECR --> FORMATAGE ECRITURE
203 !
204 SUB ECR(Q,Q$):CALL COLOR("0Cb")
205 Q1=INT((42-LEN(Q$))/2):LOCATE (Q,Q1):PRINT Q$:SUBEND
206 !
207 ! SCORE A BATTRE :730 PTS
208 !
209 ! BONNE CHANCE ......
210 !


Ce listing est uniquement proposé pour un usage privé.
Sans accord écrit préalable, vous n'êtes pas autorisé à le distribuer, le transmettre ou le rediffuser.