Handbook
Glossary
inc-cursor ( cursor: animation-cursor -- )
Vocabulary
papier
.
sprites
Inputs
cursor
an
animation-cursor
Outputs
None
Definition
USING:
accessors
kernel
math
sequences
typed
;
IN:
papier.sprites
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
;