-
Notifications
You must be signed in to change notification settings - Fork 1
/
vulcedit.txt
100 lines (99 loc) · 2.31 KB
/
vulcedit.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
5 REM COPYRIGHT 1987 COMPUTE! PUBLICATIONS, INC. ALL RIGHTS RESERVED
6 HOME: VTAB 10: HTAB 13: PRINT "Copyright 1987": HTAB 7: PRINT "COMPUTE! Publications, Inc.": HTAB 11: PRINT "All Rights Reserved.": FOR I=1 TO 50: NEXT I
10 LOMEM: 8192
20 HOME
30 DIM M(40,24)
40 DIM GX(32),GY(32)
50 FOR T=1 TO 40
60 HTAB(T):VTAB 1:PRINT "*";
70 HTAB(T):VTAB(23):PRINT "*";
80 M(T,1)=1:M(T,23)=1
90 NEXT T
100 FOR T=1 TO 23
110 M(1,T)=1:M(40,T)=1
120 HTAB 1:VTAB(T):PRINT "*";
130 HTAB 40:VTAB(T):PRINT "*";
140 NEXT T
150 X=20:Y=13
160 HTAB(X):VTAB(Y):PRINT "+";
170 HTAB(X):VTAB(Y)
180 N=M(X,Y)
190 IF N=1 THEN PRINT "*";
200 IF N=0 THEN PRINT " ";
210 IF N=2 THEN PRINT "G";
220 IF PEEK(-16384)<128 THEN 160
230 GET R$
240 IF R$="S" THEN PRINT CHR$(7):SX=X:SY=Y
250 IF R$=" " THEN M(X,Y)=0
260 IF R$="X" THEN M(X,Y)=1
270 IF R$="G" THEN M(X,Y)=2
280 IF R$="I" THEN Y=Y-1
290 IF R$="K" THEN Y=Y+1
300 IF R$="J" THEN X=X-1
310 IF R$="L" THEN X=X+1
320 IF R$=CHR$(13) THEN 380
330 IF Y<2 THEN Y=2
340 IF X<2 THEN X=2
350 IF Y>22 THEN Y=22
360 IF X>39 THEN X=39
370 GOTO 160
380 IF SX=0 THEN HTAB 1:VTAB 24:PRINT CHR$(7)"NO START POSITION";:GET A$:HTAB 1:PRINT SPC(17);: GOTO 160
390 HOME:INPUT "RANDOMNESS -> ";RA
400 GOSUB 580
410 G=5*4096+100
420 X=1:R=0
430 PRINT
440 PRINT "FORMING MAP:"
450 FOR O=1 TO 24
460 FOR T=1 TO 40
470 IF M(T,O)=X THEN R=R+1:GOTO 510
480 X=M(T,O): POKE G,R
490 R=1:G=G+1
500 GOTO 520
510 IF R=256 THEN POKE G,255: POKE G+1,0:G=G+2:R=1
520 NEXT T
530 PRINT ".";: NEXT O
540 PRINT
550 LE=(G-((5*4096)+32))+2
560 LE$=STR$(LE)
570 GOTO 810
580 PRINT
590 PRINT "COUNTING GENERATORS:"
600 J=0
610 FOR O=1 TO 23
620 PRINT ".";
630 FOR T=1 TO 40
640 IF M(T,O)<>2 THEN 690
650 IF J=33 THEN PRINT:PRINT "ONLY FIRST 32 GENERATORS INCLUDED":T=40:O=23:GOTO 690
660 GX(J)=T-1:GY(J)=(O-1)*8
670 M(T,O)=0
680 J=J+1
690 NEXT T,O
700 G=5*4096+32
710 POKE G,J
720 G=5*4096+37
730 FOR R=0 TO 30
740 POKE G+R,GX(R)
750 NEXT R
760 G=5*4096+69
770 FOR R=0 TO 30
780 POKE G+R,GY(R)
790 NEXT R
800 RETURN
810 G=5*4096+33
820 POKE G, RA
830 G=G+1
840 POKE G,SX-1
850 G=G+1
860 POKE G,(SY-1)*8
870 D$=CHR$(4)
880 INPUT "LEVEL NUMBER -> ";L
890 IF L<1 OR L>99 THEN 880
900 L$=STR$(L)
910 IF L<10 THEN L$="0"+L$
920 PRINT D$;"BSAVE LEV"+L$+",A$5020,L"+LE$
930 PRINT D$;"BLOAD NUMLEV"
940 G=PEEK(768)
950 IF G<L THEN G=L
960 POKE 768,G
970 PRINT D$;"BSAVE NUMLEV,A$0300,L$0001"