home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1986 June
/
1986-06.d64
/
switcheroo
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
4KB
|
93 lines
10 fora=54272to54295:pokea,0:next:poke54296,47:poke54273,16:poke54280,19
20 poke54277,24:poke54284,24:poke54295,20:poke54291,25:poke54287,5:gosub640
30 goto280
40 jy=15-(peek(56320+pl*f2)and15):fr=peek(56320+pl*f2)and16:iffr=0thenjy=0
50 return
60 wait56320+pl*f2,16,0:return
70 poke53288,c1:poke53289,c2:return
80 tx=x*6-1:ty=y*4-3:gosub270:poke646,c:print""a$:return
90 poke54276,16:poke54283,16:poke54276,17:poke54283,17
100 fora=1to300:next:poke54276,0:poke54283,0:return
110 poke54280,19:forb=50to150step50:poke54273,b:gosub90:next:return
120 poke54290,128:poke54290,129:fora=100to200:poke54294,a:next:return
130 qt=0:x=0:q=1:fora=1to5:forb=1to5:x=x+ar(a,b):next:ifx=35orx=40thengosub190
140 x=0:next:q=2:fora=1to5:forb=1to5:x=x+ar(b,a):next:ifx=35orx=40thengosub190
150 x=0:next:q=3:fora=1to5:b=a:x=x+ar(a,b):next:ifx=35orx=40thengosub190
160 x=0:q=4:fora=1to5:b=6-a:x=x+ar(a,b):next:ifx=35orx=40thengosub190
170 ifqtthen230
180 return
190 qt=1:a$="[146] [157][157] ":ifq=1thenforzb=1to5:x=a:y=zb:gosub80:next:return
200 ifq=2thenforzb=1to5:y=a:x=zb:gosub80:next:return
210 ifq=3thenforza=1to5:x=za:y=za:gosub80:next:return
220 forza=1to5:x=za:y=6-za:gosub80:next:return
230 poke53269,0:gosub110:ty=23:tx=4:gosub270
240 print" press fire button to play again"
250 ifpeek(56320)<>111andpeek(56321)<>239then250
260 clr:goto280
270 poke783,0:poke781,ty:poke782,tx:sys65520:return
280 print"";:dim cl(25),ar(5,5):pc(0)=7:pc(1)=8:pl=1:f2=peek(828)
290 mx(1)=0:mx(2)=0:mx(4)=-48:mx(8)=48:my(1)=-32:my(2)=32:my(4)=0:my(8)=0
300 fora=1to5:forb=1to5:ar(a,b)=14:nextb,a:oj=0
310 a$="[207][183][183][183][183][208][157][157][157][157][157][157][180] [170][157][157][157][157][157][157][180] [170][157][157][157][157][157][157][204][175][175][175][175][186]":b$="[145][145][145]"
320 fori=0to23:print" ":m=1063+(40*i)
330 pokem,160:pokem+54272,6:next:poke2023,160:poke56295,6
340 print" [154]":poke53281,1
350 forx=1to5:print""spc(5)a$b$a$b$a$b$a$b$a$:nextx:fori=1to25:cl(i)=1:next
360 poke53250,126:poke53251,228:poke53252,223:poke53253,228
370 gosub130:poke53248,173:poke53249,129:poke53269,7
380 pl=-(pl=0):poke54273,16*2^pl:poke54280,19*2^pl
390 c1=pc(pl):c2=3:gosub70:fl=1:poke53248,173:poke53249,129
400 poke53264,0:gosub40:ifjy=4thenc1=pc(pl):c2=3:fl=1:gosub70
410 ifjy=8thenc1=3:c2=pc(pl):fl=2:gosub70
420 iffr=16then400
430 gosub90:gosub60:xp=173:yp=129
440 poke53249,0:poke53264,(xpand256)/256:poke53248,xpand255:poke53249,yp
450 gosub40:t=xp+mx(jy):xp=xp-mx(jy)*(t>76andt<270):t=yp+my(jy)
460 yp=yp-my(jy)*(t>64andt<194):iffr=16then440
470 gosub90:c=pc(pl):gosub60:x=int((xp-26)/48):y=int((yp-32)/32)
480 iffl=2then510
490 ifar(x,y)<>14thengosub120:goto390
500 oj=0:ar(x,y)=c:gosub80:goto370
510 gosub60
520 gosub40:iffr=0thengosub60:goto390
530 if(jy+oj=3andx=ox)or(jy+oj=12andy=oy)thengosub120:goto390
540 onjygoto550,560,520,570,520,520,520,580:goto520
550 t=ar(x,1):fora=1to4:ar(x,a)=ar(x,a+1):next:ar(x,5)=t:goto590
560 t=ar(x,5):fora=5to2step-1:ar(x,a)=ar(x,a-1):next:ar(x,1)=t:goto590
570 t=ar(1,y):fora=1to4:ar(a,y)=ar(a+1,y):next:ar(5,y)=t:goto600
580 t=ar(5,y):fora=5to2step-1:ar(a,y)=ar(a-1,y):next:ar(1,y)=t:goto600
590 fora=1to5:y=a:c=ar(x,a):gosub80:next:gosub610:goto370
600 fora=1to5:x=a:c=ar(x,y):gosub80:next:gosub610:goto370
610 oj=jy:ox=x:oy=y:return
620 fora=14336to14527:readb:pokea,b:next:poke53276,3:poke53285,0
630 poke53287,15:fora=224to226:poke1816+a,a:next:return
640 poke53281,1:poke53280,6:print"[147]";:a$="[207][183][208][157][157][157][180] [170][157][157][157][204][175][186]":b$="[145][145]"
650 fori=0to23:print" ":m=1063+(40*i)
660 pokem,160:pokem+54272,6:next:poke2023,160:poke56295,6
670 print" "
680 print"[154]":fori=1to5:printspc(12);:forz=1to5:print""a$b$;:next
690 print"":next:print""spc(18)"[158]"a$"[129]";:gosub90
700 printa$;:gosub90:print"[145][145][145][145][145][145][145][145][145][145][145][158]"a$:gosub90:printspc(15)"[129]"a$;
710 gosub90:print"[157][157][157][157][157][157][158]"a$;:gosub90:print"[129]"spc(24)a$
720 gosub90:print""spc(15)"[158]"a$;:gosub90:print"[145][145][145][145][145][145][145][145][145][145][145][157][157][157][157][157][157][129]"a$;
730 gosub90:printspc(6)"[158]"a$:gosub90:tx=25:ty=6:gosub270:fori=1to5
740 print" [157][157][157][157]";:next:gosub110:print""spc(10)"s w i t c h e r o o"
750 gosub620:ty=21:tx=16:gosub270:print"1 or [146]2[157][157][157][157][157][157][157]joysticks"
760 getmt$:ifmt$<>"1"andmt$<>"2"then760
770 poke828,val(mt$)-1:return
780 data 0,0,0,0,0,0,0,0,0,0,168,0,2,170,64,10,170
790 data 144,10,170,144,42,170,164,42,170,164,42
800 data 170,164,42,170,164,42,170,164,10,170,144
810 data 10,170,144,2,170,64,0,168,0,0,0,0,0,0,0
820 data 0,0,0,0,0,0,0,0,0,0,170,170,160,170,170
830 data 164,170,170,164,170,170,164,170,170,164
840 data 170,170,164,170,170,164,170,170,164,170
850 data 170,164,170,170,164,170,170,164,170,170
860 data 164,170,170,164,170,170,164,170,170,164
870 data 170,170,164,170,170,164,170,170,164,170
880 data 170,164,21,85,84,0,0,0,0,0,32,0,0,112,0
890 data 0,248,0,1,252,0,0,112,0,0,112,0,0,112,0
900 data 16,0,64,48,0,96,126,3,240,254,3,248,126
910 data 3,240,48,0,96,16,0,64,0,112,0,0,112,0,0
920 data 112,0,1,252,0,0,248,0,0,112,0,0,32,0,0