ksp: it's all together!

This commit is contained in:
Vince Weaver 2016-05-27 01:36:09 -04:00
parent 80deee7f36
commit 62de7f7431

View File

@ -1,27 +1,145 @@
7 TEXT:HOME 5 REM *** KSP by Vince Weaver ***
20 AN$="ZURGTROYD":SS=3 6 REM *** A VMW Software Production ***
100 EN(1)=1:ST(1)=1:FT(1)=1 10 HOME
101 EN(2)=2:ST(2)=2:FT(2)=1 20 HGR
102 EN(3)=3:ST(3)=3:FT(3)=1 100 REM *** SQUAD SCREEN ***
125 POKE 232,0:POKE 233,16 110 PRINT CHR$(4);"BLOAD SQUAD.HGR,A$2000"
127 PRINT CHR$(4);"BLOAD ROCKET.SHAPE,A$1000" 580 S=0
130 REM FOR L=7925 TO 8175: READ B:POKE L,B:NEXT L 585 I=INT(RND(1)*8)+1
1000 PRINT "ROCKET SUMMARY:":PRINT 590 VTAB 21: PRINT " ";
1002 G=-9.8:LN=0:CQ=0:OM=0:S=SS 600 FOR I=1 TO 32: PRINT ".";: NEXT I
1005 FOR I=1 TO S 700 FOR J=1 TO 32
1010 EM(I)=EN(I)*1.5+ST(I)*FT(I)*0.5 704 REM *** LOADING SCREEN ***
1012 IF I=1 THEN EM(I)=EM(I)+1.0 708 IF J=16 THEN PRINT: PRINT CHR$(4);"BLOAD LOADING.HGR,A$2000"
1014 FM(I)=ST(I)*FT(I)*4.0 710 HTAB J+4:VTAB 21
1015 SF(I)=FM(I) 720 INVERSE: PRINT " ";: NORMAL
1016 SM(I)=EM(I)+FM(I) 790 S=S+1: IF S=4 THEN S=0
1020 TM(I)=0 795 IF S<>1 GOTO 840
1022 FOR J=1 TO I 800 I=I+1: IF I > 8 THEN I=1
1025 TM(I)=TM(I)+SM(J) 802 VTAB 22: HTAB 1
1030 NEXT J 803 PRINT " ";
1035 TH(I)=EN(I)*168 805 ON I GOSUB 850,851,852,853,854,855,856,857
1040 DV(I)=270*-G*LOG(TM(I)/(TM(I)-FM(I))) 840 FOR T=1 TO 250: NEXT T
1050 TW(I)=TH(I)/(TM(I)*-G) 842 NEXT J
1055 FF(I)=TH(I)/(270*-G) 845 GOTO 900
850 HTAB 10:PRINT "Adding Extraneous Ks":RETURN
851 HTAB 14:PRINT "Locating Jeb":RETURN
852 HTAB 11:PRINT "Breaking Quicksaves":RETURN
853 HTAB 12:PRINT "Patching Conics":RETURN
854 HTAB 12:PRINT "Spinning up Duna":RETURN
855 HTAB 11:PRINT "Warming up the 6502":RETURN
856 HTAB 10:PRINT "Preparing Explosions":RETURN
857 HTAB 10:PRINT "Unleashing the Kraken":RETURN
900 REM *** TITLE SCREEN ***
902 HOME: PRINT: PRINT CHR$(4);"BLOAD TITLE.HGR,A$2000"
903 HTAB 27:VTAB 24: PRINT "VERSION 1.3.7";
905 REM ****************
906 REM KSP THEME MUSIC
907 REM SEE http://eightbitsoundandfury.ld8.org/programming.html
908 REM ****************
910 FOR L = 770 TO 790: READ V: POKE L,V: NEXT L
920 DATA 173,48,192,136,208,5,206,1,3,240,9
930 DATA 202,208,245,174,0,3,76,2,3,96
935 REM L2ECGL4CEGL2B-AGL4CEGL2B-AGCD
940 FOR I=1 TO 17: READ F: READ D: POKE 768,F: POKE 769,D: CALL 770: NEXT I
950 DATA 202,216,255,216,170,216
955 DATA 255,108,202,108,170,108
960 DATA 143,216,152,216,170,216
965 DATA 255,108,202,108,170,108
970 DATA 143,216,152,216,170,216,255,216,227,255
989 REM *** DONE LOADING ***
999 GET A$
1000 REM *** VAB ***
1010 REM HIMEM: 8135
1012 POKE 232,0:POKE 233,16
1015 PRINT:PRINT CHR$(4);"BLOAD VAB.SHAPE,A$1000"
1020 REM POKE 232,199: POKE 233,31
1030 REM FOR L = 8135 TO 8175: READ B: POKE L,B: NEXT L
1035 HGR : ROT= 0: SCALE= 2
1037 PRINT CHR$(4);"BLOAD VAB.HGR,A$2000"
1150 X=132:Y=28
1155 XDRAW 1 AT X,Y+2
1200 HOME
1205 INVERSE : VTAB 21: HTAB 7
1207 PRINT " VEHICLE ASSEMBLY BUILDING "
1208 NORMAL
1209 PRINT
1220 PRINT "HOW MANY STAGES? (1-3)";
1225 INPUT S
1230 FOR I = 1 TO S
1240 PRINT "HOW MANY STACKS, STAGE ";I;" (1-3)";
1245 INPUT T
1247 ST(I) = T
1260 PRINT "HOW MANY FUEL TANKS PER STACK, STAGE ";I;" (1-2)";
1265 INPUT F
1267 FT(I) = F
1268 FOR J = 1 TO F
1270 XDRAW 2 AT X, Y+13*J
1272 IF T >1 THEN XDRAW 2 AT X-14, Y+13*J
1274 IF T >2 THEN XDRAW 2 AT X+14, Y+13*J
1278 NEXT J
1279 Y=Y+13*F
1280 PRINT "HOW MANY ENGINES, STAGE ";I;" (1-";T;")";
1285 INPUT E
1287 EN(I) = E
1290 XDRAW 1 AT X, Y+8
1292 IF E >1 THEN XDRAW 1 AT X-14, Y+8
1294 IF E >2 THEN XDRAW 1 AT X+14, Y+8
1297 Y=Y+6
1300 NEXT I
1330 PRINT "HOW MANY PARACHUTES? (0-3)";
1340 INPUT P
1350 PRINT "HOW MANY STRUTS? (0-20000)";
1360 INPUT SR
1370 SS=S
1500 REM *** ASTRONAUT COMPLEX ***
1505 TEXT: HOME
1510 HTAB 11
1515 INVERSE: PRINT "ASTRONAUT COMPLEX": NORMAL
1520 PRINT
1522 PRINT "CHOOSE ONE KERBAL FOR THIS MISSION:"
1525 PRINT
1530 FOR I=1 TO 8
1540 IF AD(I) GOTO 1600
1550 ON I GOSUB 1641,1642,1643,1644,1645,1646,1647,1648
1560 PRINT " ";I;". ";AN$,AJ$;" S: ";AS$;" C: ";AC$
1600 NEXT I
1605 PRINT
1610 INPUT W
1615 IF W<1 OR W>8 THEN PRINT "INVALID INPUT, PLEASE TRY AGAIN!": GOTO 1610
1630 ON W GOSUB 1641,1642,1643,1644,1645,1646,1647,1648
1630 GOTO 1700
1641 AN$="JEBEDIAH" :AJ$="PILOT":AS$="****":AC$="****":RETURN
1642 AN$="VALENTINA":AJ$="PILOT":AS$="****":AC$="****":RETURN
1643 AN$="KAI" :AJ$="SCI ":AS$="*** ":AC$="***":RETURN
1644 AN$="KUROSHIN" :AJ$="ENGR ":AS$="** ":AC$="*":RETURN
1645 AN$="DESKTOP" :AJ$="ENGR ":AS$="* ":AC$="***":RETURN
1646 AN$="SLASHDOT" :AJ$="SCI ":AS$="*** ":AC$="*":RETURN
1647 AN$="ZURGTROYD":AJ$="PILOT":AS$="** ":AC$="***":RETURN
1648 AN$="DAPHTY" :AJ$="ENGR ":AS$="*** ":AC$="***":RETURN
1700 REM TEXT:HOME
1720 REM AN$="ZURGTROYD":SS=3
1750 REM EN(1)=1:ST(1)=1:FT(1)=1
1751 REM EN(2)=2:ST(2)=2:FT(2)=1
1752 REM EN(3)=3:ST(3)=3:FT(3)=1
1776 POKE 232,0:POKE 233,16
1783 PRINT CHR$(4);"BLOAD ROCKET.SHAPE,A$1000"
1800 PRINT "ROCKET SUMMARY:":PRINT
1802 G=-9.8:LN=0:CQ=0:OM=0:S=SS
1805 FOR I=1 TO S
1810 EM(I)=EN(I)*1.5+ST(I)*FT(I)*0.5
1812 IF I=1 THEN EM(I)=EM(I)+1.0
1814 FM(I)=ST(I)*FT(I)*4.0
1815 SF(I)=FM(I)
1816 SM(I)=EM(I)+FM(I)
1820 TM(I)=0
1822 FOR J=1 TO I
1825 TM(I)=TM(I)+SM(J)
1830 NEXT J
1835 TH(I)=EN(I)*168
1840 DV(I)=270*-G*LOG(TM(I)/(TM(I)-FM(I)))
1850 TW(I)=TH(I)/(TM(I)*-G)
1855 FF(I)=TH(I)/(270*-G)
1990 PRINT "STAGE: ";4-I 1990 PRINT "STAGE: ";4-I
1991 PRINT " TANKS=";ST(I)*FT(I);" ENGINES=";EN(I) 1991 PRINT " TANKS=";ST(I)*FT(I);" ENGINES=";EN(I)
1992 PRINT " STAGE MASS=";SM(I);" TOTAL MASS=";TM(I) 1992 PRINT " STAGE MASS=";SM(I);" TOTAL MASS=";TM(I)
@ -157,9 +275,9 @@
9150 PRINT " 5. QUIT GAME" 9150 PRINT " 5. QUIT GAME"
9160 PRINT "---> "; 9160 PRINT "---> ";
9170 GET A$ 9170 GET A$
9171 IF A$="1" GOTO 1 9171 IF A$="1" GOTO 1000
9172 IF A$="2" GOTO 2 9172 IF A$="2" GOTO 1500
9173 IF A$="3" GOTO 1000 9173 IF A$="3" GOTO 1776
9174 IF A$="4" OR A$="H" GOTO 9200 9174 IF A$="4" OR A$="H" GOTO 9200
9175 IF A$="5" OR A$="Q" THEN TEXT:HOME:END 9175 IF A$="5" OR A$="Q" THEN TEXT:HOME:END
9176 GOTO 9160 9176 GOTO 9160