From 1c856ece96052d4c35e090faa183be8409065c2f Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 16 Apr 2021 08:42:29 -0400 Subject: examples: Update shmup example so it doesn't crash. --- examples/shmup/shmup.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/shmup/shmup.scm b/examples/shmup/shmup.scm index d1f9abc..5267737 100644 --- a/examples/shmup/shmup.scm +++ b/examples/shmup/shmup.scm @@ -101,10 +101,11 @@ (set! (x parallax) new-x) (for-each (lambda (layer) (let* ((sprite (child-ref parallax (name layer))) - (width (texture-width (asset-ref (texture sprite)))) + (t (texture sprite)) + (width (texture-width t)) (tx (exact->inexact (/ (mod (* new-x (scalar layer)) width) width))) - (r (texcoords sprite))) + (r (texture-gl-tex-rect t))) (set-rect-x! r tx))) (layers parallax)))) -- cgit v1.2.3