home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 December / Ahoy_Magazine_87-12_1987_Double_L.d64 / Silhouette (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1987-01-01  |  4.6 KB  |  101 lines

  1. 100 if peek(12351)<>65 then load "silsprites",8,1
  2. 110 def fnjy(x)=15-(peek(56320)and15):def fnjb(x)=(peek(56320)and16)
  3. 120 s=54272:for x=s to s+24:read a:poke x,a:next
  4. 130 data 64,5,0,0,32,0,176,0,31,0,0,16,0,250,0,5,0,0,128,0,248,0,0,0,15
  5. 140 for x=0 to 4:read fh(x),fl(x):next:data 4,48,4,180,5,71,5,152,6,71
  6. 150 m$(1)="cccceeeeg-d-c-":m$(2)="cde-efg-gefdc-":m$(3)="ggffeeddc-e-c-"
  7. 160 m$(4)="ggg-fff-e-d-c-":m$(5)="c-e-d-f-e-d-c-":m$(6)="gfedgfedg-e-c-"
  8. 170 v=53248:poke v+29,126:poke v+23,126:poke v+28,126:poke v+37,0:poke v+38,10
  9. 180 poke v+39,1:poke v+27,254:for x=1 to 6:read co(x):next:data 6,11,2,6,0,2
  10. 190 for x=0 to 10:read xa(x),xx(x),xy(x):next
  11. 200 data 124,124,124,124,124,124,124,124,124,0,0,0,52,124,124,52,68,90
  12. 210 data 52,68,170,0,0,0,196,124,124,196,183,90,196,183,170
  13. 220 for x=0 to 3:read bt(x),bb(x):next:data 0,1,0,2,1,2,2,2
  14. 230 a$="              ":b$="      [146]":c$="[157][157][157][157][157][157][157][157][157][157][157][157][157][157]"
  15. 240 b$=b$+c$:a$=a$+c$:b1$(2)=a$+b$+b$+b$+b$:b2$(2)=b$+b$+b$+a$+a$
  16. 250 :d$="[165][165][165][165][165][165][165][165][165][165][165][165][165][165][146]":b1$(1)=""+d$+c$+d$+c$
  17. 260 b1$(0)="":a$="          ":b$=a$+a$+a$+a$:gn=5:tm=50:q=rnd(-ti)
  18. 270 rem title screen
  19. 280 poke 53281,12:poke 53280,12:print "[147][151]";:if peek(2047)=65 then600
  20. 290 y=60:sx=0:ex=255:ic=1:sp=95:so=14:fl=1:s1=3:s2=2:s3=1:gosub460
  21. 300 print tab(12);"the good guys:"
  22. 310 print"   policeman   professor   young lady"
  23. 320 poke 2044,194:poke 2045,193:poke 2046,192:poke v+8,peek(v+2)
  24. 330 poke v+9,y:poke v+10,peek(v+4):poke v+11,y:poke v+12,peek(v+6):poke v+13,y
  25. 340 poke v+43,co(s1):poke v+44,co(s2):poke v+45,co(s3):poke v+21,112
  26. 350 y=195:sx=0:ex=255:ic=1:sp=95:so=126:fl=1:s1=6:s2=5:s3=4:gosub460
  27. 360 print tab(11);"and the bad guys:"
  28. 370 print"     louie       slim         redd":m$="-"+m$(3):gosub560
  29. 380 poke s+11,17:poke s+11,16:print tab(5);"[213][192][192][201]   [174] [174]   in      [174] [174]"
  30. 390 print tab(5);"[221]    . [221] [221]          [192][219][192][219][192]"
  31. 400 print tab(5);"[202][192][192][201] [174] [221] [171][192][201][213][192][201][176] [174][213][192][201][221] [221] [213][192][201]"
  32. 410 print tab(5);"   [221] [221] [221] [221] [221][221][160][221][221] [221][171][192][203][221] [221] [171][192][203]"
  33. 420 print tab(5);"[202][192][192][203] [177] [177] [177] [177][202][192][203][202][192][203][202][192][203][202][203][202][203][202][192][203]"
  34. 430 print tab(18);"by":print tab(11);"curtis f kaylor"
  35. 440 wait 56464,16,16:poke v+21,0:gn=5:goto600
  36. 450 rem move sprites
  37. 460 poke 2041,198:poke 2042,198:poke 2043,198:z1=0:z2=256
  38. 470 poke v+2,0:poke v+3,y:poke v+4,0:poke v+5,y:poke v+6,0:poke v+7,y
  39. 480 poke v+40,co(s1):poke v+41,co(s2):poke v+42,co(s3):poke v+21,so
  40. 490 poke s,64:poke s+1,5:poke s+4,33
  41. 500 for x=sx to ex step 4*ic:poke v+2,x:a=x-sp
  42. 510 poke v+4,-a*(a>z1 and a<z2):a=a-sp:poke v+6,-a*(a>z1 and a<z2):next
  43. 520 poke s+4,32:if fl=0 then return
  44. 530 poke s+11,17:poke s+11,16
  45. 540 poke 2041,191+s1:poke 2042,191+s2:poke 2043,191+s3:return
  46. 550 rem play music
  47. 560 for x=1 to len(m$):a=asc(mid$(m$,x,1)):if a=45 then goto580
  48. 570 poke s+4,32:poke s,fl(a-67):poke s+1,fh(a-67):poke s+4,33
  49. 580 for pa=1 to 100:next pa,x:poke s+4,32:return
  50. 590 rem rifle range
  51. 600 poke 53280,11:print "[147]";:for x=1 to 10:print b$;:next
  52. 610 print tab(8);"[145][145]rifle  range":for x=1 to 10:print spc(28);"  ";a$;:next
  53. 620 print spc(30);"[145][145][145][145][145][145][145][145]score:[157][157][157][157][157][157]";sc:print spc(30);"guns:[157][157][157][157][157]";gn
  54. 630 print "";b$;"  [213][192][192][192][192][201]   [213][192][192][192][192][201]   [213][192][192][192][192][201]    ";a$;"  [221]    [221]   [221]    [221]   [221]";
  55. 640 print "    [221]    ";a$;"  [202][192][192][192][192][203]   [202][192][192][192][192][203]   [202][192][192][192][192][203]    ";a$;"[157]";b$;"[157][148] "
  56. 650 poke 2040,199:poke v+1,185:poke v,124:poke v+21,1
  57. 660 for j=1 to 7:s1=int(rnd(1)*3)+1:s2=int(rnd(1)*3)+4
  58. 670 if rnd(1)>.5 then ss=s1:s1=s2:s2=ss
  59. 680 s3=int(rnd(1)*6)+1:if s3=s1 or s3=s2 then680
  60. 690 y=168:sx=0:ex=185:ic=1:sp=72:so=15:fl=1:gosub460
  61. 700 for k=1 to tm
  62. 710 jy=fnjy(0):poke v,xa(jy):sr=peek(v+30)and14:if fnjb(0) then760
  63. 720 poke s+18,129:poke s+18,128:sr=log(sr)/log(2)
  64. 730 sn=peek(sr+2040)-191:poke 2040+sr,198
  65. 740 if sn<4 then gosub1040:goto780
  66. 750 sc=sc+10:poke 214,11:print:poke 211,70:print "";sc:tm=tm+(tm>10)
  67. 760 next k:for sr=1 to 3:sn=peek(sr+2040)-191:if sn>3 and sn<7 then gosub1040
  68. 770 next sr
  69. 780 y=168:sx=185:ex=0:ic=-1:sp=72:so=15:fl=0:gosub460:poke v+21,1
  70. 790 next j:m$=m$(6*rnd(1)+1):gosub550:print "[147]";
  71. 800 rem city
  72. 810 for x=1 to 20:print spc(28);"  ";a$;:next:print b$;b$;b$;b$;"[145][145]";spc(5);
  73. 820 print "silhouette  city":print "[157]";b$;"[157][148] ";spc(30);"score:[157][157][157][157][157][157]";sc
  74. 830 print "";spc(30);"guns:[157][157][157][157][157]";gn:print "";
  75. 840 print spc(31);"[213][192][192][192][192][201][157][157][157][157][157][157][221]    [221][157][157][157][157][157][157][202][192][192][192][192][203]"
  76. 850 for j=1 to 5:b1=int(4*rnd(1)):b2=int(4*rnd(1))
  77. 860 for x=0 to 19:poke 781,x:poke 782,27:sys 59905:next x
  78. 870 print "[149]";b1$(bt(b1));b2$(bt(b1));
  79. 880 print  b1$(bb(b1));b2$(bb(b1));
  80. 890 print "";spc(14);b1$(bt(b2));b2$(bt(b2));
  81. 900 print b1$(bb(b2));b2$(bb(b2));"[151]":poke v,xx(0):poke v+1,xy(0)
  82. 910 for k=1 to 5:xx=int(2*rnd(1)):b0=-b1*(xx=0)-b2*(xx=1)
  83. 920 yy=int(rnd(1)*(1-(bt(b0)<>0))):s1=(6*rnd(1))+1
  84. 930 y=152-80*yy:sx=240*xx:ex=56+112*xx:ic=1-2*xx:so=3:fl=1:gosub460
  85. 940 for l=1 to tm/2:jy=fnjy(0):poke v,xx(jy):poke v+1,xy(jy)
  86. 950 sr=sgn(peek(v+30)and2):if fnjb(0) or sr=0 then1000
  87. 960 poke s+18,129:poke s+18,128
  88. 970 sn=peek(2041)-191:poke 2041,198:if sr=0 then1000
  89. 980 if sn<4 then gosub1030:goto1010
  90. 990 sc=sc+10:print "";spc(30);sc:tm=tm+(tm>10)
  91. 1000 next l:sn=peek(2041)-191:if sn>3 and sn<7 then gosub1030
  92. 1010 aa=ex:ex=sx:sx=aa:ic=-ic:fl=0:gosub460
  93. 1020 next k:m$=m$(6*rnd(1)+1):gosub550:next j:goto600
  94. 1030 gx=5:poke 2041,sn+191:poke 214,17:print:poke 211,32:goto1050
  95. 1040 gx=15:poke 2040+sr,sn+191:poke 214,21:print:poke 211,3+9*(3-sr)
  96. 1050 print "miss[157][157][157][157]";:m$="eeeee":gosub560:print "    ":gn=gn-1:tm=tm+1
  97. 1060 poke 214,gx:print:poke 211,30:print "";gn;"[157] ":if gn>0 then return
  98. 1070 print"     play again?  (y/n)     ":get a$:if a$="" and fnjb(0) then1070
  99. 1080 if a$="n" then poke 2047,0:poke v+21,0:print"[147]";:end
  100. 1090 poke 2047,65:run
  101.