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