-
Notifications
You must be signed in to change notification settings - Fork 0
/
Piranha.txt
171 lines (170 loc) · 9.56 KB
/
Piranha.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
1 CALL INIT :: CALL LOAD(-31806,16)
2 RANDOMIZE :: HI=0 :: CALL CLEAR
3 CALL MAGNIFY(3)
4 CALL SCREEN(6) :: FOR I=1 TO 8 :: CALL COLOR(I,16,6) :: NEXT I
5 DISPLAY AT(7,9)ERASE ALL:"***********" :: DISPLAY AT(8,9):"* *" :: DISPLAY AT(9,9):"* PIRANHA *" :: DISPLAY AT(10,9):"* *"
6 DISPLAY AT(11,9):"***********"
7 DISPLAY AT(24,1):" NEED INSTRUCTIONS? (Y/N)"
8 DISPLAY AT(14,6):"FAIRWARE PROGRAM"
9 DISPLAY AT(17,4):"(C) 1985 HOWARD UMAN" :: DISPLAY AT(18,13):"3913 SYBIL ROAD" :: DISPLAY AT(19,13):"RAND., MD 21133"
10 CALL SOUND(-1000,110,2)
11 CALL KEY(0,K,S)
12 CALL SOUND(-1000,123,2)
13 IF S=0 OR K<>ASC("Y")AND K<>ASC("N")AND K<>ASC("n")AND K<>ASC("y")THEN 10
14 CALL SOUND(-1,40000,30)
15 IF K=ASC("N")OR K=ASC("n")THEN 27
16 CALL CLEAR
17 F=1
18 DISPLAY AT(1,8):"INSTRUCTIONS"
19 DISPLAY AT(3,1):"YOU ARE THE COMMANDER OF THE" :: DISPLAY AT(5,1):"PIRANHA. YOUR MISSION IS TO" :: DISPLAY AT(7,1):"SEEK OUT AND DESTROY ENEMY"
20 DISPLAY AT(9,1):"VESSELS WHICH ARE TRYING TO" :: DISPLAY AT(11,1):"INFILTRATE OUR SECRET BASE." :: DISPLAY AT(13,1):"OUR SAFETY IS IN YOUR HANDS."
21 DISPLAY AT(15,1):"USE THE JOYSTICK #1 TO PILOT" :: DISPLAY AT(17,1):"THE PIRANHA AND THE BUTTON" :: DISPLAY AT(19,1):"TO LAUNCH TORPEDOS. YOU MUST"
22 DISPLAY AT(21,1):"SURFACE TO REPLACE OXYGEN."
23 DISPLAY AT(23,3)BEEP:"PRESS ANY KEY TO START"
24 CALL KEY(0,K,S)
25 IF S=0 THEN 24
26 REM SETUP
27 CALL CLEAR
28 DISPLAY AT(24,1)BEEP:" ALPHA LOCK UP" :: DISPLAY AT(12,1):" ONE MOMENT PLEASE . . ." :: REM SETUP GRAPHICS
29 CALL CHAR(92,"0000000000000F0000000000000000000000000000008000000000000")
30 CALL CHAR(132,"FFFFFFFFFF00FF00",128,"0000040E1FBFFFFF0103070F5FFFFFFF0000000021FFFFFF0000040C9FBFFFFF")
31 CALL CHARPAT(128,A$,129,B$,130,C$,131,D$) :: CALL CHAR(124,A$&B$&C$&D$)
32 CALL CHAR(96,"020181C3FF7F7FFFC783000000000000000080C0F8E4FFFCE0FC00")
33 CALL CHAR(100,"01033F5FBFFF7F071F000000000000000000F9FBFFFBF98000000")
34 CALL CHAR(104,"6010E9BEE9106000000000000000000000E0000000E0000000000")
35 CALL CHAR(108,"03040B3E7F070E00000000000000000002847CFE0CFF00000000000")
36 CALL CHAR(112,"0000000000042E2476FF7F3F3F1F1F0F00000808090D1DBFFFFFFFFFFFFFFFFF")
37 CALL CHAR(116,"0000000000C0E0E0F8FEFFFEFCF8F0F000000000000000000000000000000000")
38 CALL CHAR(140,"0102050A152A55AA552A150A0502010040A050A854AA55AA55AA54A850A04080")
39 CALL CHAR(120,"9FC0B31F0F0301000300000000000000FF40F0E8F4FCF892FC48484848484848")
40 IF F=1 THEN GOSUB 153
41 CALL SCREEN(2) :: CALL CLEAR
42 CALL COLOR(11,5,5,14,8,8,13,13,8,12,12,5) :: CALL HCHAR(1,1,136,192)
43 DISPLAY AT(1,1):"SCORE:";SC :: DISPLAY AT(1,18):"OXYGEN:";OX :: DISPLAY AT(2,1):"HI SCORE:";HI :: DISPLAY AT(2,18):"VESSELS:";MEN
44 FOR I=1 TO 29 STEP 4 :: CALL HCHAR(5,I,128) :: CALL HCHAR(5,I+1,129) :: CALL HCHAR(5,I+2,130) :: CALL HCHAR(5,I+3,131) :: NEXT I
45 CALL HCHAR(6,1,132,32)
46 FOR I=7 TO 23 :: CALL HCHAR(I,1,112,32) :: NEXT I
47 FOR I=1 TO 29 STEP 4 :: CALL HCHAR(24,I,124) :: CALL HCHAR(24,I+1,125) :: CALL HCHAR(24,I+2,126) :: CALL HCHAR(24,I+3,127) :: NEXT I
48 CALL SOUND(-4000,-4,0)
49 CALL SPRITE(#2,120,7,28,1,#1,96,16,34,1) :: CALL MOTION(#1,0,5,#2,0,5)
50 CALL POSITION(#1,X,Y) :: IF Y>25 THEN CALL MOTION(#1,0,0,#2,0,0)ELSE 50
51 FOR I=34 TO 39 :: FOR DE=1 TO 30 :: NEXT DE :: CALL LOCATE(#1,I,27) :: NEXT I
52 CALL SOUND(-1000,-6,0) :: FOR DE=1 TO 100 :: NEXT DE
53 REM
54 CALL MOTION(#2,0,15,#1,5,0)
55 CALL SOUND(-4000,-4,0)
56 CALL POSITION(#2,X,Y) :: IF Y>230 THEN CALL DELSPRITE(#2)ELSE 56
57 CALL MOTION(#1,0,0) :: CALL SOUND(-1,40000,30)
58 EX3,EX4,EX5,EX6,EX7=0 :: SHOT=0 :: LEV=0 :: MEN=5 :: SC=0 :: OX=150
59 DISPLAY AT(1,1):"SCORE:";SC :: DISPLAY AT(1,18):"OXYGEN:";OX :: DISPLAY AT(2,1):"HI SCORE:";HI :: DISPLAY AT(2,18):"VESSELS:";MEN
60 CALL POSITION(#2,X2,Y2) :: IF X2<25 THEN CALL DELSPRITE(#2)
61 REM GAME!
62 REM GAME!!
63 REM GAME!!!
64 REM GAME!!!!
65 REM GAME!!!!!
66 CALL SPRITE(#8,112,2,34,241,#9,116,2,34,253) :: CALL MOTION(#8,0,-15,#9,0,-15)
67 IF LEV=SHOT THEN GOSUB 142
68 CALL KEY(1,K,S) :: IF K=18 THEN GOSUB 140
69 CALL POSITION(#2,XT,YT) :: IF YT<208 THEN 71
70 CALL DELSPRITE(#2)
71 CALL JOYST(1,XPOT,YPOT)
72 CALL SOUND(-1,440,0) :: OX=OX-3 :: DISPLAY AT(1,25):OX :: IF OX=0 THEN 128
73 CALL MOTION(#1,-YPOT*1.25,XPOT*1.25) :: CALL POSITION(#1,XLO,YLO) :: IF XLO>177 THEN 131
74 CALL POSITION(#2,ABC,CBA) :: IF CBA<208 THEN 76
75 CALL DELSPRITE(#2)
76 IF YLO>120 OR YLO<24 THEN CALL MOTION(#1,-YPOT*1.25,0)
77 IF YLO<24 THEN CALL LOCATE(#1,XLO,25) :: CALL COINC(#1,#8,16,A) :: IF A THEN 131
78 IF YLO>120 THEN CALL LOCATE(#1,XLO,119)
79 IF XLO<41 THEN OX=150 :: CALL MOTION(#1,0,0) :: CALL LOCATE(#1,41,YLO) :: DISPLAY AT(1,18):"OXYGEN:";OX
80 CALL COINC(#1,#8,12,C) :: IF C THEN 131
81 CALL KEY(1,K,S) :: IF K=18 THEN GOSUB 140
82 IF EX5=0 THEN 87
83 CALL POSITION(#1,CC,DD,#5,CD,DC) :: IF CC<CD THEN CALL MOTION(#5,-3,Z)ELSE CALL MOTION(#5,3,Z)
84 CALL POSITION(#5,CC,DD) :: IF CC<45 THEN CALL MOTION(#5,3,Z)
85 CALL COINC(#2,#5,20,A) :: IF A THEN 109
86 CALL COINC(#1,#5,15,A) :: IF A THEN 131
87 IF EX7=0 THEN 93
88 CALL POSITION(#1,CC,DD,#7,CD,DC) :: IF CC<CD THEN CALL MOTION(#7,-5,Y)ELSE CALL MOTION(#7,5,Y)
89 CALL POSITION(#7,CC,DD) :: IF CC<65 THEN CALL MOTION(#7,5,Y)
90 IF CC>160 THEN CALL MOTION(#7,-5,Y)
91 CALL COINC(#2,#7,20,A) :: IF A THEN 117
92 CALL COINC(#1,#7,15,A) :: IF A THEN 131
93 CALL COINC(#1,#8,16,HE) :: IF HE THEN 131
94 CALL POSITION(#2,YT,TY) :: IF TY<208 THEN 96
95 CALL DELSPRITE(#2)
96 FOR ROT=LEV TO 1 STEP-1 :: CALL COINC(#1,#ROT+2,15,HE) :: IF HE THEN 131
97 NEXT ROT
98 CALL POSITION(#2,LOX,LOY) :: IF LOY<208 THEN 100
99 CALL DELSPRITE(#2)
100 IF EX3<>1 THEN 103
101 CALL COINC(#2,#3,20,A) :: IF A=0 THEN 103
102 CALL COLOR(#3,7) :: CALL SOUND(-250,-2,0) :: SHOT=SHOT+1 :: EX3=0 :: SC=SC+50 :: CALL DELSPRITE(#2,#3) :: GOTO 120
103 REM
104 IF EX4=0 THEN 107
105 CALL COINC(#2,#4,20,A) :: IF A=0 THEN 107
106 CALL PATTERN(#4,140) :: CALL SOUND(-250,-7,0) :: EX4=0 :: SC=SC+100 :: SHOT=SHOT+1 :: CALL DELSPRITE(#2,#4) :: GOTO 120
107 REM
108 CALL COINC(#2,#5,20,A) :: IF A=0 THEN 111
109 IF EX5=0 THEN 111
110 EX5=0 :: CALL PATTERN(#5,140) :: CALL SOUND(-250,-7,0) :: SHOT=SHOT+1 :: SC=SC+100 :: CALL DELSPRITE(#2,#5) :: GOTO 120
111 REM
112 IF EX6=0 THEN 115
113 CALL COINC(#2,#6,20,A) :: IF A=0 THEN 115
114 CALL PATTERN(#6,140) :: CALL SOUND(-250,-7,0) :: EX6=0 :: SC=SC+150 :: CALL DELSPRITE(#2,#6) :: SHOT=SHOT+1 :: GOTO 120
115 IF LEV<4 THEN 123
116 CALL COINC(#2,#7,20,A) :: IF A=0 THEN 119
117 IF EX7=0 THEN 119
118 EX7=0 :: CALL PATTERN(#7,140) :: CALL SOUND(-250,-7,0) :: SHOT=SHOT+1 :: SC=SC+150 :: CALL DELSPRITE(#2,#7) :: GOTO 120
119 GOTO 123
120 REM
121 DISPLAY AT(1,7):SC;
122 IF SHOT=LEV THEN GOSUB 142
123 REM
124 CALL POSITION(#1,XLO,YLO)
125 IF XLO<41 THEN OX=150 :: CALL MOTION(#1,0,0) :: CALL LOCATE(#1,41,YLO) :: DISPLAY AT(1,18):"OXYGEN:";OX
126 CALL COINC(#1,#8,12,C) :: IF C THEN 131
127 GOTO 67
128 CALL MOTION(#1,0,0) :: CALL DELSPRITE(#2,#3,#4,#5,#6,#7,#8,#9)
129 CALL SOUND(2000,-7,0) :: CALL COLOR(#1,3) :: CALL MOTION(#1,5,0)
130 CALL SOUND(-1000,110,0) :: CALL POSITION(#1,XLO,YLO) :: CALL SOUND(-1000,123,0) :: IF XLO>170 THEN CALL MOTION(#1,0,0)ELSE 130
131 CALL SOUND(-1000,123,0) :: IF XLO>177 THEN CALL LOCATE(#1,176,YLO)
132 CALL MOTION(#1,0,0) :: CALL DELSPRITE(#2,#3,#4,#5,#6,#7,#8,#9) :: CALL COLOR(#1,7) :: CALL SOUND(250,-6,0)
133 CALL SOUND(1,40000,30) :: CALL PATTERN(#1,140) :: FOR I=1 TO 8 :: CALL COLOR(#1,I+5) :: CALL SOUND(-1000,-7,0) :: CALL SOUND(-1000,-8,0) :: NEXT I
134 CALL SOUND(-1,40000,30) :: CALL DELSPRITE(#1) :: MEN=MEN-1 :: DISPLAY AT(2,18):"VESSELS:";MEN
135 IF MEN=0 THEN 161
136 LEV=LEV-1 :: SHOT=LEV :: OX=153
137 CALL SPRITE(#1,96,15,108,27) :: OX=150
138 DISPLAY AT(1,25):OX
139 GOTO 66
140 CALL POSITION(#1,XLO,YLO) :: CALL SPRITE(#2,92,16,XLO,YLO,0,15)
141 CALL SOUND(-400,-1,5,110,5,220,5,440,5) :: RETURN
142 CALL MOTION(#1,0,0) :: REM DISPATCH ENEMIES
143 LEV=LEV+1 :: SHOT=0 :: LSC=LSC+1
144 IF LEV>5 THEN LEV=5
145 FOR A=1 TO 2 :: FOR I=700 TO 990 STEP 10 :: CALL SOUND(-250,I,5) :: NEXT I
146 FOR I=990 TO 700 STEP-10 :: CALL SOUND(-250,I,5) :: NEXT I :: NEXT A :: CALL SOUND(-1,30000,30)
147 IF LEV>0 THEN EX3=1 :: CALL SPRITE(#3,104,2,INT(RND*106)+55,256,0,-(INT(RND*3)+2))
148 IF LEV>2 THEN Z=-(INT(RND*6)+5) :: EX5=1 :: CALL SPRITE(#5,100,2,INT(RND*106)+55,256,0,Z)
149 IF LEV>1 THEN EX4=1 :: CALL SPRITE(#4,100,2,INT(RND*106)+55,256,0,-(INT(RND*8)+4))
150 IF LEV>3 THEN EX6=1 :: CALL SPRITE(#6,108,2,INT(RND*106)+55,256,0,-(INT(RND*8)+4))
151 IF LEV>4 THEN Y=-(INT(RND*10)+5) :: EX7=1 :: CALL SPRITE(#7,108,2,INT(RND*106)+55,256,0,Y)
152 RETURN
153 CALL CLEAR :: CALL COLOR(9,2,1,10,2,1,11,2,1)
154 DISPLAY AT(1,1)BEEP:"SCORING:"
155 DISPLAY AT(3,5):CHR$(104)&CHR$(106)&" 50 PTS." :: DISPLAY AT(4,5):CHR$(105)&CHR$(107)
156 DISPLAY AT(6,5):CHR$(100)&CHR$(102)&" 100 PTS." :: DISPLAY AT(7,5):CHR$(101)&CHR$(103)
157 DISPLAY AT(9,5):CHR$(108)&CHR$(110)&" 150 PTS." :: DISPLAY AT(10,5):CHR$(109)&CHR$(111)
158 DISPLAY AT(12,5):CHR$(112)&CHR$(114)&CHR$(116)&" INDESTRUCTABLE" :: DISPLAY AT(13,5):CHR$(113)&CHR$(115)&CHR$(117)
159 DISPLAY AT(24,2):"PRESS ANY KEY TO CONTINUE"
160 CALL KEY(0,K,S) :: IF S=0 THEN 160 ELSE RETURN
161 REM game over
162 IF SC>HI THEN HI=SC
163 DISPLAY AT(2,1):"HI SCORE:";HI;
164 DISPLAY AT(11,5)SIZE(20):"" :: DISPLAY AT(12,5)SIZE(20):" GAME OVER" :: DISPLAY AT(13,5)SIZE(20):""
165 DISPLAY AT(14,5)SIZE(20):""
166 DISPLAY AT(15,5)SIZE(20):" PLAY AGAIN?? (Y/N)" :: DISPLAY AT(16,5)SIZE(20):""
167 CALL SOUND(-1000,110,0) :: CALL KEY(0,K,S) :: CALL SOUND(-1000,123,0) :: IF S=0 OR K<>ASC("Y")AND K<>ASC("y")AND K<>ASC("N")AND K<>ASC("n")THEN 167
168 FOR I=11 TO 16 :: CALL HCHAR(I,1,112,32) :: NEXT I
169 CALL SOUND(-1,40000,30) :: IF K=ASC("Y")OR K=ASC("y")THEN 48
170 CALL INIT :: CALL LOAD(-31961,51)