#
# HELP: SYNOPSIS:
# HELP:     coroutine/animate/bounce
# HELP:
# HELP: DESCRIPTION:
# HELP:     Bouncing animation. Use generic/movie/animation/bounce_start
# HELP:     to set this up.
#

IF ${$root.animate.i<$root.animate.iback} GOTO goon
CECHO ${$root.animate.i=0}

:goon

IF ${$root.animate.i<$root.animate.istart} GOTO out
IF ${$root.animate.i<$root.animate.ifwd} GOTO fwd
IF ${$root.animate.i<$root.animate.iend} GOTO out

:back
CECHO ${$root.animate.j+=1}
IF ${$root.animate.j<$root.animate.pback} GOTO out
CECHO ${$root.animate.j=0}
VOL_SET *PREV*
GOTO out

:fwd
CECHO ${$root.animate.j+=1}
IF ${$root.animate.j<$root.animate.pfwd} GOTO out
CECHO ${$root.animate.j=0}
VOL_SET *NEXT*

:out
CECHO ${$root.animate.i+=1}
