diff options
author | David Thompson <dthompson2@worcester.edu> | 2021-04-16 08:42:29 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-04-16 08:42:29 -0400 |
commit | 1c856ece96052d4c35e090faa183be8409065c2f (patch) | |
tree | 4761c5865372e02ba9ab67e2839723950c314945 /examples/shmup | |
parent | 0f88b3d96308c4164f8d540b72fe26f6f34fc302 (diff) |
examples: Update shmup example so it doesn't crash.
Diffstat (limited to 'examples/shmup')
-rw-r--r-- | examples/shmup/shmup.scm | 5 |
1 files 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)))) |