home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 19 / 019.d81 / sojourn.main (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  3KB  |  96 lines

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