update makefile with additional sources

This commit is contained in:
Peter Tillemans 2024-05-21 13:56:18 +02:00
parent 67ad81d9f7
commit 79030d57e9
2 changed files with 8 additions and 3 deletions

View file

@ -20,8 +20,13 @@ moddir=$(prefix)/share/guile/site/$(GUILE_EFFECTIVE_VERSION)
godir=$(libdir)/guile/$(GUILE_EFFECTIVE_VERSION)/site-ccache
SOURCES = \
game/model/level.scm \
game/model/hero.scm \
game/render/level.scm \
game/render/hero.scm \
game/main.scm
EXTRA_DIST = \
$(SOURCES) \
assets/images/chickadee.png \

View file

@ -21,8 +21,8 @@
(define (hero-sprite hero)
(let* ((x (inexact->exact (floor (vec2-x (hero-position hero)))))
(x-offset (remainder x 8))
(hero-index (+ hero-walk-offset x-offset)))
(animation-frame (remainder x 8))
(hero-index (+ hero-walk-offset animation-frame)))
(texture-atlas-ref hero-atlas hero-index)))
(define (render-hero hero)