semestralka
[mirrors/Programs.git] / turbobasic / 1998 / CH-CH.BAS
CommitLineData
0f95cc4b
H
1 GOTO POKR\r
2\r
3POKR :\r
4SCREEN 8 : CLS\r
5COLOR 14,1\r
6RESTORE BARVY\r
7BARVY :\r
8\r
9 DATA 8,7,15,15,7,8,0,8,7,15,15,7,8,0,8,7,15,15,7,8,0,0,8,8,8,8,8,7,7,7,7,7,7,15,15,15,15,15,7,7,7,7,7,8,8,8,8,8,8,8,8,8,\r
10FOR A=1 TO 52\r
11 READ C\r
12 LINE (A,A)-(640-A,A),C\r
13 LINE (A,106-A)-(640-A,106-A),C\r
14 LINE (A,A)-(A,106-A),C\r
15 LINE (640-A,A)-(640-A,106-A),C\r
16 LINE (A,110+A)-(640-A,110+A),C\r
17 LINE (A,200-A)-(640-A,200-A),C\r
18 LINE (A,110+A)-(A,200-A),C\r
19 LINE (640-A,110+A)-(640-A,200-A),C\r
20NEXT A\r
21\r
22DO\r
23 A$="TELEFON DIR exit HELP LOAD "\r
24 D=5:X=5:Y=17:C=14\r
25 GOSUB MENU\r
26 ON MENU GOSUB TELEFON,DIR,KONEC,HELP,LOAD\r
27LOOP\r
28\r
29'-----------------------------------------------------------------------------\r
30TELEFON :\r
31print "ahoj"\r
32RETURN\r
33'-----------------------------------------------------------------------------\r
34DIR :\r
35CALL ANYKEY\r
36CALL CLWD\r
37RETURN\r
38RETURN\r
39'-----------------------------------------------------------------------------\r
40KONEC :\r
3921785c 41print "stlač klávesu Enter"\r
0f95cc4b
H
42end\r
43'-----------------------------------------------------------------------------\r
44HELP :\r
45A$="Jste uzivatelem pocitacove site C&P NETWORK. Jste vybaven harddiskem se"\r
46CALL ECHO (5,16,A$,13)\r
47A$="softwarovym vybavenim. Mate k dispozici modem, takze muzete navazat"\r
48CALL ECHO (7,17,A$,13)\r
49A$="spojeni s jinym uzivatelem C&P NETWORK."\r
50CALL ECHO (7,18,A$,13)\r
51\r
52\r
53CALL ANYKEY\r
54CALL CLWD\r
55RETURN\r
56'-----------------------------------------------------------------------------\r
57LOAD :\r
58FOR R=0 TO 4000\r
59NEXT R\r
60CLS\r
61COLOR 14,1\r
62FOR A=0 TO 2000\r
63Q=RND*55\r
64T=RND*55\r
65CIRCLE (Q,T),50\r
66FOR L=0 TO 5000\r
67NEXT L\r
68NEXT A\r
69LOCATE 8,23\r
70PRINT " KONEC "\r
71STOP\r
72'-----------------------------------------------------------------------------\r
73\r
74\r
75END\r
76'-----------------------------------------------------------------------------\r
77' podprogram ECHO\r
78' postupny tisk textu obsazeneho v retezcove promenne A$\r
79' na souradnice X a Y\r
80' barvou C\r
81\r
82SUB ECHO(X,Y,A$,C)\r
83 COLOR C\r
84 LOCATE Y,X\r
85 FOR A=1 TO LEN(A$)\r
86 PRINT MID$ (A$,A,1);\r
87 SOUND 1200,.2\r
88 SOUND 900,.2\r
89 SOUND 600,.2\r
90 FOR I=1 TO 200\r
91 NEXT I\r
92 NEXT A\r
93END SUB\r
94\r
95'--------------------------------------------------------------------------\r
96\r
97MENU :\r
98 ' PODPROGRAM 'MENU'\r
99\r
100 ' X a Y jsou textove souradnice menu-okna\r
101 ' A$ obsahuje text okna\r
102 ' D je pocet polozek (radku) v menu\r
103 ' W=1 - pouze vypis okna , W=0 - vypis i vyber z menu\r
104 ' C je barva okna\r
105 ' v promenne MENU podprogram vraci cislo zvolene polozky\r
106\r
107 L=LEN (A$)/D : MENU = 1 : M = MENU+.0001\r
108 COLOR C,9:LOCATE Y,X\r
109 PRINT CHR$(201);\r
110 FOR A=1 TO L+2 : PRINT CHR$(205); : NEXT A\r
111 PRINT CHR$ (187);\r
112 FOR A= 1 TO LEN(A$) STEP L\r
113 LOCATE Y+A/L+1,X\r
114 PRINT CHR$(186);" ";MID$(A$,A,L);" ";CHR$(186);\r
115 NEXT A\r
116 LOCATE Y+A/L+1,X: PRINT CHR$(200);\r
117 FOR A=1 TO L+2 : PRINT CHR$(205); : NEXT A\r
118 PRINT CHR$(188);\r
119 IF W=1 THEN W=0 : RETURN\r
120\r
121 DO\r
122 I$ = INKEY$\r
123 IF LEN(I$)=2 THEN IF ASC(MID$(I$,2,1))=72 THEN MENU = MENU - 1\r
124 IF LEN(I$)=2 THEN IF ASC(MID$(I$,2,1))=80 THEN MENU = MENU + 1\r
125 IF MENU < 1 THEN MENU = D\r
126 IF LEN(I$)=1 THEN IF ASC(I$)=13 THEN EXIT LOOP\r
127 IF MENU > D THEN MENU = 0 : EXIT LOOP \r
128 IF MENU <> M THEN LOCATE Y+M,X+L+2 : PRINT " ";:LOCATE Y+M,X+1 : PRINT " ";\r
129 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
130 M = MENU\r
131 LOOP\r
132 I=MENU\r
133 W=1:C=0:GOSUB MENU\r
134 MENU = I : COLOR 15\r
135RETURN\r
136'-----------------------------------------------------------------------------\r
137SUB CLWD\r
138 'Clear window\r
139 FOR A=120 TO 190\r
140 LINE (8,A)-(632,A),0\r
141 NEXT A\r
142END SUB\r
143'-----------------------------------------------------------------------------\r
144SUB ANYKEY\r
145 DO\r
146 IF INKEY$<>"" THEN EXIT LOOP\r
147 C=C+1:IF C>15 THEN C=1\r
148 COLOR C : LOCATE 24,55:PRINT "STLAC LIBOVOLNOU KLAVESU";\r
149 LOOP\r
150END SUB\r
151'-----------------------------------------------------------------------------\r
152\r
3921785c 153\1a\r
This page took 0.297982 seconds and 4 git commands to generate.