home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
251-275
/
apd272
/
line2
/
line2.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1992-05-20
|
19KB
|
711 lines
Screen Open 0,320,250,32,Lowres
Flash Off
Curs Off
Hide On
Cls 0
Close Editor
Unpack 8 To 1
Double Buffer
Screen Hide 1
Unpack 6 To 2
Screen Hide 2
Music 1
Mvolume 0
MAIN_LOOP
Procedure MAIN_LOOP
Dim XP(1),YP(1),XINC(1),YINC(1),XBL(5),YBL(5),XBL2(5),YBL2(5),XBL3(5),YBL3(5)
_PLAYER0=True
_PLAYER1=True
_PLAYER2=True
_PLAYER3=True
DEAD_MAX=3
DEAD_DEFAULT=4
Do
Screen To Front 1
Screen Show 1
Screen 0
Set Rainbow 0,0,31,"(2,1,8)(2,-1,8)","",""
LEVEL=1
Screen 1
If DEAD_DEFAULT=4
Bob 1,105,125,3
Bob 2,150,147,4
Bob 3,105,169,5
Bob 4,60,147,10
_PLAYER0=True
_PLAYER1=True
_PLAYER2=True
_PLAYER3=True
End If
If DEAD_DEFAULT=3
Bob 1,105,125,3
Bob 2,150,147,4
Bob 3,105,169,9
Bob 4,60,147,6
_PLAYER0=True
_PLAYER1=True
_PLAYER2=True
_PLAYER3=False
End If
If DEAD_DEFAULT=2
Bob 1,105,125,3
Bob 2,150,147,8
Bob 3,105,169,5
Bob 4,60,147,6
_PLAYER0=True
_PLAYER1=True
_PLAYER2=False
_PLAYER3=False
End If
If DEAD_DEFAULT=1
Bob 1,105,125,7
Bob 2,150,147,4
Bob 3,105,169,5
Bob 4,60,147,6
_PLAYER0=True
_PLAYER1=False
_PLAYER2=False
_PLAYER3=False
End If
Bob 5,105,147,11
Bob 6,210,147,12
Bob 7,160,100,1
Hide On
For M=30 To 63
Mvolume M
Wait 1
Next M
Hot Spot 1,$10
Repeat
X=X Bob(7)
Y=Y Bob(7)
If X<300
If Jright(0) or Jright(1)
Inc X
End If
End If
If X>0
If Jleft(0) or Jleft(1)
Dec X
End If
End If
If Y>0
If Jup(0) or Jup(1)
Dec Y
End If
End If
If Y<240
If Jdown(0) or Jdown(1)
Inc Y
End If
End If
Bob 7,X,Y,1
If Fire(0) or Fire(1)
If Bob Col(7,1 To 1)
_PLAYER0=True
_PLAYER1=False
_PLAYER2=False
_PLAYER3=False
DEAD_MAX=1
Bob 1,105,125,7
Bob 2,150,147,4
Bob 3,105,169,5
Bob 4,60,147,6
DEAD_DEFAULT=1
Sam Play 4,1
Wait 25
End If
If Bob Col(7,2 To 2)
_PLAYER0=True
_PLAYER1=True
_PLAYER2=False
_PLAYER3=False
DEAD_MAX=1
Bob 1,105,125,3
Bob 2,150,147,8
Bob 3,105,169,5
Bob 4,60,147,6
DEAD_DEFAULT=2
Sam Play 4,1
Wait 25
End If
If Bob Col(7,3 To 3)
_PLAYER0=True
_PLAYER1=True
_PLAYER2=True
_PLAYER3=False
DEAD_MAX=2
Bob 1,105,125,3
Bob 2,150,147,4
Bob 3,105,169,9
Bob 4,60,147,6
DEAD_DEFAULT=3
Sam Play 4,1
Wait 25
End If
If Bob Col(7,4 To 4)
_PLAYER0=True
_PLAYER1=True
_PLAYER2=True
_PLAYER3=True
DEAD_MAX=3
Bob 1,105,125,3
Bob 2,150,147,4
Bob 3,105,169,5
Bob 4,60,147,10
DEAD_DEFAULT=4
Sam Play 4,1
Wait 25
End If
If Bob Col(7,6 To 6)
Sam Play 4,1
Wait 25
Bob Off
Screen Close 0
Screen Close 1
Screen Close 2
For M=63 To 0 Step -1
Mvolume M
Wait 2
Next M
Music Off
End
End If
End If
Until Fire(1) and Bob Col(7,5 To 5) or Fire(0) and Bob Col(7,5 To 5)
Sam Play 4,1
Wait 25
Hide On
Screen Hide 1
Rainbow 0,0,0,270
DEAD=0
Repeat
DELAY=0
For P=0 To 1
YINC(P)=1
XINC(P)=0
Next P
KYINC=1
KXINC=0
NXINC=0
NYINC=1
Mvolume 20
Sam Play 4,6
Wait 150
Mvolume 63
Unpack 7 To 0
Colour 0,$0
Curs Off
Ink 14
Bar 300,12 To 303,15
Ink 15
Bar 12,12 To 15,15
If LEVEL>5 Then LEVEL=1
If LEVEL=1
Restore DAT1
End If
If LEVEL=2
Restore DAT2
End If
If LEVEL=3
Restore DAT3
End If
If LEVEL=4
Restore DAT4
End If
If LEVEL=5
Restore DAT5
End If
For DAT=0 To 5
Read XBL(DAT),YBL(DAT),XBL2(DAT),YBL2(DAT),XBL3(DAT),YBL3(DAT)
Screen Copy 2,XBL(DAT),YBL(DAT),XBL2(DAT),YBL2(DAT) To 0,XBL3(DAT),YBL3(DAT)
Next DAT
S=Rnd(10)
If S=0
Cls 0,8,7 To 312,248
For S=1 To 175
Ink 1
Plot Rnd(300)+8,Rnd(230)+7
Next S
End If
Colour 0,$0
XP(0)=100
YP(0)=100
XP(1)=130
YP(1)=101
KXP=170
KYP=102
NXP=200
NYP=103
P0COUNT=45
P1COUNT=45
P2COUNT=45
P3COUNT=45
SHIELD0=False
SHIELD1=False
SHIELD2=False
SHIELD3=False
SH_COUNT0=200
SH_COUNT1=200
SH_COUNT2=200
SH_COUNT3=200
PL=4
Clear Key
Paper 0
Locate 5,1
Pen 6
Print P0COUNT
Locate 10,1
Pen 7
Print P1COUNT
Locate 15,1
Pen 8
Print P2COUNT
Locate 20,1
Pen 9
Print P3COUNT
Y=4
X=3
Ink 0
Bar 2,3 To 5,250
Bob 0,0,3,2
Channel 0 To Bob 0
Amal 0,"M 0,250,2000"
Amal On 0
Repeat
Screen 0
X$=Inkey$
If _PLAYER0=True
If Jup(0)
YINC(0)=-1
XINC(0)=0
End If
If Jdown(0)
YINC(0)=1
XINC(0)=0
End If
If Jleft(0)
YINC(0)=0
XINC(0)=-1
End If
If Jright(0)
YINC(0)=0
XINC(0)=1
End If
If P0COUNT>0
If Fire(0)
Sam Play 4,2
Ink 0
Bar XP(0)-2,YP(0)-2 To XP(0)+2,YP(0)+2
Dec P0COUNT
Locate 5,1
Pen 6
Print P0COUNT
If P0COUNT<10
Locate 7,1
Print " "
End If
End If
End If
End If
If _PLAYER1=True
If Jup(1)
YINC(1)=-1
XINC(1)=0
End If
If Jdown(1)
YINC(1)=1
XINC(1)=0
End If
If Jleft(1)
YINC(1)=0
XINC(1)=-1
End If
If Jright(1)
YINC(1)=0
XINC(1)=1
End If
If P1COUNT>0
If Fire(1)
Sam Play 4,2
Ink 0
Bar XP(1)-2,YP(1)-2 To XP(1)+2,YP(1)+2
Dec P1COUNT
Locate 10,1
Pen 7
Print P1COUNT
If P1COUNT<10
Locate 12,1
Print " "
End If
End If
End If
End If
If X$<>""
If _PLAYER2=True
X$=Lower$(X$)
If X$="x"
KXINC=-1
KYINC=0
End If
If X$="c"
KXINC=1
KYINC=0
End If
If X$="a"
KXINC=0
KYINC=-1
End If
If X$="z"
KXINC=0
KYINC=1
End If
If P2COUNT>0
If X$=" "
Sam Play 4,2
Ink 0
Bar KXP-2,KYP-2 To KXP+2,KYP+2
Dec P2COUNT
Locate 15,1
Pen 8
Print P2COUNT
If P2COUNT<10
Locate 17,1
Print " "
End If
End If
End If
End If
If _PLAYER3=True
If X$=","
NXINC=-1
NYINC=0
End If
If X$="."
NXINC=1
NYINC=0
End If
If X$="j"
NXINC=0
NYINC=-1
End If
If X$="m"
NXINC=0
NYINC=1
End If
If P3COUNT>0
If X$="/"
Sam Play 4,2
Ink 0
Bar NXP-2,NYP-2 To NXP+2,NYP+2
Dec P3COUNT
Locate 20,1
Pen 9
Print P3COUNT
If P3COUNT<10
Locate 22,1
Print " "
End If
End If
End If
End If
End If
If _PLAYER0=True
Add XP(0),XINC(0)
Add YP(0),YINC(0)
End If
If _PLAYER1=True
Add YP(1),YINC(1)
Add XP(1),XINC(1)
End If
If _PLAYER2=True
Add KXP,KXINC
Add KYP,KYINC
End If
If _PLAYER3=True
Add NXP,NXINC
Add NYP,NYINC
End If
If _PLAYER0=True
If Point(XP(0),YP(0))>0
If Point(XP(0),YP(0))=15
Repeat
XP(0)=Rnd(200)+60
YP(0)=Rnd(170)+50
Until Point(XP(0),YP(0))=0
End If
If Point(XP(0),YP(0))=16
SHIELD0=True
Sam Play 4,4
Else
Flash 6,"(bbb,3)(ddd,3)(fff,3)(ddd,3)(bbb,3)"
_PLAYER0=False
PL=0
Inc DEAD
Sam Play 4,3
End If
End If
If SHIELD0=True
Ink 6
Box XP(0)-4,YP(0)-4 To XP(0)+4,YP(0)+4
Ink 0
Bar XP(0)-3,YP(0)-3 To XP(0)+3,YP(0)+3
Dec SH_COUNT0
If SH_COUNT0=0
SHIELD0=False
SH_COUNT0=200
Ink 0
Bar XP(0)-4,YP(0)-4 To XP(0)+4,YP(0)+4
End If
End If
End If
If _PLAYER1=True
If Point(XP(1),YP(1))>0
If Point(XP(1),YP(1))=15
Repeat
XP(1)=Rnd(200)+60
YP(1)=Rnd(170)+50
Until Point(XP(1),YP(1))=0
End If
If Point(XP(1),YP(1))=16
SHIELD1=True
Sam Play 4,4
Else
Flash 7,"(bbb,3)(ddd,3)(fff,3)(ddd,3)(bbb,3)"
_PLAYER1=False
Inc DEAD
Sam Play 4,3
PL=1
End If
End If
If SHIELD1=True
Ink 0
Bar XP(1)-3,YP(1)-3 To XP(1)+3,YP(1)+3
Ink 7
Box XP(1)-4,YP(1)-4 To XP(1)+4,YP(1)+4
Dec SH_COUNT1
If SH_COUNT1=0
SHIELD1=False
SH_COUNT1=200
Ink 0
Bar XP(1)-4,YP(1)-4 To XP(1)+4,YP(1)+4
End If
End If
End If
If _PLAYER2=True
If Point(KXP,KYP)>0
If Point(KXP,KYP)=15
Repeat
KXP=Rnd(200)+60
KYP=Rnd(170)+50
Until Point(KXP,KYP)=0
End If
If Point(KXP,KYP)=16
SHIELD2=True
Sam Play 4,4
Else
Flash 8,"(bbb,3)(ddd,3)(fff,3)(ddd,3)(bbb,3)"
_PLAYER2=False
PL=2
Inc DEAD
Sam Play 4,3
End If
End If
If SHIELD2=True
Ink 8
Box KXP-4,KYP-4 To KXP+4,KYP+4
Ink 0
Bar KXP-3,KYP-3 To KXP+3,KYP+3
Dec SH_COUNT2
If SH_COUNT2=0
SHIELD2=False
SH_COUNT2=200
Ink 0
Bar KXP-4,KYP-4 To KXP+4,KYP+4
End If
End If
End If
If _PLAYER3=True
If Point(NXP,NYP)>0
If Point(NXP,NYP)=15
Repeat
NXP=Rnd(200)+60
NYP=Rnd(170)+50
Until Point(NXP,NYP)=0
End If
If Point(NXP,NYP)=16
SHIELD3=True
Sam Play 4,4
Else
Flash 9,"(bbb,3)(ddd,3)(fff,3)(ddd,3)(bbb,3)"
_PLAYER3=False
PL=3
Inc DEAD
Sam Play 4,3
End If
End If
If SHIELD3=True
Ink 9
Box NXP-4,NYP-4 To NXP+4,NYP+4
Ink 0
Bar NXP-3,NYP-3 To NXP+3,NYP+3
Dec SH_COUNT3
If SH_COUNT3=0
SHIELD3=False
SH_COUNT3=200
Ink 0
Bar NXP-4,NYP-4 To NXP+4,NYP+4
End If
End If
End If
If _PLAYER0=True
Ink 6
Plot XP(0),YP(0)
End If
If _PLAYER1=True
Ink 7
Plot XP(1),YP(1)
End If
If _PLAYER2=True
Ink 8
Plot KXP,KYP
End If
If _PLAYER3=True
Ink 9
Plot NXP,NYP
End If
If XP(0)<8 or XP(0)>312 or YP(0)<8 or YP(0)>247
Repeat
XP(0)=Rnd(280)+50
YP(0)=Rnd(180)+50
Until Point(XP(0),YP(0))=0
End If
If XP(1)<8 or XP(1)>312 or YP(1)<8 or YP(1)>247
Repeat
XP(1)=Rnd(280)+50
YP(1)=Rnd(180)+50
Until Point(XP(1),YP(1))=0
End If
If KXP<8 or KXP>312 or KYP<8 or KYP>247
Repeat
KXP=Rnd(280)+50
KYP=Rnd(180)+50
Until Point(KXP,KYP)=0
End If
If NXP<8 or NXP>312 or NYP<8 or NYP>247
Repeat
NXP=Rnd(280)+50
NYP=Rnd(180)+50
Until Point(NXP,NYP)=0
End If
For D=0 To DELAY
Next D
Randomize Timer
R=Rnd(1000)
If R=1
Colour 16,$F : Rem BLUE
Ink 16
X=Rnd(285)+20
Y=Rnd(230)+10
Screen 0
Bar X,Y To X+2,Y+2
End If
Until Y Bob(0)=250 or PL<>4
Screen 0
Cls 0
Bob Off
Wait 1
Curs Off
Cls 0
Wait 1
Wait 40
Cls 0
Inc LEVEL
Locate ,14
If PL=0
Pen 6
Centre "Player 1 Is Dead!"
End If
If PL=1
Pen 7
Centre "Player 2 Is Dead!"
End If
If PL=2
Pen 8
Centre "Player 3 Is Dead!"
End If
If PL=3
Pen 9
Centre "Player 4 Is Dead!"
End If
Wait 40
Until DEAD=DEAD_MAX
Screen 0
Bob Off
Curs Off
Cls 0
For M=63 To 30 Step -1
Mvolume M
Wait 2
Next M
Locate ,14
If _PLAYER0=True
Pen 6
Centre "Player 1 Wins Game!"
Sam Play 4,5
End If
If _PLAYER1=True
Pen 7
Centre "Player 2 Wins Game!"
Sam Play 4,5
End If
If _PLAYER2=True
Pen 8
Centre "Player 3 Wins Game!"
Sam Play 4,5
End If
If _PLAYER3=True
Pen 9
Centre "Player 4 Wins Game!"
Sam Play 4,5
End If
Wait 75
Cls 0
Loop
DAT1:
Data 16,79,249,93,40,40
Data 16,97,111,191,110,125
Data 0,0,0,0,0,0
Data 0,0,0,0,0,0
Data 0,0,0,0,0,0
Data 0,0,0,0,0,0
DAT2:
Data 192,95,298,197,203,142
Data 15,203,105,228,12,220
Data 29,29,78,72,100,50
Data 0,0,0,0,0,0
Data 0,0,0,0,0,0
Data 0,0,0,0,0,0
DAT3:
Data 299,12,308,203,300,20
Data 136,172,188,242,11,175
Data 29,18,124,25,120,50
Data 179,9,216,61,11,11
Data 0,0,0,0,0,0
Data 0,0,0,0,0,0
DAT4:
Data 84,30,174,55,12,217
Data 118,106,190,156,120,192
Data 136,172,188,242,12,61
Data 29,18,124,25,120,30
Data 96,64,287,71,70,40
Data 0,0,0,0,0,0
DAT5:
Data 18,9,23,64,30,34
Data 24,9,79,14,30,30
Data 224,12,275,49,250,200
Data 179,9,216,61,12,191
Data 192,95,298,197,200,40
Data 192,95,298,197,100,140
'
End Proc