(use-modules (tsukundere) (sdl2) (sdl2 ttf) (ice-9 match) (srfi srfi-26) (tsukundere animation)) (define (load) (let* ((scene (make-scene '(background loaders))) (paper (load-image "paper.png")) (frames (map (compose load-image (cute string-append "animation/" <> ".png") number->string) (iota 8))) (animation-looping (make-animation (s32vector 100 100) frames 1000)) (animation-boing (make-animation (s32vector 100 200) frames 1000 #:loop 'rewind)) (animation-stop (make-animation (s32vector 200 100) frames 8000 #:loop #f)) (animation-looping-slow (make-animation (s32vector 200 200) frames 4000 #:loop #t))) (map (cute scene-add-object! scene 'loaders <>) (list animation-looping animation-boing animation-stop animation-looping-slow)) (init-script! (lambda () (script (background paper) (pause))) scene))) (run-game #:game-name ".tsukundere-example-buttons" #:window-width 400 #:window-height 400 #:init! load)