D10d3

NAVCOM.DO

Mar 11th, 2020
880
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 5 REM FOR TRS-80 MODEL 100 IN 80 COLUMN MODE(ULTIMATEROMII)
  2. 10 GOSUB 100
  3. 20 INPUT"ENTER ORIGIN";B$
  4. 25 PRINT CHR$(7)
  5. 30 GOSUB 500
  6. 40 OX=IX:OY=IY:OZ=IZ
  7. 50 GOSUB 100
  8. 60 INPUT"ENTER DESTINATION";B$
  9. 65 PRINT CHR$(7)
  10. 70 GOSUB 500
  11. 80 DX=IX:DY=IY:DZ=IZ
  12. 90 GOTO 800
  13. 100 PRINT  CHR$(12)
  14. 110 PRINT"1.Abbadon    8.Colossus     15.Monolith       22.Tara"
  15. 120 PRINT"2.Achamandra 9.Cornwall     16.Moonjam        23.Timos"
  16. 130 PRINT"3.Avatar     10.Enlas-Dhu   17.Phoenix Nebula 24.Videga"
  17. 140 PRINT"4.Azrael     11.Estremerine 18.Rhad           25.Winterjewel"
  18. 150 PRINT"5.Beehive    12.Fiobrachne  19.Sheol"
  19. 160 PRINT"6.Cenotaph   13.Lungold     20.Shiva"
  20. 170 PRINT"7.Chelsea    14.Medusa      21.Sunrise"
  21. 180 RETURN
  22. 500 REM SYSTEM COORDS
  23. 510 IF B$="1" THEN IX=1:IY=-4:IZ=7
  24. 520 IF B$="2" THEN IX=-7:IY=-2:IZ=0
  25. 530 IF B$="3" THEN IX=-5:IY=-8:IZ=5
  26. 540 IF B$="4" THEN IX=-8:IY=11:IZ=-2
  27. 550 IF B$="5" THEN IX=-1:IY=12:IZ=-2
  28. 560 IF B$="6" THEN IX=16:IY=-1:IZ=-3
  29. 570 IF B$="7" THEN IX=-5:IY=-11:IZ=2
  30. 580 IF B$="8" THEN IX=-15:IY=-1:IZ=3
  31. 590 IF B$="9" THEN IX=-16:IY=-9:IZ=-4
  32. 600 IF B$="10" THEN IX=12:IY=1:IZ=1
  33. 610 IF B$="11" THEN IX=2:IY=10:IZ=0
  34. 620 IF B$="12" THEN IX=1:IY=15:IZ=4
  35. 630 IF B$="13" THEN IX=-13:IY=-3:IZ=-3
  36. 640 IF B$="14" THEN IX=-12:IY=2:IZ=2
  37. 650 IF B$="15" THEN IX=0:IY=0:IZ=0
  38. 660 IF B$="16" THEN IX=-1:IY=4:IZ=3
  39. 670 IF B$="17" THEN IX=4:IY=-1:IZ=10
  40. 680 IF B$="18" THEN IX=-2:IY=-4:IZ=3
  41. 690 IF B$="19" THEN IX=-15:IY=12:IZ=-4
  42. 700 IF B$="20" THEN IX=0:IY=-13:IZ=-1
  43. 710 IF B$="21" THEN IX=-13:IY=5:IZ=0
  44. 720 IF B$="22" THEN IX=9:IY=5:IZ=3
  45. 730 IF B$="23" THEN IX=4:IY=-6:IZ=-1
  46. 740 IF B$="24" THEN IX=1:IY=1:IZ=6
  47. 750 IF B$="25" THEN IX=6:IY=3:IZ=5
  48. 760 RETURN
  49. 800 REM TRAVEL CALC
  50. 810 DIST = SQR(ABS(OX-DX)^2 + ABS(OY-DY)^2 + ABS(OZ-DZ)^2 )
  51. 815 GOSUB 1000
  52. 820 A$ = "##.#"
  53. 840 PRINT@30,"DISTANCE:";
  54. 850 PRINT USING A$; DIST;
  55. 852 PRINT@110,"DAYS:";:PRINT USING A$; DIST;
  56. 853 PRINT CHR$(7)
  57. 854 PRINT@190,"FUEL USED:";:PRINT USING A$; DIST*2;
  58. 855 PRINT@270,"";:INPUT"ANOTHER(Y/N)";B$
  59. 870 IF B$="Y" THEN GOTO 10
  60. 880 GOTO 10000
  61. 1000 REM DISPLAY MAP
  62. 1010 PRINT CHR$(12)
  63. 1020 LINE(0,0)-(81,0)
  64. 1030 LINE(0,63)-(81,63)
  65. 1040 LINE(0,0)-(0,63)
  66. 1050 LINE(81,0)-(81,63)
  67. 1060 PSET(42,24)
  68. 1070 PSET(26,28)
  69. 1080 PSET(30,16)
  70. 1090 PSET(24,54)
  71. 1100 PSET(38,56)
  72. 1110 PSET(72,30)
  73. 1120 PSET(30,10)
  74. 1130 PSET(10,30)
  75. 1140 PSET(8,14)
  76. 1150 PSET(64,34)
  77. 1160 PSET(44,52)
  78. 1170 PSET(42,62)
  79. 1180 PSET(14,26)
  80. 1190 PSET(16,36)
  81. 1200 PSET(40,32)
  82. 1210 PSET(38,40)
  83. 1220 PSET(48,30)
  84. 1230 PSET(36,24)
  85. 1240 PSET(10,56)
  86. 1250 PSET(40,6)
  87. 1260 PSET(14,42)
  88. 1270 PSET(58,42)
  89. 1280 PSET(48,20)
  90. 1290 PSET(42,34)
  91. 1300 PSET(52,38)
  92. 1310 P1X=(OX+20)*2:P1Y=(OY+16)*2
  93. 1320 P2X=(DX+20)*2:P2Y=(DY+16)*2
  94. 1330 LINE(P1X,P1Y)-(P2X,P2Y)
  95. 1340 RETURN
  96. 10000 CLS
  97. 10010 PRINT "END OF LINE"
RAW Paste Data