Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1000 REM INVADERS FROM OUTER SPACE
- 1002 GRAPHICS 5
- 1004 POKE 53277,0
- 1006 POKE 752,1
- 1008 ?
- 1009 ? " INVADERS FROM OUTER SPACE"
- 1010 ? " (C) PRZEMYSLAW KOBYLANSKI 2024"
- 1020 GOSUB 7000:REM PANORAMA
- 1030 GOSUB 9000:REM BITMAPS
- 1040 GOSUB 8000:REM P/M GRAPHICS
- 1045 ENABLE=0
- 1047 VISIBLE=0
- 1050 REM MAIN LOOP
- 1060 GOSUB 2000:REM INVADERS
- 1070 GOSUB 3000:REM UFO
- 1080 GOTO 1050
- 2000 REM INVADERS
- 2010 FOR I=0 TO 2
- 2020 IF I>0 THEN 2070
- 2030 X1=X(0)+DX(0)
- 2040 IF X1<48 OR X1>X(1)-8 THEN DX(0)=-DX(0)
- 2050 X(0)=X(0)+DX(0)
- 2060 GOTO 2150
- 2070 IF I<2 THEN 2120
- 2080 X1=X(2)+DX(2)
- 2090 IF X1<X(1)+8 OR X1>200 THEN DX(2)=-DX(2)
- 2100 X(2)=X(2)+DX(2)
- 2110 GOTO 2150
- 2120 X1=X(I)+DX(I)
- 2130 IF X1<X(I-1)+8 OR X1>X(I+1)-8 THEN DX(I)=-DX(I)
- 2140 X(I)=X(I)+DX(I)
- 2150 NEXT I
- 2160 FOR I=0 TO 2
- 2170 MOD=X(I)-2*INT(X(I)/2)
- 2180 POKE 53248+I,X(I)
- 2190 FOR J=0 TO 7
- 2200 POKE PB(I)+64+J,BM(MOD,J)
- 2210 NEXT J
- 2220 NEXT I
- 2230 SOUND 0,150,15,100
- 2240 FOR D=1 TO 6
- 2250 NEXT D
- 2260 SOUND 0,0,0,0
- 2270 RETURN
- 3000 REM UFO
- 3010 IF ENABLE THEN 3050
- 3020 ENABLE=RND(1)<0.02
- 3030 IF NOT (ENABLE) THEN RETURN
- 3040 VISIBLE=0
- 3050 IF VISIBLE THEN 3130
- 3060 DX(3)=3-6*INT(2*RND(1))
- 3070 X(3)=32+176*(DX(3)<0)
- 3075 POKE 53251,X(3)
- 3080 FOR I=0 TO 7
- 3090 POKE PB(3)+15+I,BM(2,I)
- 3100 NEXT I
- 3110 VISIBLE=1
- 3115 SOUND 1,80,2,3
- 3120 RETURN
- 3130 X(3)=X(3)+DX(3)
- 3140 IF DX(3)>0 THEN 3220
- 3150 IF X(3)>31 THEN 3300
- 3160 FOR I=0 TO 7
- 3170 POKE PB(3)+15+I,0
- 3180 NEXT I
- 3190 VISIBLE=0
- 3200 0
- 3200 ENABLE=0
- 3205 SOUND 1,0,0,0
- 3210 RETURN
- 3220 IF X(3)<209 THEN 3300
- 3230 GOTO 3160
- 3300 POKE 53251,X(3)
- 3310 RETURN
- 7000 REM PANORAMA
- 7002 H1=0
- 7004 H2=10
- 7006 H3=20
- 7010 FOR X=0 TO 79
- 7020 COLOR 3
- 7030 PLOT X,H1
- 7040 DRAWTO X,47
- 7050 COLOR 2
- 7060 PLOT X,H2
- 7070 DRAWTO X,47
- 7080 COLOR 1
- 7090 PLOT X,H3
- 7100 DRAWTO X,47
- 7110 H=H1+1-2*INT(2*RND(1))
- 7120 IF H<0 OR H>23 THEN 7110
- 7125 H1=H
- 7130 H=H2+1-2*INT(2*RND(1))
- 7140 IF H<10 OR H>20 THEN 7130
- 7145 H2=H
- 7150 H=H3+1-2*INT(2*RND(1))
- 7160 IF H<15 OR H>20 THEN 7150
- 7165 H3=H
- 7170 NEXT X
- 7180 RETURN
- 8000 REM P/M GRAPHICS
- 8005 POKE 53277,0
- 8010 TOP=156
- 8020 POKE 106,TOP
- 8030 PB=TOP*256
- 8040 POKE 54279,TOP
- 8050 POKE 559,46:REM DOUBLE
- 8060 POKE 623,1:REM PRIORITY
- 8080 POKE 53256,0
- 8085 DIM X(3),PB(3),DX(3)
- 8090 FOR I=0 TO 3
- 8095 POKE 704+I,101+3*I:REM COLOR
- 8100 POKE 53256+I,0:REM NORMAL SIZE
- 8110 X(I)=48+I*38+INT(38*RND(1))
- 8115 DX(I)=1+2*I-(2+4*I)*INT(2*RND(1))
- 8120 POKE 53248+I,X(I)
- 8130 PB(I)=PB+512+I*128
- 8150 NEXT I
- 8155 POKE 53259,1:REM DOUBLE SIZE
- 8160 FOR A=PB(0) TO PB(0)+1023
- 8170 POKE A,0
- 8180 NEXT A
- 8190 FOR I=0 TO 2
- 8200 MOD=X(I)-2*INT(X(I)/2)
- 8210 FOR J=0 TO 7
- 8220 POKE PB(I)+64+J,BM(MOD,J)
- 8230 NEXT J
- 8240 NEXT I
- 8250 POKE 53277,3
- 8260 RETURN
- 9000 REM BITMAPS
- 9010 DIM BM(3,7)
- 9020 FOR I=0 TO 1
- 9030 FOR J=0 TO 7
- 9040 READ V
- 9050 BM(I,J)=V
- 9060 NEXT J
- 9070 NEXT I
- 9080 FOR J=0 TO 7
- 9090 READ V
- 9100 BM(2,J)=V
- 9110 NEXT J
- 9120 RETURN
- 9200 DATA 24,60,126,219,126,60,66,36
- 9210 DATA 24,60,126,219,126,24,36,66
- 9220 DATA 0,0,60,126,219,255,90,0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement