home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
076-100
/
apd096
/
autoexec.amos
/
autoexec.amosSourceCode
Wrap
AMOS Source Code
|
1994-01-01
|
8KB
|
405 lines
'Program debugged By Peter Winnard '
'and Paul Townsend of Technical Fred Software
'of Technical Fred Software
BEGIN:
Default
Fade 5
Randomize Timer
Dim SHA(40)
Dim X1(2)
Dim Y1(2)
Dim N(37)
Volume 1,63
NBV=0
X1=0
Y1=0
FG=0
HA=0
SA=0
TA=0
LP=0
A=0
DG=0
SC1=0
SC2=0
Load ":Music.abk"
Load ":Samples.abk"
Load Iff ":back.pic",0 : Curs Off : Flash Off
Curs Off : Flash Off
Limit Mouse 135,52 To 425,200-18
Change Mouse 2
Paper 10
Pen 0
Wait 100
X=20
Y=9
Reserve Zone 36
1345 Gosub CLEAR
Locate 18,19
Print "Select tiles..."
Locate 18,21
Print "1. Default"
Locate 18,22
Print "2. Faces"
Locate 18,23
Print "3. Fruit & Veg."
Locate 18,24
Print "4. Patterns"
Locate 18,25
Print "5. Mark's Creations"
Locate 18,28
Input " Choice: ";WE$
Gosub CLEAR
Locate 18,19
Print "Normal, or Hard Game"
Locate 18,21
Input "(N/H): ";HU$
Locate 18,23
If HU$="h" Then Goto 987
Goto 351
987 Print "Mix after..."
Locate 18,25
Input "Moves (2-15): ";MO
If MO>15 or MO<2 Then Goto 987
Locate 18,27
351 Input "Music (Y/N): ";HG$
PI=0
If HG$="yes" Then PI=2
If HG$="y" Then PI=2
HA=0
If MO>0 Then HA=1
If WE$="1" Then Load ":Squares.abk" : Goto 432
If WE$="2" Then Load ":Sqaures - Faces.abk" : Goto 432
If WE$="3" Then Load ":Sqaures - F & G.abk" : Goto 432
If WE$="4" Then Load ":Sqaures - Patterns.abk" : Goto 432
If WE$="5" Then Load ":Sqaures - Marks.abk" : Goto 432
Goto 1345
432 Gosub CLEAR
SC1=0
SC2=0
For TY=1 To 36
DG=DG+1
If DG=10 Then DG=1 : Y=Y+30 : X=20
If X=10 Then X=1
If TY>1 and DG>1 Then X=X+30
Paste Bob X,Y,TY
Set Zone TY,X,Y To X+25,Y+25
Shoot
If Mouse Key<>1 Then Wait 20
Next TY
Locate 18,19
Print "Let's play PAIR-IT;"
Sam Play 1
Locate 18,21
Print "Player 1, name:"
Locate 18,23
Input " ";N1$
Locate 18,25
Print "Player 2, name:"
Locate 18,27
Input " ";N2$
CLEART:
Double Buffer
Curs Off
Gosub CLEAR
Locate 18,19
Print "Randomizing Squares!"
Locate 18,21
A=4
B=4
C=4
D=4
E=4
F=4
G=4
H=4
I=4
For X=1 To 36
J=0
99 Z=Rnd(8)
If Z=0 and A>0 Then A=A-1 : SHA(X)=37 : J=1
If Z=1 and B>0 Then B=B-1 : SHA(X)=38 : J=1
If Z=2 and C>0 Then C=C-1 : SHA(X)=39 : J=1
If Z=3 and D>0 Then D=D-1 : SHA(X)=40 : J=1
If Z=4 and E>0 Then E=E-1 : SHA(X)=41 : J=1
If Z=5 and F>0 Then F=F-1 : SHA(X)=42 : J=1
If Z=6 and G>0 Then G=G-1 : SHA(X)=43 : J=1
If Z=7 and H>0 Then H=H-1 : SHA(X)=44 : J=1
If Z=8 and I>0 Then I=I-1 : SHA(X)=45 : J=1
If J=0 Then Goto 99
Next X
A=4
B=4
C=4
D=4
E=4
F=4
G=4
H=4
I=4
Wait 100
Print "Finished!!!"
Curs Off
Gosub CLEAR
NBV=0
GAME1:
Bob Off
If HA=1 Then NBV=NBV+1 : Goto 42
Goto 64
42 If NBV=MO+1 Then Gosub SHUFFLE
64 X1(1)=0
Y1(1)=0
X1(2)=0
Y1(2)=0
FG=0
LP=0
SA=0
TA=0
Locate 18,19
Print N1$; : WE=Len(N1$) : WE=20-WE : For IT=1 To WE : Print " "; : Next IT
Locate 18,21
Print "Score: ";SC1;" "
Locate 18,23
Print "Select 2 Squares..."
If PI=2 Then Music 1
If PI=2 Then PI=1
Do
If Mouse Zone>0 and Mouse Key=1 Then FG=Mouse Zone : SRD=1 : If PI<>1 Then Bell
If SRD=1 Then SRD=0 : Exit
Loop
LP=FG
X1(1)=X1(1)+20
14 If FG<10 Then X1(1)=X1(1)+FG*30-30
If FG<19 and FG>9 Then FG=FG-9 : Goto 14
If FG<28 and FG>18 Then FG=FG-18 : Goto 14
If FG<37 and FG>27 Then FG=FG-27 : Goto 14
Y1(1)=Y1(1)+30
15 If LP<10 Then Y1(1)=Y1(1)-21
If LP<19 and LP>9 Then Y1(1)=Y1(1)+9
If LP<28 and LP>18 Then Y1(1)=Y1(1)+39
If LP<37 and LP>27 Then Y1(1)=Y1(1)+69
REVEAL1:
Channel 1 To Bob 47
Bob 47,X1(1),Y1(1),47
Amal 1,"A 1,(47,5)(48,5)(49,5)(50,5)(51,5)(52,5)(53,5)(54,5)(55,5)(56,5)"
Amal On 1
Paste Bob X1(1),Y1(1),SHA(LP)
Wait 50
Do
If Mouse Zone>0 and Mouse Zone<>LP and Mouse Key=1 Then SA=Mouse Zone : SRD=1 : If PI<>1 Then Bell
If SRD=1 Then SRD=0 : Exit
Loop
TA=SA
X1(2)=X1(2)+20
72 If SA<10 Then X1(2)=X1(2)+SA*30-30
If SA<19 and SA>9 Then SA=SA-9 : Goto 72
If SA<28 and SA>18 Then SA=SA-18 : Goto 72
If SA<37 and SA>27 Then SA=SA-27 : Goto 72
Y1(2)=Y1(2)+30
667 If TA<10 Then Y1(2)=Y1(2)-21
If TA<19 and TA>9 Then Y1(2)=Y1(2)+9
If TA<28 and TA>18 Then Y1(2)=Y1(2)+39
If TA<37 and TA>27 Then Y1(2)=Y1(2)+69
REVEAL2:
Channel 2 To Bob 47
Bob 47,X1(2),Y1(2),47
Amal 2,"A 1,(47,5)(48,5)(49,5)(50,5)(51,5)(52,5)(53,5)(54,5)(55,5)(56,5)"
Amal On 2
Paste Bob X1(2),Y1(2),SHA(TA)
Wait 100
CHECK:
If SHA(LP)=SHA(TA) Then Goto BLANK
If PI<>1 Then Sam Play 3
If PI=1 Then Sam Play 4,3,19000
Paste Bob X1(1),Y1(1),LP
Paste Bob X1(2),Y1(2),TA
Goto GAME2
BLANK:
SC1=SC1+10
If PI<>1 Then Sam Play 2
If PI=1 Then Sam Play 4,2,19000
Paste Bob X1(1),Y1(1),46
Paste Bob X1(2),Y1(2),46
Reset Zone LP
Reset Zone TA
N(LP)=1
N(TA)=1
If SHA(LP)=37 Then A=A-2
If SHA(LP)=38 Then B=B-2
If SHA(LP)=39 Then C=C-2
If SHA(LP)=40 Then D=D-2
If SHA(LP)=41 Then E=E-2
If SHA(LP)=42 Then F=F-2
If SHA(LP)=43 Then G=G-2
If SHA(LP)=44 Then H=H-2
If SHA(LP)=45 Then I=I-2
If SC1+SC2=180 Then Goto FINN
Goto GAME1
GAME2:
Bob Off
If HA=1 Then NBV=NBV+1 : Goto 656
Goto 456
656 If NBV=MO+1 Then Gosub SHUFFLE
456 X1(1)=0
Y1(1)=0
X1(2)=0
Y1(2)=0
FG=0
LP=0
SA=0
TA=0
Locate 18,19
Print N2$; : WE=Len(N2$) : WE=20-WE : For YT=1 To WE : Print " "; : Next YT
Locate 18,21
Print "Score: ";SC2;" "
Locate 18,23
Print "Select 2 Squares..."
Do
If Mouse Zone>0 and Mouse Key=1 Then FG=Mouse Zone : SRD=1 : If PI<>1 Then Bell
If SRD=1 Then SRD=0 : Exit
Loop
LP=FG
X1(1)=X1(1)+20
61 If FG<10 Then X1(1)=X1(1)+FG*30-30
If FG<19 and FG>9 Then FG=FG-9 : Goto 61
If FG<28 and FG>18 Then FG=FG-18 : Goto 61
If FG<37 and FG>27 Then FG=FG-27 : Goto 61
Y1(1)=Y1(1)+30
63 If LP<10 Then Y1(1)=Y1(1)-21
If LP<19 and LP>9 Then Y1(1)=Y1(1)+9
If LP<28 and LP>18 Then Y1(1)=Y1(1)+39
If LP<37 and LP>27 Then Y1(1)=Y1(1)+69
REVEAL3:
Channel 3 To Bob 47
Bob 47,X1(1),Y1(1),47
Amal 3,"A 1,(47,5)(48,5)(49,5)(50,5)(51,5)(52,5)(53,5)(54,5)(55,5)(56,5)"
Amal On 3
Paste Bob X1(1),Y1(1),SHA(LP)
Wait 50
Do
If Mouse Zone>0 and Mouse Zone<>LP and Mouse Key=1 Then SA=Mouse Zone : SRD=1 : If PI<>1 Then Bell
If SRD=1 Then SRD=0 : Exit
Loop
TA=SA
X1(2)=X1(2)+20
66 If SA<10 Then X1(2)=X1(2)+SA*30-30
If SA<19 and SA>9 Then SA=SA-9 : Goto 66
If SA<28 and SA>18 Then SA=SA-18 : Goto 66
If SA<37 and SA>27 Then SA=SA-27 : Goto 66
Y1(2)=Y1(2)+30
65 If TA<10 Then Y1(2)=Y1(2)-21
If TA<19 and TA>9 Then Y1(2)=Y1(2)+9
If TA<28 and TA>18 Then Y1(2)=Y1(2)+39
If TA<37 and TA>27 Then Y1(2)=Y1(2)+69
REVEAL4:
Channel 1 To Bob 47
Bob 47,X1(2),Y1(2),47
Amal 1,"A 1,(47,5)(48,5)(49,5)(50,5)(51,5)(52,5)(53,5)(54,5)(55,5)(56,5)"
Amal On 1
Paste Bob X1(2),Y1(2),SHA(TA)
Wait 100
CHECK2:
If SHA(LP)=SHA(TA) Then Goto BLANK2
If PI<>1 Then Sam Play 3
If PI=1 Then Sam Play 4,3,19000
Paste Bob X1(1),Y1(1),LP
Paste Bob X1(2),Y1(2),TA
Goto GAME1
BLANK2:
SC2=SC2+10
If PI<>1 Then Sam Play 2
If PI=1 Then Sam Play 4,2,19000
Paste Bob X1(1),Y1(1),46
Paste Bob X1(2),Y1(2),46
Reset Zone LP
Reset Zone TA
N(LP)=1
N(TA)=1
If SHA(LP)=37 Then A=A-2
If SHA(LP)=38 Then B=B-2
If SHA(LP)=39 Then C=C-2
If SHA(LP)=40 Then D=D-2
If SHA(LP)=41 Then E=E-2
If SHA(LP)=42 Then F=F-2
If SHA(LP)=43 Then G=G-2
If SHA(LP)=44 Then H=H-2
If SHA(LP)=45 Then I=I-2
If SC1+SC2=180 Then Goto FINN
Goto GAME2
FINN:
Bob Off
Gosub CLEAR
If PI<>1 Then 934
For YR=63 To 1 Step -1
Mvolume YR
Wait 8
Next YR
934
Music Off
Mvolume 63
Load ":Gameover"
Locate 18,19
Print "GAME OVER...."
Music 1
Wait 50
Wait 200
Locate 18,21
Print N1$
Wait 200
Locate 18,23
Print "Has";SC1;" points!"
Locate 18,25
Print N2$
Wait 200
Locate 18,27
Print "Has";SC2;" points!"
Locate 18,29
Print "The winner is..."
Wait 200
Gosub CLEAR
Music Off
Locate 18,19
If SC1>SC2 Then Print N1$
If SC2>SC1 Then Print N2$
If SC2=SC1 Then Print "No-body! It's a draw!"
Locate 18,21
Print "Click a mouse button"
Locate 18,23
Print "for another game..."
Do
If Mouse Key=1 Then Exit
Loop
Music Off
Fade 5
Run "AUTOEXEC.AMOS"
SHUFFLE:
MO=99
NBV=0
HA=0
Gosub CLEAR
Locate 18,19
Print "Shuffling Tiles!"
Wait 50
For DF=1 To 36
JA=0
If N(DF)=0 Then Gosub 97
Next DF
97 Z=Rnd(8)
If Z=0 and A>0 Then A=A-1 : SHA(DF)=37 : JA=1
If Z=1 and B>0 Then B=B-1 : SHA(DF)=38 : JA=1
If Z=2 and C>0 Then C=C-1 : SHA(DF)=39 : JA=1
If Z=3 and D>0 Then D=D-1 : SHA(DF)=40 : JA=1
If Z=4 and E>0 Then E=E-1 : SHA(DF)=41 : JA=1
If Z=5 and F>0 Then F=F-1 : SHA(DF)=42 : JA=1
If Z=6 and G>0 Then G=G-1 : SHA(DF)=43 : JA=1
If Z=7 and H>0 Then H=H-1 : SHA(DF)=44 : JA=1
If Z=8 and I>0 Then I=I-1 : SHA(DF)=45 : JA=1
If JA=0 Then Goto 97
Shoot
Return
CLEAR:
For KL=31 To 19 Step -1
Locate 18,KL
Print " ";
Next KL
Return