inc-cursor ( cursor: animation-cursor -- )


Vocabulary
papier.sprites

Inputs
cursoran animation-cursor


Outputs
None

Definition


TYPED:: inc-cursor ( cursor: animation-cursor -- )
cursor [ time>> ] [ frame>> ] [ animation>> ] tri
:> ( time# frame# animation ) frame# animation nth
:> frame time# 1 + :> time' time' frame duration>> = [
frame# 1 + :> frame' frame' animation length =
[ 0 ] [ frame' ] if :> frame'' cursor 0 >>time
frame'' >>frame drop
] [ cursor time' >>time drop ] if ;