Removed some stupid .part file and added such files to .gitignore
[mirrors/Programs.git] / turbobasic / 1998 / TELEFON1.BAS
... / ...
CommitLineData
1start:\r
2CLS\r
3COLOR 14,1\r
4SCREEN 0\r
5LOCATE 2,2\r
6INPUT " ZADEJTE VSTUPNÍ PIN " ;A\r
7IF A<>4545 THEN START\r
8\r
9 GOTO POKR\r
10\r
11POKR :\r
12CLS\r
13SCREEN 8 : CLS\r
14COLOR 14,1\r
15RESTORE BARVY\r
16BARVY :\r
17\r
18 DATA 8,7,15,15,7,8\r
19FOR A=1 TO 6\r
20 READ C\r
21 LINE (A,A)-(640-A,A),C\r
22 LINE (A,106-A)-(640-A,106-A),C\r
23 LINE (A,A)-(A,106-A),C\r
24 LINE (640-A,A)-(640-A,106-A),C\r
25 LINE (A,110+A)-(640-A,110+A),C\r
26 LINE (A,200-A)-(640-A,200-A),C\r
27 LINE (A,110+A)-(A,200-A),C\r
28 LINE (640-A,110+A)-(640-A,200-A),C\r
29NEXT A\r
30\r
31DO\r
32 A$="POZDRAV1 POMOC2 TELEFON3 HELP4 ESC Q"\r
33 D=5:X=5:Y=17:C=14\r
34 GOSUB MENU\r
35 ON MENU GOSUB TELEFON,DIR,LOAD,HELP,KONEC\r
36LOOP\r
37\r
38'-----------------------------------------------------------------------------\r
39TELEFON :\r
40print "HLAVNE KDYZ POZDRAVITE:DOBRY DEN TADY----- -----."\r
41RETURN\r
42'-----------------------------------------------------------------------------\r
43DIR :\r
44LOCATE 8,23\r
45PRINT "PRAVE STE SE DOVOLALI NA TEL.Č.:158"\r
46LOCATE 10,10\r
47print "TADY POLICIE H.L.M.PRAHY"\r
48RETURN\r
49'-----------------------------------------------------------------------------\r
50KONEC :\r
51print "stlač klávesu*ENTER*"\r
52END\r
53'-----------------------------------------------------------------------------\r
54HELP :\r
55A$="ZKOUSKA OVLADANI TELEFONU"\r
56CALL ECHO (5,16,A$,13)\r
57A$="STISKNĚTE TELEFON1 NEBO POMOC"\r
58CALL ECHO (7,17,A$,13)\r
59A$="VIDITE UŽ TELEFONUJETE PO SITI MUDRUŇKANET"\r
60CALL ECHO (7,18,A$,13)\r
61\r
62\r
63CALL ANYKEY\r
64CALL CLWD\r
65RETURN\r
66'-----------------------------------------------------------------------------\r
67LOAD :\r
68PRINT " DOBRY DEN DOVOLALI JSTE SE NA TEL.:56 18 243 "\r
69LOCATE 9,23\r
70PRINT " TADY TOMAS MUDRUNKA "\r
71\r
72\r
73RETURN\r
74'-----------------------------------------------------------------------------\r
75\r
76\r
77END\r
78'-----------------------------------------------------------------------------\r
79' podprogram ECHO\r
80' postupny tisk textu obsazeneho v retezcove promenne A$\r
81' na souradnice X a Y\r
82' barvou C\r
83\r
84SUB ECHO(X,Y,A$,C)\r
85 COLOR C\r
86 LOCATE Y,X\r
87 FOR A=1 TO LEN(A$)\r
88 PRINT MID$ (A$,A,1);\r
89 SOUND 1200,.2\r
90 SOUND 900,.2\r
91 SOUND 600,.2\r
92 FOR I=1 TO 200\r
93 NEXT I\r
94 NEXT A\r
95END SUB\r
96\r
97'--------------------------------------------------------------------------\r
98\r
99MENU :\r
100 ' PODPROGRAM 'MENU'\r
101\r
102 ' X a Y jsou textove souradnice menu-okna\r
103 ' A$ obsahuje text okna\r
104 ' D je pocet polozek (radku) v menu\r
105 ' W=1 - pouze vypis okna , W=0 - vypis i vyber z menu\r
106 ' C je barva okna\r
107 ' v promenne MENU podprogram vraci cislo zvolene polozky\r
108\r
109 L=LEN (A$)/D : MENU = 1 : M = MENU+.0001\r
110 COLOR C,9:LOCATE Y,X\r
111 PRINT CHR$(201);\r
112 FOR A=1 TO L+2 : PRINT CHR$(205); : NEXT A\r
113 PRINT CHR$ (187);\r
114 FOR A= 1 TO LEN(A$) STEP L\r
115 LOCATE Y+A/L+1,X\r
116 PRINT CHR$(186);" ";MID$(A$,A,L);" ";CHR$(186);\r
117 NEXT A\r
118 LOCATE Y+A/L+1,X: PRINT CHR$(200);\r
119 FOR A=1 TO L+2 : PRINT CHR$(205); : NEXT A\r
120 PRINT CHR$(188);\r
121 IF W=1 THEN W=0 : RETURN\r
122\r
123 DO\r
124 I$ = INKEY$\r
125 IF LEN(I$)=2 THEN IF ASC(MID$(I$,2,1))=72 THEN MENU = MENU - 1\r
126 IF LEN(I$)=2 THEN IF ASC(MID$(I$,2,1))=80 THEN MENU = MENU + 1\r
127 IF MENU < 1 THEN MENU = D\r
128 IF LEN(I$)=1 THEN IF ASC(I$)=13 THEN EXIT LOOP\r
129 IF MENU > D THEN MENU = 0 : EXIT LOOP \r
130 IF MENU <> M THEN LOCATE Y+M,X+L+2 : PRINT " ";:LOCATE Y+M,X+1 : PRINT " ";\r
131 IF MENU <> M THEN LOCATE Y+MENU,X+L+2:COLOR 11:PRINT CHR$(174);:LOCATE Y+MENU,X+1:PRINT CHR$(175);:COLOR C\r
132 M = MENU\r
133 LOOP\r
134 I=MENU\r
135 W=1:C=0:GOSUB MENU\r
136 MENU = I : COLOR 15\r
137RETURN\r
138'-----------------------------------------------------------------------------\r
139SUB CLWD\r
140 'Clear window\r
141 FOR A=120 TO 190\r
142 LINE (8,A)-(632,A),0\r
143 NEXT A\r
144END SUB\r
145'-----------------------------------------------------------------------------\r
146SUB ANYKEY\r
147 DO\r
148 IF INKEY$<>"" THEN EXIT LOOP\r
149 C=C+1:IF C>15 THEN C=1\r
150 COLOR C : LOCATE 24,55:PRINT "STLAC LIBOVOLNOU KLAVESU";\r
151 LOOP\r
152END SUB\r
153'-----------------------------------------------------------------------------\r
154\r
155\1a
This page took 0.326332 seconds and 4 git commands to generate.