home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sauce 'n' Code 2
/
sauce-n-code-02.adf
/
ASCII_Source
/
AGA_slideshow.asc
next >
Wrap
Text File
|
1995-07-02
|
5KB
|
191 lines
MAIN:
' *****************************************************
' * *
' * AGA Slideshow Engine for Showing GIF Files. *
' * written by Freak of NFA for Ke¡/Carnage *
' * This is meant for use in 2-disk productions *
' * *
' * Requires AMOS Pro Compiler and Kickstart 2.x *
' * Requires "ZGif" in C: directory, uncrunched. *
' * *
' * This source code is Public Domain, please *
' * credit the author if you use it! *
' * *
' *****************************************************
'
'
' **** NEW!! ****
' Program uses "_COMMAND[]" procedure for AMOS 1.35
' compatibility - you can change this to Exec "" if
' you are using AMOS Professional.
'
_MAKESCREENS
_ENVIRONMENT
PICS=20 : Rem - Total Number of pictures
PIC1=8 : Rem - Number of pictures on disk one
Dim PIC$(PICS)
_READTHEPICS
DERROR=0 : Rem ---- Disk Error Variable
' 0 = No Errors
' 1 = Disk not inserted, Escape Pressed
' 2 = File not on disk
PIC=0
Do
' -------------------------------- Generate Picture Number
Add PIC,1,1 To PICS
DISK$="Disk1:" : If PIC>PIC1 Then DISK$="Disk2:"
_LOADTHEFILE
Exit If DERROR<>0
Loop
_CLEANUP
Procedure _MAKESCREENS
'-------------------------------- Make your loading screen here
Screen Open 0,640,256,2,Hires
Curs Off : Flash Off : Cls 0
Palette $448,$FFF
Hide : View
End Proc
Procedure _ENVIRONMENT
Amos Lock
Break Off
Request Wb
Screen 0 : Gr Writing 0
' ------------------------------------------ use 3.0 Setpatch command,
' slideshow will then run in
' mono on an A600 or A500+
_COMMAND["Run >Nil: <Nil: C:Setpatch >Nil:"]
_COMMAND["Resident >Nil: C:ZGif PURE"]
' ------------------------------- Use track Load to insert a Protracker
' module in bank 3 if you want one, this
' will play it if it's there.
If Length(3)<>0
Led Off
Track Loop On
Track Play 3
End If
End Proc
Procedure _READTHEPICS
Shared PIC$(),PICS
For PIC=1 To PICS
Read FILE$
PIC$(PIC)=FILE$
Next PIC
' ----------------------------- Pictures on disk 1
Data "01.gif"
Data "02.gif"
Data "03.gif"
Data "04.gif"
Data "05.gif"
Data "06.gif"
Data "07.gif"
Data "08.gif"
' ----------------------------- Pictures on disk 2
Data "09.gif"
Data "10.gif"
Data "11.gif"
Data "12.gif"
Data "13.gif"
Data "14.gif"
Data "15.gif"
Data "16.gif"
Data "17.gif"
Data "18.gif"
Data "19.gif"
Data "20.gif"
End Proc
Procedure _LOADTHEFILE
Shared DISK$,PIC$(),PIC,DERROR
DERROR=0
' ----------------------------------------- Is disk in drive?
If Exist(DISK$)=False Then _INSERTDISK
If DERROR<>0 Then Pop Proc
' ----------------------------------- Is file on disk ?
If Exist(DISK$+PIC$(PIC))=False
DERROR=2
Pop Proc
End If
' ----------------------------------------- Load file into AMOS
Open In 1,DISK$+PIC$(PIC)
Reserve As Work 10,Lof(1)
Bload DISK$+PIC$(PIC),Start(10)
Close 1
' *********************************************************
' INSERT ANY BANK DECRYPTION ROUTINES IN HERE!!!
' *********************************************************
' --------------------------------------------------- Save to RAM
Bsave "Ram:Temp",Start(10) To Start(10)+Length(10)
Erase 10
' --------------------------------- Show it
Amos To Back
_COMMAND["ZGif >Nil: Ram:Temp"]
Amos To Front
' --------------------------------- Delete the file from RAM
Kill "Ram:Temp"
End Proc
Procedure _INSERTDISK
Shared DISK$,DERROR
' ------------------------------- Insert your own disk-request here
Do
A$=Inkey$
If A$=Chr$(27) : Rem ------------ Check for Escape Key
DERROR=1
Exit
End If
Exit If Exist(DISK$)=True
Loop
End Proc
Procedure _COMMAND[COM$]
' Call the DOS Execute function
Dreg(1)=Varptr(COM$)
Dreg(2)=0
Dreg(3)=0
X=Doscall(-222)
End Proc
Procedure _CLEANUP
Track Stop
Led On
Amos Unlock
Break On
Request On
End Proc