From 1f1deea662da4328bf588c0642c8a90c7b1f2144 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 24 Sep 2013 21:06:41 -0400 Subject: Rough draft of manual. --- doc/graphics/animation.texi | 84 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 doc/graphics/animation.texi (limited to 'doc/graphics/animation.texi') diff --git a/doc/graphics/animation.texi b/doc/graphics/animation.texi new file mode 100644 index 0000000..c872263 --- /dev/null +++ b/doc/graphics/animation.texi @@ -0,0 +1,84 @@ +@node Animations +@section Animations + +Animations are sequences of textures and/or texture regions. Common +uses for animations are to give the illusion that a character is +walking across the screen or swinging their sword at a +monster. Animator objects are used to control the playback of an +animation. + +@anchor{2d animation animation-frame-duration}@defspec animation-frame-duration +@end defspec + +@anchor{2d animation animation-frames}@defspec animation-frames +@end defspec + +@anchor{2d animation animation-loop?}@defspec animation-loop? +@end defspec + +@anchor{2d animation animation?}@defspec animation? +@end defspec + +@anchor{2d animation animator-animation}@defspec animator-animation +@end defspec + +@anchor{2d animation animator-frame}@defspec animator-frame +@end defspec + +@anchor{2d animation animator-playing?}@defspec animator-playing? +@end defspec + +@anchor{2d animation animator-time}@defspec animator-time +@end defspec + +@anchor{2d animation animator?}@defspec animator? +@end defspec + +@anchor{2d animation make-animation}@defspec make-animation +@end defspec + +@anchor{2d animation animation-duration}@defun animation-duration animation +Return the total duration of ANIMATION in ticks. + +@end defun + +@anchor{2d animation animation-frame}@defun animation-frame animation index +Return the texture for the given frame INDEX of ANIMATION. + +@end defun + +@anchor{2d animation animation-length}@defun animation-length animation +Return the number of frames in ANIMATION. + +@end defun + +@anchor{2d animation animator-frame-complete?}@defun animator-frame-complete? animator +Return #t when ANIMATOR is done displaying the current frame. + +@end defun + +@anchor{2d animation animator-next!}@defun animator-next! animator +Advance ANIMATOR to the next frame of its animation. + +@end defun + +@anchor{2d animation animator-next-frame}@defun animator-next-frame animator +Return the next frame index for ANIMATOR. + +@end defun + +@anchor{2d animation animator-texture}@defun animator-texture animator +Return a texture for the ANIMATOR's current frame. + +@end defun + +@anchor{2d animation animator-update!}@defun animator-update! animator +Increment the frame time for the ANIMATOR and advance to the next frame +when necessary. + +@end defun + +@anchor{2d animation make-animator}@defun make-animator animation +Create a new animator for ANIMATION. + +@end defun -- cgit v1.2.3