home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
procedures
/
bang_proc.amos
/
bang_proc.amosSourceCode
Wrap
AMOS Source Code
|
1991-06-13
|
960b
|
23 lines
Procedure BANG[XCENTRE,YCENTRE,MSIZE,CYCLES,FIRSTCOLOUR,NOCOLS]
'XCENTRE,YCENTRE: co-ords of explosions centre
'MSIZE: diameter in pixels. CYCLES: no. of individual explosions
'NOCOLS: no. of contiguous palette colours available, the first of which is FIRSTCOLOUR
'
'e.g. BANG[160,100,20,4,3,3]
' draws a three cycle explosion 20 pixels across at screen co-ordinates 160,100 , using colours 3,4 and 5.
'
DIV=Int(MSIZE/10+1)
MSIZE=Int(MSIZE/DIV)*DIV
For R=1 To CYCLES
For SIZE=1 To MSIZE Step DIV
If SIZE=1 Then Cls 0
Boom : Rem replace this line with your own sample instruction if you're using samples.
For A=1 To 4
Ink Rnd(NOCOLS-1)+FIRSTCOLOUR
XPOS=Min(Rnd(SIZE)+XCENTRE-SIZE,Screen Width)
YPOS=Min(Rnd(SIZE)+YCENTRE-SIZE,Screen Height)
Bar XPOS,YPOS To Max(XPOS+SIZE,0),Max(YPOS+SIZE,0)
Next A : Next SIZE
Next R
Cls 0
End Proc