home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
subroutines
/
unlimitedbobs.amos
/
unlimitedbobs.amosSourceCode
Wrap
AMOS Source Code
|
1991-06-11
|
4KB
|
215 lines
Rem Unlimited Bobs Demo
Rem by JAG of FANATIX
Rem
Proc MESS
Procedure MESS
Screen Open 3,320,256,32,Lowres : Cls 0 : Hide On
Close Workbench : Close Editor : Led Off : Break Off
Load "unlspr.abk",1
Load "unlmus.abk",3
Load "unlpic.abk",6
Music 1
Make Mask
Unpack 6 To 0 : Hide On
Dim A(3) : Dim B(3),CO(8),EQ(16)
Restore EQDATA
For F=1 To 16
Read Q : EQ(F)=Q
Next F
Repeat
Dec V0 : If V0<1 Then V0=1
Dec V1 : If V1<1 Then V1=1
Dec V2 : If V2<1 Then V2=1
Dec V3 : If V3<1 Then V3=1
If Vumeter(0)>10 Then V0=16
If Vumeter(1)>10 Then V1=16
If Vumeter(2)>10 Then V2=16
If Vumeter(3)>10 Then V3=16
Colour 2,EQ(V0)
Colour 3,EQ(V1)
Colour 4,EQ(V2)
Colour 5,EQ(V3)
Wait Vbl
Until Mouse Key=1
Fade 5 : Wait 75
Screen Close 3
Wait Vbl
For F=0 To 2
Screen Open F,360,300,8,Lowres : Curs Off : Flash Off : Cls 0 : Hide On
Screen Display F,120,30,,
Get Sprite Palette
Wait Vbl
Next F
M=40 : CL=1
Degree
' MAIN ROUTINE
TYPE=1 : Goto FIRST
MAINLOOP:
Do
If Mouse Key=1 Then Gosub FCK : Inc TYPE : If TYPE>5 Then TYPE=1
Gosub CLEAR
If TYPE=1 Then Goto FIRST
If TYPE=2 Then Goto SECOND
If TYPE=3 Then Goto THIRD
If TYPE=4 Then Goto FOURTH
If TYPE=5 Then Goto FIFTH
Loop
CLEAR:
Screen To Front 0
Wait Vbl
For F=0 To 2
Screen F : Fade 3 : Wait 45
Cls 0
Dec CL : Gosub CCOL
Next F
Return
' YO! THE ROUTINES
FIRST:
Screen 0 : Screen To Front 0 : M=40 : I=2 : R=0
A(1)=1 : A(2)=3 : A(3)=5
Do
For F=0 To 2
Screen F
Screen To Front F
Add A(F+1),6
Add R,1,0 To 359
If A(F+1)>360 Then A(F+1)=A(F+1)-360 : Gosub FIRSTSIZE
Paste Bob(Sin(A(F+1))*M)+160,(Sin(A(F+1)+R)*M)+128,1
Wait Vbl
If Mouse Key=1 Then Goto MAINLOOP
If Mouse Key=2 Then Gosub CCOL
Next F
Loop
FIRSTSIZE:
If T=0 Then Add M,2 : If M>120 Then T=1
If T=1 Then M=M-2 : If M<40 Then T=0
Return
'
' THE SECOND BIT LAMERS
SECOND:
Screen 0 : Screen To Front 0
M=1 : T=0
A(1)=1 : A(2)=3 : A(3)=5
Do
For F=0 To 2
Screen F
Screen To Front F
Add A(F+1),6
If T=0 Then Add M,3 : If M>200 Then T=1
If T=1 Then M=M-2 : If M<1 Then M=1 : T=0
If A(F+1)>360 Then A(F+1)=A(F+1)-360
Paste Bob(Sin(A(F+1))*M)+160,(Sin(A(F+1)+90)*M)+128,1
Wait Vbl
If Mouse Key=1 Then Goto MAINLOOP
If Mouse Key=2 Then Gosub CCOL
Next F
Loop
THIRD:
Screen 0 : Screen To Front 0
A(1)=1 : A(2)=3 : A(3)=5
M=10 : XI=3 : YI=2 : S#=0
Do
For F=0 To 2
Screen F
Screen To Front F
Add A(F+1),6
If A(F+1)>360 Then A(F+1)=A(F+1)-360
S#=S#+0.072 : If S#>360 Then S#=S#-360
Paste Bob(Sin(A(F+1)+XI+S#)*100)+160,(Sin(A(F+1)+YI)*100)+128,1
Wait Vbl
If Mouse Key=1 Then Goto MAINLOOP
If Mouse Key=2 Then Gosub CCOL
Next F
Loop
' THE FOURTH BIT!!
FOURTH:
Screen 0 : Screen To Front 0
A(1)=1 : A(2)=3 : A(3)=5
M=10 : XI=3 : YI=2 : S#=0 : T=0
Do
For F=0 To 2
Screen F
Screen To Front F
Add A(F+1),6
If A(F+1)>360 Then A(F+1)=A(F+1)-360
Inc XI : If XI>360 Then XI=XI-360
S#=S#+0.072 : If S#>360 Then S#=S#-360
Paste Bob(Sin(A(F+1)+XI+S#)*120)+160,(Sin(A(F+1))*60)+128,1
Wait Vbl
If Mouse Key=1 Then Goto MAINLOOP
If Mouse Key=2 Then Gosub CCOL
Next F
Loop
' DA FIF BITZ
FIFTH:
Screen 0 : Screen To Front 0
A(1)=1 : A(2)=3 : A(3)=5
M=10 : XI=3 : YI=2 : S#=110 : T=0
Do
For F=0 To 2
Screen F
Screen To Front F
Add A(F+1),6
If A(F+1)>360 Then A(F+1)=A(F+1)-360
If T=0 Then S#=S#+0.07 : If S#>120 Then T=1
If T=1 Then S#=S#-0.07 : If S#<1 Then T=0
Paste Bob(Sin(A(F+1))*S#)+160,(Sin(A(F+1)+90)*S#)+128,1
Wait Vbl
If Mouse Key=1 Then Goto MAINLOOP
If Mouse Key=2 Then Gosub CCOL
Next F
Loop
FCK:
Repeat
If Mouse Key=3 Then Goto DIE
Wait Vbl
Until Mouse Key=0
Wait Vbl
Return
CCOL:
Inc CL : If CL>6 Then CL=1
If CL=1 Then Restore RED
If CL=2 Then Restore YELLOW
If CL=3 Then Restore GREEN
If CL=4 Then Restore CYAN
If CL=5 Then Restore BLUE
If CL=6 Then Restore PURPLE
Screen 0
For CT=1 To 8
Read DA
CO(CT)=DA
Next CT
Fade 3,CO(1),CO(2),CO(3),CO(4),CO(5),CO(6),CO(7),CO(8)
For SLI=0 To 200
Screen 1 : Get Palette 0
Screen 2 : Get Palette 1
Next SLI
Return
RED:
Data $0,$FFF,$F00,$C00,$A00,$700,$500,$300
YELLOW:
Data $0,$FFF,$FF0,$CC0,$AA0,$770,$550,$330
GREEN:
Data $0,$FFF,$F0,$C0,$A0,$70,$50,$30
CYAN:
Data $0,$FFF,$FF,$CC,$AA,$77,$55,$33
BLUE:
Data $0,$FFF,$F,$C,$A,$7,$5,$3
PURPLE:
Data $0,$FFF,$F0F,$C0C,$A0A,$707,$505,$303
EQDATA:
Data $0,$100,$200,$300,$400,$500,$600,$700,$800,$900,$A00,$B00,$C00,$D00,$E00,$F00
DIE:
Screen To Front 0
For F=1 To 2
Screen Close F
Next F
Screen 0
Fade 5
For F=63 To 0 Step -1
For T=0 To 2000 : Next T : Mvolume F : Next F
Music Off
Screen Close 0
Mvolume 63
Run "ReflectingScroll.AMOS"
End Proc