home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
subroutines
/
pic_roller.amos
/
pic_roller.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1993-07-31
|
2KB
|
140 lines
' *** Grab Command Line, If Any.
C$=Command Line$
' *** Error Bit.
On Error Goto ER
' **********************
' *** PICTURE ROLLER ***
' **********************
' *** This Routine Load An IFF Picture, And Roll It Onto The Screen.
' *** Roller Height, Try 5 For A Faster Roller.
H=10
' *** If No Command Line, Then Display File-Requester.
If C$=""
C$=Fsel$("","","LOAD IFF PICTURE")
End If
' *** Load IFF Picture & Hide Screen.
Load Iff C$,0
Screen Hide 0
' *** Find What Screen Mode Picture Is In.
' AMOS-Pro Users Just Replace The Following 7 Lines With SM=Screen Mode.
SM=0
If Screen Colour<17 and Screen Width>320
SM=Hires
End If
If Screen Height>256
SM=SM+Laced
End If
' *** Open Work Screen.
Screen Open 1,Screen Width,Screen Height,Screen Colour,SM
Screen Hide 1
Curs Off
Flash Off
Cls 0
Get Palette 0
' *** Copy Picture To Work Screen.
Screen Copy 0 To 1
' *** Re-Open Screen 0, But A bit Bigger, For Scroll Effect.
Screen Open 0,Screen Width,Screen Height+1,Screen Colour,SM
Screen Hide 0
Curs Off
Flash Off
Cls 0
Get Palette 1
' *** Copy Picture Onto Screen 0, And Close Work Screen.
Screen Copy 1 To 0
Screen Close 1
' *** Hide Mouse & Picture.
Hide
Screen Hide 0
' *** Open & Hide Roller Screen.
Screen Open 1,Screen Width,H*2,Screen Colour,Lowres
Curs Off
Flash Off
Cls 0
Screen Hide 1
' *** Open Display Screen.
Screen Open 2,Screen Width,Screen Height(0)+(H*2),Screen Colour,SM
Screen Display 2,,,,Screen Height(0)
Curs Off
Flash Off
Get Palette 0
Cls 0
' *** Roll Picture.
For Y=1 To Screen Height(0)-1
' *** Copy Part & Enlarge On Roller Screen.
YY=Y
For LOP=Y To Y+H
Screen Copy 0,0,LOP+(H*4),Screen Width,(LOP+(H*4))+1 To 1,0,(LOP-YY)*2
Screen Copy 0,0,LOP+(H*4),Screen Width,(LOP+(H*4))+1 To 1,0,(LOP-YY)*2+1
Next LOP
' *** Grab Part As Block.
Screen 1
Get Block 1,0,0,Screen Width,Screen Height
' *** Flip Block Vertically, And Place On View Screen.
Screen 2
Vrev Block 1
Put Block 1,0,Y
Screen Copy 0,0,Y-H,Screen Width,Y+1 To 2,0,Y-H
' *** REM Out The Next Command If You Want The Roller To Speed Up.
Wait Vbl
Next Y
' *** Close Work & Roller Screen.
Screen Close 0
Screen Close 1
' *** Wait For Key Or Mouse Press.
Repeat
Until Inkey$<>"" or Mouse Key
' *** Close View Screen & Quit.
Screen Close 2
Direct
' *** This Is Just The Error Routine.
ER:
Resume ER2
ER2:
Boom
Edit