home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
procedures
/
screen_sine.amos
/
screen_sine.amosSourceCode
Wrap
AMOS Source Code
|
1992-09-02
|
2KB
|
107 lines
' *******************
' *** SCREEN SINE ***
' *******************
' *** This Routine Moves The Screen Around, Like A Wave.
' *** This Next Command Makes The Screen Sine Work.
Degree
' *** Set-Up Screen.
Screen Open 0,320,200,2,Lowres
Curs Off
Flash Off
Palette $0,$FF0
Pen 1
Paper 0
Cls 0
' *** Print Text.
Locate 0,0
Print "TEST!";
' *** Zoom Text.
Zoom 0,0,0,40,8 To 0,50,50,269,149
' *** Erase Small Text.
Cline
' *** Open Screen To Scroll On.
Screen Open 1,Screen Width,Screen Height,Screen Colour,Lowres
Curs Off
Flash Off
Get Palette 0
Cls 0
' *** Set Scroll Variables.
SX=1
SY=1
' *** Horizontal Sine.
Repeat
_SINE_X[SX,30,-3,5]
Add SX,10,1 To 360
Until Inkey$<>"" or Mouse Key
' *** Wait.
Wait 5
' *** Vertical Sine.
Repeat
_SINE_Y[SY,30,-3,5]
Add SY,10,1 To 360
Until Inkey$<>"" or Mouse Key
' *** Close Screens & Quit.
Screen Close 0
Screen Close 1
Direct
' *** BASE - This Is What Position The Sine Wave Is In (0-360).
' SIZE - This Is The Actual Size Of The Wave (1-???).
' SSTEP - This Is The Speed Of The Wave (1-???).
' BLOCK - This Is How Detailed The Wave Is (1-30).
Procedure _SINE_X[BASE,SIZE,SSTEP,BLOCK]
Screen 0
X=Screen Width
Y=Screen Height
SA=BASE
For F=0 To X Step BLOCK
Screen Copy 0,F,0,F+BLOCK,Y To 1,F,Sin(SA)*SIZE
Add SA,SSTEP,1 To 360
Next F
End Proc
Procedure _SINE_Y[BASE,SIZE,SSTEP,BLOCK]
Screen 0
X=Screen Width
Y=Screen Height
SA=BASE
For F=0 To Y Step BLOCK
Screen Copy 0,0,F,X,F+BLOCK To 1,Sin(SA)*SIZE,F
Add SA,SSTEP,1 To 360
Next F
End Proc