-
Notifications
You must be signed in to change notification settings - Fork 0
/
RoadWarrior.txt
139 lines (138 loc) · 9.2 KB
/
RoadWarrior.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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
100 ! ROAD WARRIOR
110 !
120 ! BY HOWARD UMAN
130 ! 3913 SYBIL ROAD
140 ! RANDALLSTOWN, MD
150 ! 21133
160 !
170 ! REQUIRES:
180 ! Extended BASIC
190 ! JOYSTICK #1
200 ! 32K MEMORY
210 !
220 !
225 ! Thanks to MICROpendium for the "SCRLDN" routine.
226 !
230 CALL MAGNIFY(3) :: HI=0
240 CALL INIT :: CALL CLEAR :: CALL SCREEN(2) :: CALL CHAR(96,"FFFFC3C3C3C3FFFF") :: FOR I=0 TO 8 :: CALL COLOR(I,14,2) :: NEXT I :: CALL COLOR(9,7,5)
250 DISPLAY AT(2,1):" ``` `` `` ``` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ``` ` ` ```` ` `"
260 DISPLAY AT(6,1):" ` ` ` ` ` ` ` ` ` ` `` ` ` ```"
270 DISPLAY AT(10,1):"` ` ` `` `` ` ` `` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ` ``` `` `` ` ` ` `` ` ` ` ` ` ` ` ` ` ` ` ` ` `"
280 DISPLAY AT(14,1):" ` ` ` ` ` ` ` ` ` ` ` `"
290 DISPLAY AT(17,6):"FAIRWARE PROGRAM"
291 DISPLAY AT(19,3):"(C) 1987 HOWARD UMAN" :: DISPLAY AT(20,12):"3913 SYBIL ROAD" :: DISPLAY AT(21,12):"RAND., MD 21133"
300 CALL SOUND(750,247,3,-3,3,494,3)
310 CALL SOUND(650,440,3,220,3,-3,3)
320 FOR I=1 TO 3 :: CALL SOUND(200,165,0) :: NEXT I
330 CALL SOUND(250,196,0)
340 CALL SOUND(250,175,0)
350 CALL SOUND(250,165,0)
360 CALL SOUND(250,147,0)
370 CALL SOUND(250,131,0)
380 CALL SOUND(200,123,0)
390 CALL SOUND(500,110,0)
400 CALL SOUND(600,220,0,-3,0)
410 DISPLAY AT(24,4):"PRESS ANY KEY TO PLAY"
420 CALL COLOR(9,7,5) :: CALL KEY(0,K,S) :: CALL COLOR(9,5,7) :: IF S=0 THEN 420
430 CALL CLEAR :: DISPLAY AT(12,1)BEEP:"PLEASE WAIT....GETTING READY"
440 CALL CHAR(140,"01010101000306040406030405050101000000000080C04040C0804040400000")!MOTORCYCLE
450 CALL CHAR(136,"03050F2F2C0B1B1F1F1F1E1E0E2E2E278040E0E868A0B0F0F0F0F0F0E0E8E8C8")!ENEMY CAR
460 CALL CHAR(132,"03070F0F0C0B0F1F1F1F1F1F1F0B040780C0E0E060A0E0F0F0F0F0F0F0A040C0")!OUR CAR
470 CALL CHAR(128,"070F0F0F001F3F3F3E3E383E3E3F1F1FC0E0E0E000F0F8F8F8F838F8F8F8F0F0")!AMBULANCE
480 CALL CHAR(120,"0000000200080000100002000000000000002000000820000008200000000000")!EXPLOSION #1
490 CALL CHAR(124,"0000040010000000200000080000000000100000000410000004001000000000")!EXPLOSION #2
500 CALL CHAR(116,"070F1C1B3F3F373737373F3F141C141CC0E070B0F8F8D8D8D8D8F8F850705070")!TRUCK PART 1
510 CALL CHAR(112,"141C141C555F555C141C0000000000005070507054F454745070000000000000")!TRUCK PART 2
520 CALL CHAR(108,"EC94F8B060A0C000F8F0F8BC5EECFEFF37291F0D060503001F0F1F3D7A377FFF")!BOARDERS OF ROAD
530 CALL CHAR(104,"0000000000000000BFDFEFFFFEBCBE8FFFE3FFAA8AA8FFFFFDEAF7EFFDBB5BBB")!GRASS AND STUFF
540 CALL CHAR(92,"0008000020000000400000001000000008000000000208000002001000000000")!EXPLOSION #3
550 CALL CHAR(96,"10000040000000008000000000200000000000000001040000010000080000000")!EXPLOSION #4
560 CALL CHAR(100,"0000008000000000000000000000400000000000000002000000000000040000")!EXPLOSION #5
570 RANDOMIZE :: DIM R$(4),B$(4),M$(3,2)
580 B$(1)="ijkkjikkijkijjjjikjkkjikjiij" :: B$(2)="kijikkjijkkkjikjkkijkkijjkik" :: B$(3)="ijkikkjjikkjkjikikkiijkikkji"
590 B$(4)="jkjkjjjkikjjkkiiijkikjjkikjj"
600 M$(1,1)="lhhhhhn" :: M$(1,2)="mhhhhho" :: M$(2,1)="mhhhhn" :: M$(2,2)="lhhhho"
610 M$(3,2)="lhhhn" :: M$(3,1)="mhhho"
620 R$(1)="ijkikjjkilhhhhhhhhnjikkijkij" :: R$(2)="jkiikjkijlhhhhhhhhokjikkjkji" :: R$(3)="kjikjiijkmhhhhhhhhoikijjikij"
630 R$(4)="ijikkikjkmhhhhhhhhnjikijiijk"
640 CALL COLOR(10,13,2)
650 CALL LOAD(8196,63,248)
660 CALL LOAD(16376,83,67,82,76,68,78,48,0)
670 CALL LOAD(12288,2,224,131,224,4,192,2,1,37,20,2,2,2,224,4,32,32,44)
680 CALL LOAD(12306,2,1,36,244,2,2,3,0,4,32,32,36,4,91)
690 FOR C=9460 TO 9492 :: CALL LOAD(C,128) :: NEXT C
700 ! The above is from the September, 1985 issue of MICROpendium User Notes. CALL LINK("SCRLDN")
710 ! INITIALIZE SCORES AND STUFF
720 SCORE=0 :: MEN=3 :: LEV=1
730 ! SCREEN 1
740 CALL DELSPRITE(ALL) :: CALL CLEAR :: SPEED=0 :: DISPLAY AT(1,1):SCORE :: DISPLAY AT(1,27):MEN
750 FOR I=2 TO 24 :: DISPLAY AT(I,1):R$(INT(RND*4)+1) :: NEXT I :: IF LEV>3 THEN LEV=3
760 GOSUB 960
770 FLAG=0 :: TIME=LEV*10+65
780 FOR K=2 TO LEV+2 :: CALL SPRITE(#K,(INT(RND*2)+1)*4+132,INT(RND*7+3),1,INT(RND*58)+94,INT(RND*8)+10,0) :: NEXT K :: FOR RO=1 TO TIME
790 CALL JOYST(1,X,Y) :: CALL MOTION(#1,0,X)
800 DISPLAY AT(1,1):R$(INT(RND*4)+1) :: CALL LINK("SCRLDN") :: DISPLAY AT(1,1):SCORE :: DISPLAY AT(1,27):MEN
810 CALL POSITION(#1,XX,YY) :: IF YY>94 AND YY<152 THEN 890
820 CALL MOTION(#1,0,0) :: CALL DELSPRITE(#2,#3,#4,#5,#6) :: CALL POSITION(#1,XXX,YYY) :: CALL SPRITE(#2,132,16,XXX,YYY,#1,124,7,XXX-5,YYY)
830 FOR X=1 TO 3 :: FOR Y=0 TO 4 STEP 4 :: CALL SOUND(-999,-8,Y+10,120,27,127,28,1100,30) :: CALL PATTERN(#1,120+Y) :: NEXT Y :: NEXT X
840 FOR Y=0 TO 4 STEP 4 :: CALL SOUND(-999,-8,Y/3,120,27,127,28,1100,30) :: CALL PATTERN(#2,120+Y,#1,120+Y) :: NEXT Y
850 FOR Y=8 TO 16 STEP 4 :: CALL SOUND(-999,-8,Y/3,120,27,127,28,1100,30) :: CALL PATTERN(#2,84+Y,#1,84+Y) :: NEXT Y
860 MEN=MEN-1 :: DISPLAY AT(1,27):MEN
870 IF MEN<0 THEN 1060 ELSE IF FLAG=1 THEN 730
880 GOSUB 960 :: TIME=TIME-RO+5*LEV :: GOTO 780
890 AM=INT(RND*50)+1 :: IF AM=47 THEN GOSUB 1300 :: GOSUB 1440
900 FOR K=1 TO LEV+1 :: CALL POSITION(#K+1,AA,BB) :: IF AA<150 THEN 930 ELSE CALL SPRITE(#K+1,(INT(RND*2)+1)*4+132,INT(RND*7+3),1,INT(RND*58+94),INT(RND*8)+10,0)
910 CALL SOUND(-100,880,0) :: CALL SOUND(-100,440,0) :: SCORE=SCORE+LEV*25
920 REM
930 CALL COINC(#1,AA,BB,12,CO) :: CALL JOYST(1,X,Y) :: CALL MOTION(#1,0,X*1.25)
940 IF CO THEN 820
950 NEXT K :: NEXT RO :: GOTO 1150
960 CALL DELSPRITE(ALL) :: CALL LOAD(-31806,64)
970 CALL SPRITE(#2,116,7,196,100,-10+LEV,5,#3,112,7,212,100,-10+LEV,5,#1,132,11,209,100,-10+LEV,5) :: CALL LOAD(-31806,0)
980 CALL SOUND(-1,110,0,-3,0) :: CALL POSITION(#2,XX,YY) :: IF YY<148 THEN 980 ELSE CALL LOAD(-31806,64) :: CALL SOUND(-1000,440,3,220,3,-3,3)
990 CALL MOTION(#1,4,0,#2,4,0,#3,4,0) :: CALL LOAD(-31806,0) :: CALL SOUND(-100,165,0) :: FOR DE=1 TO 200 :: NEXT DE :: CALL LOAD(-31806,64)
1000 CALL SOUND(-100,165,0) :: CALL MOTION(#1,5,0,#2,0,0,#3,0,0) :: CALL LOAD(-31806,0) :: FOR DE=1 TO 200 :: NEXT DE
1010 CALL MOTION(#1,0,0) :: CALL SOUND(-100,165,0) :: CALL LOAD(-31806,64) :: CALL MOTION(#2,-9,-2,#3,-9,-2) :: CALL LOAD(-31806,0)
1020 CALL SOUND(-1,110,0,-3,0) :: CALL POSITION(#2,XX,YY) :: IF XX<192 THEN 1020 ELSE CALL DELSPRITE(#2,#3)
1030 CALL POSITION(#1,XX,YY) :: FOR II=YY TO 120 STEP-1 :: CALL SOUND(-100,II*4-330,0) :: CALL LOCATE(#1,XX,II) :: NEXT II
1040 FOR II=1 TO 4 :: CALL SOUND(1,110,0,220,0,440,0) :: NEXT II
1050 RETURN
1060 ! PLAY AGAIN?
1070 CALL DELSPRITE(ALL) :: CALL CLEAR :: DISPLAY AT(5,5):"G A M E O V E R" :: IF SCORE>HI THEN HI=SCORE
1080 DISPLAY AT(9,(28-LEN("SCORE "&STR$(SCORE)))/2):"SCORE "&STR$(SCORE)
1090 DISPLAY AT(11,(28-LEN("HI SCORE "&STR$(HI)))/2):"HI SCORE "&STR$(HI)
1100 DISPLAY AT(17,5):"PLAY AGAIN? (Y/N)"
1110 DISPLAY AT(5,1) :: CALL KEY(3,K,S) :: IF K=78 THEN 1140 ELSE CALL SOUND(-1,110,0,-3,0) :: DISPLAY AT(5,5):"G A M E O V E R"
1120 IF K<>89 THEN 1110
1130 CALL CLEAR :: GOTO 720
1140 CALL CLEAR :: STOP
1150 CALL MOTION(#1,0,0) :: CALL DELSPRITE(#2,#3,#4,#5,#6) :: DISPLAY AT(1,1):SCORE;
1160 FOR I=1 TO 6 :: DISPLAY AT(5,12)SIZE(5)BEEP:"BONUS" :: DISPLAY AT(7,12)SIZE(6):"SCREEN" :: DISPLAY AT(5,12)SIZE(5):"hhhhh" :: DISPLAY AT(7,12)SIZE(6):"hhhhhh"
1170 NEXT I :: D=6-LEV
1180 FOR Q=9 TO D+2 STEP-1 :: DISPLAY AT(1,1):B$(INT(RND*4)+1) :: DISPLAY AT(1,(29-Q)/2)SIZE(Q):"l"&RPT$("h",Q-2)&"n"
1190 CALL LINK("SCRLDN") :: NEXT Q
1200 AC=11 :: FOR RO=1 TO 40+LEV*25 :: AC=AC+INT(RND*3)-1 :: IF AC<2 THEN AC=2
1210 IF AC>21 THEN AC=21
1220 DISPLAY AT(1,1):B$(INT(RND*4)+1) :: DISPLAY AT(1,AC)SIZE(D+2):M$(LEV,INT(RND*2)+1) :: CALL LINK("SCRLDN")
1230 CALL POSITION(#1,XXX,YYY) :: V=INT((XXX+7)/8)+.25 :: H1=INT((YYY+9)/8) :: H2=H1+.5 :: CALL GCHAR(V,H1,A1) :: CALL GCHAR(V,H2,A2)
1240 IF A1<>104 OR A2<>104 THEN FLAG=1 :: LEV=LEV+1 :: GOTO 820
1250 CALL JOYST(1,X,Y) :: CALL MOTION(#1,0,X) :: NEXT RO
1260 CALL DELSPRITE(ALL) :: CALL CLEAR :: DISPLAY AT(12,5):"BONUS: "&STR$(LEV)&"000"&" POINTS" :: FOR A=1 TO 3
1270 FOR I=110 TO 990 STEP 220 :: DISPLAY AT(12,12)SIZE(4) :: CALL SOUND(-100,I,0) :: DISPLAY AT(12,12):STR$(LEV)&"000"; :: NEXT I
1280 FOR I=990 TO 110 STEP-220 :: DISPLAY AT(12,12)SIZE(4) :: CALL SOUND(-100,I,0) :: DISPLAY AT(12,12):STR$(LEV)&"000"; :: NEXT I :: NEXT A
1290 SCORE=SCORE+LEV*1000 :: LEV=LEV+1 :: GOTO 740
1300 REM AMBULANCE
1310 CALL MOTION(#1,0,0) :: CALL DELSPRITE(#2,#3,#4,#5,#6) :: FOR ZA=1 TO 2 :: FOR AZ=700 TO 990 STEP 10 :: CALL SOUND(-500,AZ,0) :: NEXT AZ
1320 DISPLAY AT(1,1):R$(INT(RND*4)+1) :: CALL LINK("SCRLDN") :: DISPLAY AT(1,1):SCORE;
1330 DISPLAY AT(1,27):MEN
1340 FOR AZ=990 TO 700 STEP-10 :: CALL SOUND(-500,AZ,0) :: NEXT AZ :: DISPLAY AT(1,1):R$(INT(RND*4)+1) :: CALL LINK("SCRLDN")
1350 DISPLAY AT(1,1):SCORE; :: DISPLAY AT(1,27):MEN
1360 NEXT ZA :: CALL SPRITE(#3,128,16,193,INT(RND*58)+94)
1370 CALL JOYST(1,X,Y) :: CALL MOTION(#1,0,X*1.25)
1380 CALL MOTION(#3,-20,0)
1390 CALL JOYST(1,X,Y) :: CALL MOTION(#1,0,X*1.25) :: CALL POSITION(#3,AAA,BBB) :: IF AAA<20 THEN 1430
1400 CALL POSITION(#1,XXX,YYY) :: IF XXX<94 OR XXX>152 THEN 820
1410 CALL COINC(#1,AAA,BBB,14,A) :: IF A THEN 820
1420 GOTO 1390
1430 CALL DELSPRITE(#3) :: CALL MOTION(#1,0,0) :: SCORE=SCORE+100*LEV :: RO=RO+7 :: RETURN
1440 FOR K=2 TO LEV+2 :: CALL SPRITE(#K,(INT(RND*2)+1)*4+132,INT(RND*7+3),1,INT(RND*58)+94,INT(RND*8)+10,0) :: NEXT K :: RETURN