home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
351-375
/
apd372
/
slideshow
/
autoexec.amos
/
autoexec.amosSourceCode
Wrap
AMOS Source Code
|
1991-07-31
|
5KB
|
211 lines
' Slide Show Manager Version 1.2 December 1991 (c) Norman C. Borg
'
Dim MX(4),POSX(21,2),POSY(21,2),DRV$(4)
Global D,DRV$(),DV$,SLIDE$,SLIDE,POSX(),POSY(),SCRN,NUM$,MX(),HN,MZ,PMZ
FILING
VARS
Screen Open 1,640,250,16,Hires
SLIDE=1 : ROUTINE
Auto View Off
Limit Mouse
SCAN:
PMZ=MZ : BUTTONOFF
ZONING
Do
M=Mouse Click
If M<>0 Then MZ=Mouse Zone : Exit
Loop
If MZ=21 Then ABORT
On MZ Proc FIRST,REWIND,PREVIOUS,HALT,CHOOSE,PAUSE,OTHER,FOWARD,LAST
Goto SCAN
Procedure FIRST
If SLIDE=1 Then Pop Proc
LIGHTBUTTON
SLIDE=1
ROUTINE
End Proc
Procedure REWIND
If SLIDE=1 Then Pop Proc
LIGHTBUTTON
TMZ=MZ
LESS:
Do
ZONING
M=Mouse Click
If M<>0 Then MZ=Mouse Zone : Exit
SLIDE=SLIDE-1 : If SLIDE<1 Then SLIDE=1 : Goto ARRIVAL
ROUTINE
LIGHTBUTTON
Loop
If MZ<>4 and MZ<>6 Then Goto LESS
LIGHTBUTTON
If MZ=4 Then PMZ=TMZ : BUTTONOFF : Wait 30 : Goto ARRIVAL
If MZ=6
Do
M=Mouse Click : MZ=Mouse Zone
If M<>0 and MZ=6
Exit
End If
Loop
End If
PMZ=MZ : BUTTONOFF
MZ=TMZ : LIGHTBUTTON
Goto LESS
ARRIVAL:
PMZ=MZ : BUTTONOFF
End Proc
Procedure PREVIOUS
If SLIDE=1 Then Pop Proc
LIGHTBUTTON
SLIDE=SLIDE-1 : If SLIDE<0 Then SLIDE=0
ROUTINE
End Proc
Procedure HALT
Rem useless if not in REWIND or FORWARD Modes
End Proc
Procedure CHOOSE
LIGHTBUTTON
TMZ=MZ
PROL:
NUM$="" : XX=545 : YY=245
ZONING
BEGIN:
If Len(NUM$)>2 Then Goto OKAY
Repeat
M=Mouse Click : MZ=Mouse Zone
Until M<>0
If MZ<10 or MZ>20 Then Goto BEGIN
If MZ=20 Then LIGHTBUTTON : Goto OKAY
QQ=MZ-9 : T$=Str$(QQ) : T$=Right$(T$,1)
Screen SCRN : Ink 0,6 : Text XX,YY,T$ : XX=XX+8
NUM$=NUM$+T$
Goto BEGIN
OKAY:
If NUM$="" Then Goto CONCL
V=Val(NUM$)
If V>MX(D)
PMZ=MZ : BUTTONOFF
Ink 7 : Bar 545,226 To 570,233
Goto PROL
End If
SLIDE=V
ROUTINE
CONCL:
PMZ=TMZ : BUTTONOFF
End Proc
Procedure PAUSE
Rem useless unless in REWIND or FORWARD Modes
End Proc
Procedure OTHER
If SLIDE=MX(D) Then Pop Proc
LIGHTBUTTON
SLIDE=SLIDE+1 : If SLIDE>MX(D) Then SLIDE=1
ROUTINE
End Proc
Procedure FOWARD
If SLIDE=MX(D) Then Pop Proc
LIGHTBUTTON
TMZ=MZ
MORE:
Do
ZONING
M=Mouse Click
If M<>0 Then MZ=Mouse Zone : Exit
SLIDE=SLIDE+1 : If SLIDE>MX(D) Then SLIDE=MX(D) : Goto ARRIVAL2
ROUTINE
LIGHTBUTTON
Loop
If MZ<>4 and MZ<>6 Then Goto MORE
LIGHTBUTTON
If MZ=4 Then PMZ=TMZ : BUTTONOFF : Wait 30 : Goto ARRIVAL2
If MZ=6
Do
M=Mouse Click : MZ=Mouse Zone
If M<>0 and MZ=6
Exit
End If
Loop
End If
PMZ=MZ : BUTTONOFF
MZ=TMZ : LIGHTBUTTON
Goto MORE
ARRIVAL2:
PMZ=MZ : BUTTONOFF
End Proc
Procedure LAST
If SLIDE=MX(D) Then Pop Proc
LIGHTBUTTON
SLIDE=MX(D)
ROUTINE
End Proc
Procedure ABORT
LIGHTBUTTON
End
End Proc
Procedure LIGHTBUTTON
Screen SCRN
Ink 2 : Box POSX(MZ,1)-1,POSY(MZ,1) To POSX(MZ,2)-1,POSY(MZ,2)
End Proc
Procedure BUTTONOFF
Screen SCRN
Ink 6 : Box POSX(PMZ,1)-1,POSY(PMZ,1) To POSX(PMZ,2)-1,POSY(PMZ,2)
End Proc
Procedure VARS
For X=0 To D
Read DRV$(X)
Next
SCRN=1
Data "dh0:","df0:","df1:","df2:"
End Proc
Procedure FILING
Open In 1,"Driver"
Input #1,D
If D=9 Then D=0 : Input #1,HN : Goto FINISH
For X=1 To D
Input #1,MX(X)
Next
FINISH:
Close 1
End Proc
Procedure ROUTINE
SLIDE$=Str$(SLIDE) : L=Len(SLIDE$) : SLIDE$=Right$(SLIDE$,(L-1))
CHOOSEDRV
CHOOSESCRN
FF$=DV$+SLIDE$
Load Iff FF$,SCRN : Wait Vbl
Screen To Front SCRN : View : Screen SCRN
If SLIDE=0 Then SL$=" Index" : Goto PAGE
SL$=SLIDE$+"/"+Str$(MX(D))
PAGE:
Get Rom Fonts : Set Font 2 : Ink 0,6
Text 14,227,SL$
End Proc
Procedure CHOOSEDRV
If D=9 Then DV$=DRV$(0) : Goto OK
If SLIDE<MX(1) Then DV$=DRV$(1) : Goto OK
If SLIDE<MX(2) and SLIDE>MX(1) Then DV$=DRV$(2) : Goto OK
If SLIDE>MX(2) Then DV$=DRV$(3)
OK:
End Proc
Procedure CHOOSESCRN
SCRN=SCRN+1 : If SCRN>2 Then SCRN=1
End Proc
Procedure ZONING
Reserve Zone 21
X1=12 : X2=35 : Y1=238 : Y2=246
For X=1 To 9
POSX(X,1)=X1 : POSX(X,2)=X2 : POSY(X,1)=Y1 : POSY(X,2)=Y2
Set Zone X,X1,Y1 To X2,Y2
X1=X1+32 : X2=X2+32
Next
X1=300 : X2=312
For X=10 To 19
POSX(X,1)=X1 : POSX(X,2)=X2 : POSY(X,1)=Y1 : POSY(X,2)=Y2
Set Zone X,X1,Y1 To X2,Y2
X1=X1+21 : X2=X2+21
Next
POSX(20,1)=510 : POSX(20,2)=533 : POSY(20,1)=Y1 : POSY(20,2)=Y2
POSX(21,1)=606 : POSX(21,2)=629 : POSY(21,1)=Y1 : POSY(21,2)=Y2
Set Zone 20,510,Y1 To 533,Y2
Set Zone 21,606,Y1 To 629,Y2
End Proc