home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1990-12-11 | 1.2 KB | 52 lines |
- ' More Stuff With The Sine & Cosine Wave
- '
- ' By
- '
- ' Graham Stephenson 1992
- '
- ' This program will display six bobs every vertical blank at a position
- ' depending on the sine of a number (at both X and Y coordinates).
- '
- ' I have no idea what you could use this program for, but someone somewhere
- ' will find a use for it!
-
- Load "df0:Sprites/Letter.abk"
- Screen Open 0,320,200,4,Lowres
- Flash Off : Cls 0
- Double Buffer : Bob Update Off : Autoback 0
- Get Sprite Palette
-
- Dim XPOS(359),YPOS(359),BX(5),BY(5)
-
- Degree
- For T=0 To 359
- XPOS(T)=140*Sin(T)
- YPOS(T)=85*Cos(T)
- Next T
-
- Radian
-
- For T=0 To 5
- BX(T)=T*8
- Next T
- ' This above three lines set the "Space" between each letter, otherwise
- ' all the letters will be displayed at the same position, resulting in
- ' a jumbled mess.
-
- T=0
-
- Do
- For LOP=0 To 5
- Add BX(LOP),4
- Add BY(LOP),2
- If BX(LOP)>359 Then BX(LOP)=0
- If BY(LOP)>359 Then BY(LOP)=0
- Bob LOP,160-XPOS(BX(LOP)),100-YPOS(BY(LOP)),(5-LOP)+1
- Next LOP
- Bob Clear : Bob Draw : Screen Swap : Wait Vbl
- Loop
-
- ' That's all folks! Until my next piece of Source Code, Bye ...
- '
- ' Graham Stephenson 19-12-92
- '