home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 204 / 204.d81 / firefighter (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  16KB  |  478 lines

  1. 10 rem loadstar presents...
  2. 30 rem forest fire fighter
  3. 40 rem for the c64
  4. 50 rem
  5. 60 rem by ian adam
  6. 70 rem vancouver bc
  7. 80 rem (c) 1991
  8. 90 rem
  9. 100 remember:    loadstar is not public domain!
  10. 105 :
  11. 110 if tr=0 then tr=1:a$="reader c800":goto 5100
  12. 115 if tr=1 then tr=2:a$="fff.txt":goto 5100
  13. 120 gosub 2000, picture
  14. 130 gosub 3000, sound
  15. 140 gosub 4000, input
  16. 150 :
  17. 170 on re gosub 4990,,6000,,6000,,300
  18. 180 goto 120
  19. 270 :
  20. 280 : quit
  21. 290 :
  22. 300 a=6:gosub 600
  23. 340 print tab(60)"quit fire fighter..."
  24. 350 print tab(23)"are you sure?"
  25. 360 print tab(103)"[153]continue program"
  26. 370 print tab(103)"back to loadstar";
  27. 390 :
  28. 400 gosub 4050
  29. 410 if re-7 then return
  30. 430 :
  31. 450 open 1,8,15:open 2,8,8,"hello connect"
  32. 460 input#1,a,b$:close 2:close 1
  33. 470 print"[147]":poke 54296,.:sys 16387
  34. 480 if a<20 then load"hello connect",8
  35. 490 list-100
  36. 500 :
  37. 580 : clear message
  38. 590 :
  39. 600 poke 53280,a:poke 53281,a
  40. 620 for i=17 to 24
  41. 630 : if i=20 then i=21
  42. 640 : sys cr,i,23:print"                ";
  43. 650 next
  44. 660 sys cr,14:print""
  45. 670 return
  46. 1970 :
  47. 1980 : title screen
  48. 1990 :
  49. 2000 s=53265:k=198:ca=54272:cr=16390
  50. 2010 f1$(0)="[158][178][180][182][180][179][180][182]":f1$(1)="[178][180] [180][181][182] "
  51. 2020 f2$(3)="[158][178][178] [178][180] [178][179][180][180][181][180][172][145][157][157][157][157] [179] [180]"
  52. 2030 gosub 2400
  53. 2040 sys cr,21
  54. 2050 print tab(23)"instructions"
  55. 2060 print tab(23)"fight some fires"
  56. 2070 print tab(63)"back to loadstar"
  57. 2080 poke 53269,rnd(-ti):poke s,27
  58. 2090 :
  59. 2100 a=3:l1=1024:l2=40:l3=25
  60. 2110 x2=53252:y2=x2+1:ch=16396:ll=16402:fr=16408
  61. 2120 wi$(0)="[145] ^[157]\[157]\[145][146] ":wi$(1)="[185][145][185][145][184]"
  62. 2130 wi$(2)="]][146]]":wi$(3)="[145][188][188][186][145]"
  63. 2140 wi$(4)="[145] \[157]\[157][146]\[145] ":wi$(5)="[183][145][185][145][185]"
  64. 2150 wi$(6)="_]][146]":wi$(7)="[145][187][188][188][145]"
  65. 2160 c$="[145]   [157][157][157]   [157][157][157]   [145][157][157][157]"
  66. 2170 :
  67. 2180 f1$(2)="[178][179][178][180][179][180][182][145][157][179]"
  68. 2190 f1$(3)=" [178][179][178][178][179][145] [157] ":f1$(4)="[178][180][178][179][178][180]"
  69. 2200 f2$(0)="[178][179][180][178][179] [178][179][179][178] [178] [145][157][157][157]   ":f2$(1)=" [178][180][181][178] [178][179][180][180][179][178]"
  70. 2210 f2$(2)=" [179][179][180][180] [178][179][180][181][180][179][180][145][157][157][157][157][179]"
  71. 2220 f2$(4)="[178][179] [178][179]  [178][179][178][180][181][179][145][157][157][157] [178] "
  72. 2230 l$(1)="apprentice":b$(1)="      max: ":sc(1)=750
  73. 2235 l$(2)="rookie":b$(2)="          max:":sc(2)=1000
  74. 2240 l$(3)="expert":b$(3)="          max:":sc(3)=1250
  75. 2245 l$(4)="master smokie":b$(4)="   max:":sc(4)=2000
  76. 2250 poke 53248,.:poke 53264,.
  77. 2260 poke 53271,.:poke 53277,.:poke 53275,.:poke 53276,1
  78. 2270 poke 53285,10:poke 53286,1:poke 53287,1:poke 53289,1
  79. 2280 poke 2040,221:poke 2041,222:poke 2042,223
  80. 2290 cr(.)=216:cr(1)=217:cr(2)=1:cr(3)=41
  81. 2300 cr(4)=40:cr(5)=39:cr(6)=255:cr(7)=215
  82. 2310 sf(1)=1.15:sf(3)=1.30:sf(5)=1.35:sf(7)=1.77
  83. 2340 sys 16685
  84. 2350 restore:for i=. to 4:read g$(i),m$(i),p$(i):next
  85. 2360 return
  86. 2362 data not bad!,practice makes perfect,no tree is safe
  87. 2364 data there's hope for bambi!,rome burns while nero fiddles,you're fired
  88. 2366 data ready for a challenge?,whew! it's hot here!,not so better...
  89. 2368 data hot stuff!,"the forest is just nature's way of  saying 'get lost'"
  90. 2370 data the hills are alive...,a teddy bear's picnic
  91. 2372 data can't see the forest for the trees,stand by- i'll evacuate seattle
  92. 2375 :
  93. 2380 : screen
  94. 2390 :
  95. 2400 poke 53280,.:poke s,11:poke 53281,.:poke 53272,31
  96. 2410 f$="[150][192][193][157][157][208] [145]"
  97. 2420 r$="[194][195][157][157][210][211][145]"
  98. 2430 e$="[196][197][157][157][212][213][145]"
  99. 2440 i$="[198][157][214][145]"
  100. 2450 g$="[199][200][157][157][215][216][145]"
  101. 2460 h$="[201][202][157][157][217][218][145]"
  102. 2470 t$="[203][204][157][157][219] [145]"
  103. 2480 f1$=f$+i$+r$+e$
  104. 2490 f2$=f$+i$+g$+h$+t$+e$+r$
  105. 2500 print "[147][154]"tab(59)"[146]loadstar presents...[150]"
  106. 2510 print tab(146)f1$(.)
  107. 2520 print tab(25)f1$
  108. 2530 print tab(63)f2$(3)
  109. 2540 print tab(22)f2$
  110. 2550 print tab(143)"[154]by  ian adam"
  111. 2560 print tab(23)"vancouver bc"
  112. 2570 print tab(183)"[158]press:"
  113. 2580 print tab(59)"f1"
  114. 2590 print tab(19)"f3"
  115. 2600 print tab(19)"f5"
  116. 2610 print tab(19)"f7"
  117. 2620 :
  118. 2630 print "[149]"
  119. 2640 a$="    [160]      [160][161]":b$="    [161]      [160][160]"
  120. 2650 print a$:print b$:print "    [160]      [161][160]":print "    [161]      [161][160]":print a$
  121. 2660 print b$:print "    [160]     [162][160][161][163]":print "   [162][161][163]    [164][160][160][165]"
  122. 2670 :
  123. 2700 print "[153]          [176][177]"
  124. 2710 print "[153]          [166][170][169]"
  125. 2720 print "[153]         [166][167][170][171][169]"
  126. 2730 print "   [166][169]     [153][166][170][174][171]"
  127. 2740 print "   [166][173][169]   [153][166][172][170][174][171][169]"
  128. 2750 print "   [166][173][169]   [153][176][170][174][173][175][171]"
  129. 2760 print "  [166][172][169]    [153][166][172][170][174][171][169]"
  130. 2770 print "   [166][173][173][169]  [153][166][170][174][173][175][171][169]"
  131. 2780 print " [166][172][174][173][169] [153][166][170][172][171][167][175][171][173]"
  132. 2790 print "  [166][172][175][169]  [153][166][172][174][167][172][175][171][169]"
  133. 2800 print " [166][172][175][174][173][173][169] [153][172][172][171][181][175][171][175][168][169]"
  134. 2810 print " [176][172][167][181][169][173][153][176][172][174][173][175][175][173][175][171][169]"
  135. 2820 print "[166][167][172][175][174][177][173][177][169][153][166][172][174][174][173][175][171][169]"
  136. 2830 print "  [166][174][174][177][168][169][173][153][172][172][170][175][173][153][175][171][173][177]"
  137. 2840 print " [176][172][167][172][175][171][153][166][170][172][174][174][174][173][175][174][173][168][169]"
  138. 2850 print "[166][172][167][175][176][175][153][176][167][172][174][172][153][176][167][173][173][175][153][171][175][173]"
  139. 2860 print " [176][172][167][168][173][169][153][166][172][167][175][172][181][173][169][171][169][153][175][171][173][169]"
  140. 2870 print "  [166][172][173][168][177][153][176][167][182][167][174][177][174][171][177][175][169]"
  141. 2880 print "   [176][171][173][169][153]  [166][182][174][168][175][173][169][157][157][157][171][177]"
  142. 2890 fl=1:return
  143. 2970 :
  144. 2980 : set up sound chip
  145. 2990 :
  146. 3000 for i=ca to ca+24:poke i,.:next
  147. 3010 :
  148. 3100 poke ca+13,45:rem wind
  149. 3110 poke ca+15,255:poke ca+19,1:rem fire
  150. 3120 poke ca+1,6:poke ca+6,252:rem plane
  151. 3130 poke ca+24,11:return
  152. 3970 :
  153. 3980 : input
  154. 3990 :
  155. 4000 poke fr,.:poke fr+1,5:poke fr+2,1:poke fr+3,20:poke fr+4,4
  156. 4010 poke ca+11,129:poke ca+18,129:ct=.
  157. 4020 if peek(fr+6)>4 then poke fr+6,3
  158. 4050 get a$:re=val(a$)
  159. 4070 if a$>="[133]" then if a$<"[140]" then re=asc(a$)*2-265
  160. 4080 if a$=chr$(13) then re=1
  161. 4090 if re and 1 then return
  162. 4095 :
  163. 4100 if fl=. then 4160
  164. 4120 a=a+1:if a>4 then a=.
  165. 4130 print "[158]"tab(226)f1$(a)
  166. 4140 print tab(103)f2$(a)
  167. 4150 :
  168. 4160 ct=ct+1:if ct<150 then 4050
  169. 4180 poke fr,15
  170. 4190 if ct<650 then poke fr+1,ct/25
  171. 4200 goto 4050
  172. 4960 :
  173. 4970 : instructions
  174. 4980 :
  175. 4990 print "[147]"
  176. 5000 poke 54296,.:tr=peek(53269):poke 53269,.:fl=.:poke 53272,23
  177. 5010 sys 51200,""," [198]ire [198]ighter's [205]anual "
  178. 5015 poke 53272,31:poke 54296,11:poke 53269,tr
  179. 5020 return
  180. 5030 :
  181. 5100 open 1,8,15:open 2,8,8,a$
  182. 5110 input#1,a,b$:close 2:close 1
  183. 5120 if a<20 then load a$,8,1
  184. 5130 print"unable to locate file '"a$"'."
  185. 5140 print"please insert program disk in drive &"
  186. 5150 print"press return, or press '*' to quit:":wait 198,7:get b$
  187. 5160 if b$<>"*" then 5100
  188. 5170 goto 450
  189. 5200 :
  190. 5730 print"every three turns.  [200]owever, you will"
  191. 5740 print"start out with two crews on standby.":print
  192. 5750 print"   [201]t is only rarely that a fire will"
  193. 5760 print"be able to jump over such a carefully"
  194. 5780 print:print"   [217]our greatest con..
  195. 5782 [153]"wind.  (NULL)atch its direction carefully,"
  196. 5784 [153]"and try to anticipate the fire's"
  197. 5786 [153]"spread.  (NULL)ith luck you will contain"
  198. 5788 [153]"the fire.  peekut watch for a sudden"
  199. 5790 [153]"change in wind direction, which could"
  200. 5792 [153]"turn your plans to ashes!"
  201. 5794 :
  202. 5800 [153]:[153]"   (NULL)his simulation gives you a c