home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 19
/
019.d81
/
sojourn.main
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
96 lines
5 dim ex%(18),ey%(18),cx%(18),cy%(18),dt$(18)
10 rem earth x,y
11 data177,84,172,79,166,73,161,70,153,69,146,68,138,70,130,74,125,78,120,85
12 data117,92,116,101,117,110,122,118,128,125,138,130,149,133,159,130
15 d=400
20 rem comet x,y
21 data 78,31,90,35,106,40,121,46,127,50,136,55,143,60,148,64,154,71,166
23 data 85,166,105,162,115,153,124,144,132,134,136,125,141,111,145,96,148
24 data "september 10, 1985","september 24, 1985","october 10, 1985"
25 data "october 24, 1985","november 10, 1985","november 24, 1985"
26 data "december 10, 1985","december 24, 1985"
27 data "january 10, 1986","january 24, 1986","february 10, 1986"
28 data "february 24, 1986","march 10, 1986","march 24, 1986","april 10, 1986"
29 data "april 24, 1986","may 10, 1986","may 24, 1986"
30 restore:fori=1to18:readex%(i),ey%(i):next
32 fori=1to18:readcx%(i),cy%(i):next
40 fori=1to18:readdt$(i):next
50 sys828,16384,"sojournshps.tbl"
53 sys828,8192,"lineplot.o"
54 gosub60:poke255,4:poke253,0:poke254,0:sys51462:goto80
55 :
60 poke249,224:poke250,204
62 poke251,0:poke252,64:return
64 :rem poke253,0:poke254,0
65 :
80 goto60000
100 rem orbits module
101 c=1:print"[147]"
102 sys8198," ",0,190
103 sys8198," f1-f7 to change date <e>scape ",0,190
108 poke255,2:gosub60:poke253,0: poke254,3:sys51462
110 a$=" "
115 sys8198,a$,0,170:sys8198,dt$(c),90,170
116 gosub54000:gosub200:geta$
117 ifa$="e"then60000
118 ifa$="[133]"then120
119 ifa$="[136]"thenc=c-1:goto125
120 c=c+1:ifc=19thenc=18
125 ifc<1thenc=1
130 goto110
140 :
200 rem flash current orbit loc
210 x=ex%(c):y=ey%(c):gosub 1000
220 x=cx%(c):y=cy%(c):gosub 2000
225 ifpeek(198)>0then30000
230 gosub30000
260 goto200
999 :
1000 rem plot earth
1010 sys8201,x-5,y-4,x-5,y+4:sys8201,x-5,y+4,x+5,y+4:sys8201,x+5,y+4,x+5,y-4
1015 sys8201,x+5,y-4,x-5,y-4:return
1020 :
2000 rem plot comet
2100 sys8201,x,y-4,x-8,y+4:sys8201,x-8,y+4,x+8,y+4:
2102 sys8201,x+8,y+4,x,y-4: return
20000 rem plot opts pic
20010 poke255,0
25000 rem plot pic
25010 poke253,0:poke254,0:gosub60: sys51462:return
30000 rem plot partial orbit pic
30010 gosub60:poke255,3:poke253,7: poke254,3:sys51462:return
54000 rem find out what is happening
54002 a$=" "
54005 ifc=7then:a$="halley's first close pass":goto55000
54010 ifc=11thena$="halley is at perihelion":goto55000
54020 ifc=15thena$="halley's closest pass":goto55000
54025 ifc=18thena$="see ya again in 2061!"
55000 sys8198," ",60,180
55001 sys8198,a$,60,180
55002 return
60000 rem main loop
60005 gosub60:poke255,4:poke253,0:poke254,0:sys51462
60010 gosub 20000
60020 poke198,0:wait198,1:geta$
60040 ifa$="a"then62000
60050 ifa$="c"then100
60055 z$=""
60060 ifa$="q"then63000
60070 ifa$="b"thensys51459:print"[147]load"chr$(34)"sojourn.start"chr$(34)",8"
60072 ifa$="b"thenprint"run":poke631,13:poke632,13:poke198,2:end
60080 goto 60000
62000 rem solarsys
62010 poke255,1:poke253,0:poke254,0:sys51462
62018 sys8198," ",0,190
62020 sys8198," press 'e' to escape ",0,190
62050 poke198,0:wait198,1:get a$:ifa$="e"then60000
62060 goto 62050
62200 rem return to ls
62210 load"hello connect",8
62250 end
63000 rem quit?
63001 sys51459
63002 print"[147]quit for sure?": poke198,0:wait198,1
63003 geta$:ifa$<>"y"thensys51459: goto60000
63004 goto62200