8-Bit Software Online Conversion
:0.$.BOMB1 - Listing
10REM *** City Bomber Pt2 ***
20ON ERROR RUN
30MODE1
40
50PROCinitialise
60PROCdrawscreen
70REPEAT
80PROConemove
90UNTIL HOME OR CRASH
100PROCendgame
110CLS:GOTO60
120
130DEF PROCinitialise
140VDU28,0,31,39,3
150VDU23,1,0;0;0;0;
160PROCplace(2,5,"R E A D Y")
170ENVELOPE2,4,0,0,0,1,1,1,126,-4,-1,-
4,126,80
180VDU23,227,3,7,207,191,191,207,7,3:V
DU23,228,240,252,254,255,255,254,252,240
190VDU19,0,0,0,0,0:REM Black
200VDU19,1,2,0,0,0:REM Green
210VDU19,3,1,0,0,0:REM Red
220VDU19,2,3,0,0,0:REM Yellow
230VDU23,226,255,255,231,231,231,231,2
55,255
240VDU23,229,255,0,0,0,128,128,129,193
250VDU23,230,255,15,15,63,127,255,254,
254
260VDU23,231,255,0,0,192,224,240,56,14
270VDU23,232,195,255,199,195,129,128,1
28,0
280VDU23,233,254,254,254,254,255,255,6
3,15
290VDU23,234,7,7,6,12,252,248,240,192
300VDU23,235,125,156,3,33,224,230,38,1
42
310A$=CHR$(229)+CHR$(230)+CHR$(231):B$
=CHR$(232)+CHR$(233)+CHR$(234)
320C$=CHR$(227)+CHR$(228)
330D$=CHR$(226)+CHR$(226)
340E$=CHR$(235)+CHR$(235)
350HOME=FALSE
360CRASH=FALSE
370DROP=FALSE
380A%=-2:B%=3
390DIM Zone(5,15),H(8),H$(8)
400P%=0:Q%=0:S%=0
410REPEAT
420FOR Q%=0 TO 15
430READ Zone(P%,Q%)
440NEXT
450P%=P%+1
460UNTIL P%=6
470DATA20,19,24,19,18,24,19,22,23,21,2
4,23,18,22,23,19
480DATA19,23,22,16,15,18,16,20,17,16,1
7,15,18,18,24,19
490DATA13,13,13,13,13,13,13,13,13,13,1
3,13,13,13,13,13
500DATA13,24,13,24,13,24,13,24,13,24,1
3,24,13,24,13,24
510DATA20,19,18,17,16,15,14,13,13,14,1
5,16,17,18,19,20
520DATA10,11,12,13,14,15,16,17,17,16,1
5,14,13,12,11,10
530P%=0
540PROCplace(2,5," ")
550ENDPROC
560
570DEF PROConemove
580PROCmoveship
590FOR C%=0TO2
600IF INKEY(-74) OR DROP=TRUE THEN PRO
Cdropbomb ELSE PROCdelay(425)
610NEXT
620ENDPROC
630
640DEF PROCmoveship
650COLOUR2
660A%=A%+2
670IF FNC(A%+2,B%+4)=3 THEN CRASH=TRUE
680PRINTTAB(A%-2,B%);SPC(4)TAB(A%-2,B%
+1);SPC(4)
690IF A%=36 THEN A%=0:B%=B%+2
700IF B%=25 AND A%=0 THEN HOME=TRUE:GO
TO 720
710PRINTTAB(A%,B%)A$TAB(A%,B%+1)B$
720ENDPROC
730
740DEF PROCdrawscreen
750COLOUR130:COLOUR3
760Q%=0
770FORC%=4TO34STEP2
780U%=Zone(P%,Q%)
790PRINTTAB(C%,U%);D$
800IF U%<25 THEN U%=U%+1:GOTO790
810Q%=Q%+1
820NEXT
830COLOUR1:COLOUR128
840PRINTTAB(2,0)"Screen: ";P%+1:COLOUR
3:PRINTTAB(16,0);"SCORE: ";S%:COLOUR2:PR
INTTAB(30,0)"HIGH: ";H(1)
850ENDPROC
860
870DEF PROCdropbomb
880IF DROP=TRUE THEN PROCbomb:ENDPROC
890E%=A%+2:F%=B%+2
900DROP=TRUE
910ENDPROC
920
930DEF PROCbomb
940PROCdelay(300)
950PRINTTAB(E%,F%);" "
960COLOUR1
970F%=F%+1:IF F%>25 THEN F%=25
980PRINTTAB(E%,F%);C$
990IF FNC(E%,F%+4)=3 THEN PROCexplode
1000IF F%=25 THEN PROCmissed
1010ENDPROC
1020
1030DEF PROCexplode
1040COLOUR2
1050IF F%=24 THEN F%=F%-1
1060PRINTTAB(E%,F%)" "TAB(E%,F%+1)E$TA
B(E%,F%+2)E$
1070SOUND0,-13,5,2
1080COLOUR3
1090S%=S%+10:PRINTTAB(23,0);SPC(4);TAB(
23,0);S%
1100DROP=FALSE
1110PRINTTAB(E%,F%+1)" "TAB(E%,F%+2)"
"
1120ENDPROC
1130
1140DEF PROCmissed
1150COLOUR3
1160DROP=FALSE
1170S%=S%-5:IF S%<0 THEN S%=0
1180PRINTTAB(23,0);SPC(4);TAB(23,0);S%;
TAB(E%,F%);SPC(2)
1190ENDPROC
1200
1210DEF PROCdelay(delay%)
1220FOR G%=0 TO delay%:NEXT
1230ENDPROC
1240
1250DEF PROCendgame
1260IF HOME THEN PROCwelldone:GOTO 60
1270PROCdeath
1280PROCdelay(25000)
1290PROChiscoretable
1300ENDPROC
1310
1320DEF PROCdeath
1330SOUND0,2,6,10
1340FORI%=0 TO 10
1350VDU19,0,1,0;0
1360VDU19,3,3,0;0
1370VDU19,2,1,0;0
1380PROCdelay(100)
1390VDU19,0;0;0
1400VDU19,3,1,0;0
1410VDU19,2,3,0;0
1420NEXT
1430P%=0:A%=-2:B%=3:CRASH=FALSE:DROP=FA
LSE
1440ENDPROC
1450
1460DEF PROCwelldone
1470RESTORE 1490
1480PROCplace(6,8,"YOU DID IT! Now try
THIS !")
1490DATA129,9,117,4,121,4,129,9,101,9,1
21,4,129,4,137,4,145,4,149,4
1500FOR G%=1TO10
1510READW%,X%:SOUND1,-12,W%,X%:SOUND2,-
12,W%,X%:SOUND3,-12,W%,X%
1520NEXT
1530HOME=FALSE:B%=3:A%=-2:P%=P%+1:DROP=
FALSE
1540PRINTTAB(6,8);SPC(27)
1550IF P%=6 THEN P%=0
1560ENDPROC
1570
1580DEF FNC(A%,B%)
1590A%=3+32*A%
1600B%=1020-32*B%
1610=POINT(A%,B%)
1620
1630DEF PROChiscoretable
1640LOCAL J,I%:J=1:I%=6:J$=""
1650VDU23,1,0;0;0;0;:COLOUR2
1660IF S%>=H(8) THEN PROCinscore
1670CLS
1680PROCplace(15,0,"City Bomber")
1690PRINT
1700PROCplace(13,3,"High Score Table ")
1710REPEAT
1720J$=H$(J):J%=H(J)
1730PROCplace(9,I%,J$)
1740PROCplaceS(24,I%,J%)
1750J=J+1:I%=I%+2
1760UNTIL J=9
1770PROCplace(10,22,"Press SPACE to con
tinue"):*FX 15
1780Z$=GET$
1790S%=0
1800ENDPROC
1810
1820DEF PROCplaceS(X%,Y%,K%)
1830PRINTTAB(X%,Y%)K%
1840ENDPROC
1850
1860DEF PROCplace(X%,Y%,K$)
1870PRINTTAB(X%,Y%)K$
1880ENDPROC
1890
1900DEF PROCinscore
1910CLS:PROCplace(12,2,"Congratulations
."):PROCplace(1,6,"You've made it to the
HIGH SCORE TABLE.")
1920LOCAL L$,M$:M$="":*FX 15
1930REPEAT
1940PROCplace(10,12,LEFT$(M$+STRING$(20
,"."),20))
1950L$=GET$
1960IF L$>="A" AND L$<="Z" OR L$>="a" A
ND L$<="z" OR L$=" "THEN M$=M$+L$
1970IF ASC(L$)=127 AND M$<>"" THEN M$=L
EFT$(M$,LEN(M$)-1)
1980M$=LEFT$(M$,20):UNTIL ASC(L$)=13
1990H$(8)=M$:H(8)=S%
2000LOCAL L,V,V$:L=8
2010IF H(L)<H(L-1) OR L=1 THEN ENDPROC
2020V$=H$(L):H$(L)=H$(L-1):H$(L-1)=V$
2030V=H(L):H(L)=H(L-1):H(L-1)=V
2040L=L-1:GOTO2010