home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
601-625
/
apd603
/
autoexec.amos
/
autoexec.amosSourceCode
Wrap
AMOS Source Code
|
1978-03-10
|
5KB
|
201 lines
Screen Open 0,320,200,16,Lowres
Curs Off : Cls 0 : Hide
Load "letters.abk" : Load "cool_breeze.abk" : Music 1
STEXT$="......... WELCOME TO YOUR VERY OWN TABLES TEST , CREATED BY GRAHAM WOOD "
STEXT$=STEXT$+" THERE ARE TEN QUESTIONS FOR EACH TEST , YOU ARE TRYING TO SCORE "
STEXT$=STEXT$+" TEN OUT OF TEN......GOOD LUCK "
STEXT$=STEXT$+" .........PRESS MOUSE KEY TO BEGIN TEST "
INIT_SCROLTEXT[0,150,4,1]
Hide On
Repeat
SCROLTEXT
Wait Vbl
Until Mouse Key
Cls 0
Gosub LO
Procedure INIT_SCROLTEXT[SC,Y,V,BB]
Global STEXT$,SLTEXT,SPTEXT,BBFIRST
Global SSC,STSCREEN,STREAL,HSFNT
Global SVX,STX,SSP,SCPT,SX,SY,SOX
No Mask
NCOUL=Deek(Start(15)+4)
HSFNT=Deek(Start(15))
STSCREEN=336+16
STREAL=STSCREEN+32
SLTEXT=Len(STEXT$)
SPTEXT=1
SX=STSCREEN : SY=0
SVX=V
STX=0 : SCPT=-V
SSC=SC : SOX=0
BBFIRST=BB-1
Screen Open SC,STREAL,200,NCOUL,0
Curs Off : Flash Off : Cls 0
Screen Display SC,,Y,,HSFNT
Get Sprite Palette
End Proc
Procedure SCROLTEXT
Global STEXT$,SLTEXT,SPTEXT,BBFIRST
Global SSC,STSCREEN,STREAL,HSFNT
Global SVX,STX,SSP,SCPT,SX,SY,SOX
SCPT=SCPT+SVX
If SCPT>=STX
C=Asc(Mid$(STEXT$,SPTEXT,1))
SPTEXT=SPTEXT+1 : If SPTEXT>=SLTEXT : SPTEXT=SPTEXT-SLTEXT : End If
If C=64 : Cls 0 : SOX=0 : SX=STSCREEN : SY=0 : C=32 : End If
A=Start(15)+8+C*2
SSP=Peek(A)
STX=Peek(A+1)
SCPT=0
End If
Clip SX,SY To SX+SVX,SY+HSFNT
Paste Bob SX-SCPT,SY,SSP
SX=SX+SVX
If SX>=STREAL : SX=0 : SY=SY+1 : End If
SOX=SOX+SVX : Screen Offset SSC,SOX,0
End Proc
LO:
Load "cool_breeze.abk" : Load Iff "score",4 : Spack 4 To 10 : Cls 0 : Hide
Load "samples.abk" : Load "plane.abk" : Load Iff "sky",2 : Screen Hide 2
Double Buffer
PICK:
Music 1 : Screen Open 1,320,200,16,Lowres
Curs Off : Flash Off : Cls 0 : Show On
Centre "PICK THE TABLE YOU WANT TO TRY"
Reserve Zone 12
Z=1
For X=40 To 230 Step 60
For Y=20 To 140 Step 60
Set Zone Z,X,Y To X+55,Y+55
Set Zone Z,X,Y To X+55,Y+55
Set Zone Z,X,Y To X+55,Y+55
Z=Z+1
Next Y
Next X
Paste Bob 40,20,11 : Paste Bob 100,20,14 : Paste Bob 160,20,17 : Paste Bob 220,20,20
Paste Bob 40,80,12 : Paste Bob 100,80,15 : Paste Bob 160,80,18 : Paste Bob 220,80,21
Paste Bob 40,140,13 : Paste Bob 100,140,16 : Paste Bob 160,140,19 : Paste Bob 220,140,22
Z=0 : While Z=0
While Mouse Key=0 : Wend
Z=Mouse Zone : Wend
If Z=1 Then Gosub Q2
If Z=Mouse Zone Then Gosub Q1
Z=Mouse Zone
Q1:
Screen Close 1
For N=1 To 10
Screen Open 0,320,200,16,Lowres
Curs Off : Flash Off : Cls 0 : Hide : Paper 0
Get Sprite Palette
Bob Update Off
R=Rnd(12)
I=26
For X=1 To 9
I=I+1
Bob 11,30,30,I : Bob 12,100,50,I : Bob 13,190,40,I : Bob 17,260,20,I
Bob 14,30,150,I : Bob 15,100,170,I : Bob 16,190,150,I : Bob 18,260,170,I
Bob Update
Wait 5
If I=30 Then I=26
Next X
Bell
Locate 10,12
Print Z;" TIMES ";R; : Input "=";A
Screen Close 0
If A=Z*R
Gosub RIGHT
Else
Gosub WRONG
End If
Next
Gosub SC
Q2:
Screen Close 1
For N=1 To 10
Screen Open 0,320,200,16,Lowres
Curs Off : Flash Off : Cls 0 : Hide : Paper 0
Bob Update Off
Get Sprite Palette
R=Rnd(12) : Z=Rnd(12)
W=26
For X=1 To 9
W=W+1
Bob 11,30,30,W : Bob 12,100,50,W : Bob 13,190,40,W : Bob 17,260,20,W
Bob 14,30,150,W : Bob 15,100,170,W : Bob 16,190,150,W : Bob 18,260,170,W
Bob Update
Wait 5
If W=30 Then W=26
Next X
Bell
Locate 10,12
Print Z;" TIMES ";R; : Input "=";A
Screen Close 0
If A=Z*R
Gosub RIGHT
Else
Gosub WRONG
End If
Next
Gosub SC
WRONG:
Screen Open 4,320,300,16,Lowres
Curs Off : Hide : Cls 0
Double Buffer
I=25
Sam Play 7
For L=1 To 10
Bob 1,180,60,I : Bob 2,110,10,I : Bob 3,55,80,I
Bob 4,110,140,I : Bob 5,200,170,I : Bob 6,20,170,I
Bob 7,10,10,I : Bob 8,250,10,I : Bob 9,250,110,I
Bob Update
Wait 10
I=51-I
Next L
A=0
Screen Close 4
Return
End
RIGHT:
Screen Show 2
Curs Off : Hide : Flash Off
Sam Play %111,11,2700
P=23
For X=480 To -150 Step -4
Bob Update
Bob 10,X,50,P
Wait Vbl
P=47-P
Next
Sam Play 12
Wait 10
Sam Play 12
For Y=150 To -70 Step -4
Bob Update
Bob 19,40,Y,31 : Bob 20,100,Y,32
Bob 21,150,Y,33 : Bob 22,210,Y,31
Bob 23,260,Y,32 : Bob 24,310,Y,33
Wait Vbl
Next
Screen Hide 2
S=S+1
A=0
Return
SC:
Screen Open 4,320,200,16,Lowres
Curs Off : Hide : Flash Off
Unpack 10 To 4
Paste Bob 130,80,S
Get Sprite Palette
G=34
For D=1 To 20
Bob Update
Bob 26,30,60,G
Bob 27,200,60,G
G=69-G
Wait 20
Wait Vbl
Next
Fade 6 : Wait 90
S=0
Screen Close 4
Gosub PICK