9 REM Inicjalizacja programu, ustawien
ie generatora znakow, wyswietlenie lud
zi na dole ekranu
10 GOSUB 1100:GOSUB 1000
15 D1=0:SC=0:SL=5
20 GRAPHICS 0:POKE 756,R:POKE 752,1:SE
TCOLOR 2,0,0:S=32:D=-1:P1=6:P2=0
25 FOR I=21 TO 23:POSITION 0,I:PRINT "
f";:POSITION 38,I:PRINT "f";:NEXT I
29 REM Rysowanie ladowiska i meteorow
w Kosmosie
30 L=INT(23*RND(1)+5):POSITION L,21:PR
INT " ":POSITION L-1,22:PRINT "
":POSITION L-2,23:PRINT " ";:B=0
:G=0
40 FOR I=1 TO D1*10+30:POSITION RND(1)
*35+1,RND(1)*15+3:PRINT CHR$(20);:NEXT
I:POKE 77,0:SCORE=SC
43 FOR W=4 TO 0 STEP -1:DIGIT=INT(SCOR
E/10):POSITION L+W-1,23:PRINT CHR$(SCO
RE-10*DIGIT+176);:SCORE=DIGIT:NEXT W
45 FOR AZ=1 TO SL:FOR W=15 TO 0 STEP -
1:SOUND 0,10,10,W:NEXT W:SOUND 0,0,0,0
:NEXT AZ
49 REM Przesuniecie statku-bazy
50 S=S+D
60 POSITION S-1,0:PRINT " \___/
";CHR$(97);CHR$(98);CHR$(99);" ---"
;:IF S<4 OR S>31 THEN D=-D
65 IF STRIG(0)=0 THEN GOTO 80
70 FOR W=1 TO 25:NEXT W:GOTO 50
80 POSITION S+2,2:PRINT " ":FOR W=1 TO
50:NEXT W:POSITION S,2:PRINT "- -":X
=S+2:Y=1
99 REM Sprawdzenie czy gracz uczynil r
uch
100 U=0:X1=X:P=STICK(0):IF P<12 AND Y>
1.5 THEN GOSUB 300
120 Y1=Y+1:P=STRIG(0):IF P=0 THEN Y1=Y
+0.5
129 REM Sprawdzenie kolizji
130 FOR I=X1-1 TO X1+1:LOCATE I,Y1,A:I
F A=20 OR A=160 THEN GOTO 500
133 IF B=20 OR B=160 THEN GOTO 500
135 NEXT I
139 REM Przesuniecie rakiety
140 POSITION X-1,Y:PRINT " ":POSITIO
N X,Y+1:PRINT " ":X=X1:Y=Y1:POSITION X
-1,Y:PRINT "abc"
145 LOCATE X,Y+1,B:IF P=0 THEN POSITIO
N X,Y+1:PRINT "d":SOUND 1,20,8,15
147 IF P=1 THEN SOUND 1,0,0,0
149 REM Sprawdzenie poprawnego ladowan
ia
150 TEMP=0:IF X=L+1 AND INT(Y+0.5)=20
THEN POSITION X,Y+1:PRINT CHR$(160):SC
=SC+50:SCORE=SC:TEMP=1
153 IF TEMP=1 THEN FOR W=4 TO 0 STEP -
1:DIGIT=INT(SCORE/10):POSITION L+W-1,2
3:PRINT CHR$(SCORE-10*DIGIT+176);
154 IF TEMP=1 THEN SCORE=DIGIT:NEXT W:
GOTO 400
155 IF Y>20 THEN GOTO 500
160 GOTO 100
199 REM Skasowanie starych meteorow i
rysowanie nowych
200 X=L+1:Y=20:COLOR 32:FOR I=3 TO 18:
PLOT 1,I:DRAWTO 37,I:NEXT I
205 FOR I=1 TO D1*15+40:POSITION RND(1
)*35+1,RND(1)*15+3:PRINT CHR$(20);:NEX
T I:C=0
207 POSITION L,21:PRINT " "
209 REM Startowanie rakiety w Kosmos
210 SOUND 0,5*Y+90,8,8:X1=X:Y1=Y:P=STI
CK(0):IF P<12 THEN GOSUB 300
220 C=C+1:IF C=3 THEN C=0:Y1=Y-1
224 REM Sprawdzenie kolizji
225 FOR I=X1-1 TO X1+1:LOCATE I,Y1,A:I
F A=20 THEN GOTO 500
227 NEXT I
229 REM Przesuniecie rakiety i sprawdz
enie ruchu gracza
230 POSITION X-1,Y:PRINT " ":POSITIO
N X,Y+1:PRINT " ";:X=X1:Y=Y1:POSITION
X-1,Y:PRINT "abc":POSITION X,Y+1:PRINT
"d";
240 IF STRIG(0)=0 AND G=0 AND Y>4 THEN
GOSUB 340
250 IF G=1 THEN GOSUB 350
255 IF Y=1 THEN GOTO 270
260 GOTO 210
269 REM Sprawdzenie czy rakieta szczes
liwie laduje na statku-bazie
270 IF X<>S+2 THEN GOTO 500
275 P2=P2+1
280 SOUND 0,0,0,0:POSITION S,2:PRINT "
--- ":COLOR 32:FOR I=3 TO 23:PLOT 1,I
:DRAWTO 37,I:NEXT I
284 REM Czy wszyscy ludzie zabrani z p
lanety, zwiekszenie poziomu i skok do
obslugi procedury BONUS
285 IF P1=0 THEN P1=6:D1=D1+1:GOTO 650
290 GOTO 30
299 REM Podprogram do przesuniecia rak
iety
300 IF P>8 AND P<12 AND X>2 THEN X1=X-
1
310 IF P<8 AND X<36 THEN X1=X+1
320 RETURN
339 REM Laser
340 G=1:XM=X:YM=Y:FOR I=10 TO 100 STEP
10:SOUND 1,I,10,10:NEXT I:SOUND 1,0,0
,0
349 REM Przesuniecie pocisku i sprawdz
enie kolizji z meteorem
350 POSITION XM,YM:PRINT " ";:YM=YM-1
360 LOCATE XM,YM,A:TEMP=0:IF A=20 THEN
POSITION XM,YM:PRINT " ";:G=0:SC=SC+2
0:SCORE=SC:TEMP=1
365 IF TEMP=1 THEN FOR W=4 TO 0 STEP -
1:DIGIT=INT(SCORE/10):POSITION L+W-1,2
3:PRINT CHR$(SCORE-10*DIGIT+176);:RETU
RN
370 POSITION XM,YM:PRINT "|":IF YM<4 T
HEN POSITION XM,YM:PRINT " ":G=0
380 RETURN
399 REM Poprawne ladowanie na planecie
, czlowiek biegnie do rakiety
400 SOUND 1,0,0,0:Y=27-P1:X=38:X1=34:X
2=L+5:IF P1<4 THEN Y=24-P1:X=0:X1=1:X2
=L-3
410 FOR I=1 TO 8:FOR J=101 TO 103:POSI
TION X,Y:PRINT CHR$(J);:FOR W=1 TO 30:
NEXT W:NEXT J
420 POSITION X1,Y:PRINT "OJEJ";:IF I/A
=INT(I/2) THEN POSITION X1,Y:? " ";
430 NEXT I:POSITION X,Y:PRINT " ";
440 FOR I=X+SGN(X1-X) TO X2 STEP SGN(X
2-X)
450 FOR J=101 TO 103 STEP 2:POSITION I
,23:PRINT CHR$(J);:FOR W=1 TO 20:NEXT
W
455 SOUND 0,90,8,15:SOUND 0,0,0,0:NEXT
J:POSITION I,23:PRINT " ";:NEXT I
460 X=I+SGN(X1-X2):Y=23:FOR I=1 TO 2:X
=X+SGN(L-X1):Y=Y-1
465 FOR J=101 TO 103 STEP 2:POSITION X
,Y:PRINT CHR$(J);:FOR W=1 TO 20:NEXT W
:NEXT J:POSITION X,Y:PRINT " ";:NEXT I
470 P1=P1-1:U=1:GOTO 200
499 REM Procedura eksplozji statku
500 SOUND 0,0,0,0:SOUND 1,75,8,15
520 X1=X-2:X2=X+1:X0=X:XS=2:V0=15:V1=1
5:V2=15:POSITION X-1,Y:PRINT " ":POS
ITION X,Y+1:PRINT " "
530 FOR I=Y TO 22:POSITION X1,I:PRINT
"ah";:POSITION X2,I:PRINT "ic";:IF U=1
THEN POSITION X0,I:PRINT "e";
540 SOUND 0,20,8,V0:SOUND 1,40,8,V1:SO
UND 2,70,8,V2:V0=V0*0.7:V1=V1*0.75:V2=
V2*0.78:XS=XS-0.2:IF XS<0 THEN XS=0
550 FOR W=1 TO 30:NEXT W:POSITION X1,I
:PRINT " ";:POSITION X2,I:PRINT " "
;:IF U=1 THEN POSITION X0,I:PRINT " ";
560 X1=X1-XS:IF X1<1 THEN X1=36
570 X2=X2+XS:IF X2>36 THEN X2=1
580 NEXT I:FOR I=0 TO 3:SOUND I,0,0,0:
NEXT I:SL=SL-1:IF SL=0 THEN GOTO 600
590 GOTO 280
599 REM Koniec gry, wyswietlenie wynik
u i czekanie na wcisniecie klawisza ST
ART
600 GRAPHICS 0:POKE 752,1:POSITION 16,
10:PRINT "KONIEC GRY":POSITION 12,12:P
RINT "TWOJ WYNIK = ";SC
610 POSITION 2,14:PRINT "NACISNIJ STAR
T DO POWTORZENIA MISJI"
620 IF PEEK(53279)=6 THEN GOTO 15
630 GOTO 620
649 REM Procedura BONUS, dodanie 50 pu
nktow za kazdego uratowanego czlowieka
650 FOR I=3 TO 23:PLOT 1,I:DRAWTO 37,I
:NEXT I
660 POSITION 16,10:PRINT "*BONUS*":POS
ITION 15,12:PRINT "WYNIK=";SC
670 FOR I=1 TO P2:POSITION 12+I*2,14:P
RINT "f":SC=SC+50:POSITION 21,12:PRINT
SC
680 SOUND 0,I*20+40,10,10:FOR W=1 TO 5
0:NEXT W:NEXT I
690 FOR I=P2 TO 1 STEP -1:SOUND 0,I*20
+40,10,10:FOR W=1 TO 50:NEXT W:NEXT I:
SOUND 0,0,0,0:IF P2<6 THEN GOTO 699
692 REM Jesli wszyscy ludzie uratowani
to dodanie extra rakiety
693 POSITION 8,16:PRINT "*** EXTRA RAK
IETA ***";:SL=SL+1:FOR P2=1 TO 4:FOR A
Z=80 TO 185 STEP 6
696 SOUND 0,AZ,10,10:SOUND 0,AZ+50,10,
10:NEXT AZ:NEXT P2
699 FOR W=11 TO 111 STEP 5:FOR AZ=W TO
W-7 STEP -1:SOUND 0,AZ,10,10:NEXT AZ:
NEXT W:SOUND 0,0,0,0:GOTO 20
999 REM Utworzenie wlasnego generatora
znakow
1000 R=PEEK(106)-8:RM=R*256
1010 C=0:FOR I=0 TO 1023 STEP 30:C=C+1
:IF C=3 THEN C=0
1020 SETCOLOR C,1,8:FOR J=I TO I+30:PO
KE RM+J,PEEK(57344+J):NEXT J:SETCOLOR
C,0,0:NEXT I:SETCOLOR 0,1,8
1030 FOR I=0 TO 8:FOR J=0 TO 7:READ A:
POKE RM+(97+I)*8+J,A:NEXT J:NEXT I:RET
URN
1050 DATA 0,0,12,12,12,15,15,12,24,24,
24,60,255,255,255,0,0,0,48,48,48,240,2
40,48
1060 DATA 255,255,126,126,60,60,24,24,
219,126,60,24,24,60,102,195,24,24,255,
24,24,60,102,195
1070 DATA 24,24,60,126,219,60,102,102,
48,48,48,112,240,240,240,0,12,12,12,14
,15,15,15,0
1100 GRAPHICS 3+16:FOR I=0 TO 2:SETCOL
OR I,0,0:NEXT I
1105 C=0:FOR I=0 TO 39:C=C+1:IF C=4 TH
EN C=1
1109 REM Strona tytulowa
1110 COLOR C:PLOT I,0:PLOT 39-I,21:NEX
T I
1120 C=0:FOR I=0 TO 21:C=C+1:IF C=4 TH
EN C=1
1130 COLOR C:PLOT 39,I:PLOT 0,21-I:NEX
T I
1140 COLOR 1:PLOT 9,4:DRAWTO 5,4:DRAWT
O 5,6:DRAWTO 9,6:DRAWTO 9,9:DRAWTO 5,9
:PLOT 11,9:DRAWTO 11,4:DRAWTO 15,4
1142 DRAWTO 15,7:DRAWTO 11,7:PLOT 17,9
:DRAWTO 17,4:DRAWTO 21,4:DRAWTO 21,9:P
LOT 17,6:DRAWTO 21,6:PLOT 27,4
1144 DRAWTO 23,4:DRAWTO 23,9:DRAWTO 27
,9:PLOT 33,4:DRAWTO 29,4:DRAWTO 29,9:D
RAWTO 33,9:PLOT 29,6:DRAWTO 33,6
1150 PLOT 2,17:DRAWTO 2,12:DRAWTO 6,12
:DRAWTO 6,15:DRAWTO 2,15:PLOT 5,16:PLO
T 6,17:PLOT 12,12:DRAWTO 8,12
1152 DRAWTO 8,17:DRAWTO 12,17:PLOT 8,1
4:DRAWTO 12,14:PLOT 18,12:DRAWTO 14,12
:DRAWTO 14,14:DRAWTO 18,14
1154 DRAWTO 18,17:DRAWTO 14,17:PLOT 24
,12:DRAWTO 20,12:DRAWTO 20,17:DRAWTO 2
4,17:PLOT 26,12:DRAWTO 26,17
1156 DRAWTO 30,17:DRAWTO 30,12:PLOT 36
,12:DRAWTO 32,12:DRAWTO 32,17:DRAWTO 3
6,17:PLOT 32,14:DRAWTO 36,14
1160 RETURN
|