diff options
author | David Thompson <dthompson2@worcester.edu> | 2020-12-05 15:47:42 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2020-12-05 15:47:42 -0500 |
commit | 5e5b0cd174126e8b183466932892926e6b068ed2 (patch) | |
tree | f37ae30ed5745ece9703f0ae14c2612dc9e3afe0 | |
parent | ea3f616cc500d405a296f1a55478987d0b2ba8ca (diff) |
Update to new guile-sdl2 API.
-rw-r--r-- | chickadee.scm | 20 | ||||
-rw-r--r-- | guix.scm | 4 |
2 files changed, 12 insertions, 12 deletions
diff --git a/chickadee.scm b/chickadee.scm index 2c65226..e00b2b1 100644 --- a/chickadee.scm +++ b/chickadee.scm @@ -213,31 +213,31 @@ border is disabled, otherwise it is enabled.") (define (window-width window) "Return the width of WINDOW." - (match (sdl2:window-size (unwrap-window window)) - ((x _) x))) + (call-with-values (lambda () (sdl2:window-size (unwrap-window window))) + (lambda (w h) w))) (define (window-height window) "Return the height of WINDOW." - (match (sdl2:window-size (unwrap-window window)) - ((_ y) y))) + (call-with-values (lambda () (sdl2:window-size (unwrap-window window))) + (lambda (w h) h))) (define (window-x window) "Return the X coordinate of the upper-left corner of WINDOW." - (match (sdl2:window-position (unwrap-window window)) - ((x _) x))) + (call-with-values (lambda () (sdl2:window-position (unwrap-window window))) + (lambda (x y) x))) (define (window-y window) "Return the Y coordinate of the upper-left corner of WINDOW." - (match (sdl2:window-position (unwrap-window window)) - ((_ y) y))) + (call-with-values (lambda () (sdl2:window-position (unwrap-window window))) + (lambda (x y) y))) (define (set-window-size! window width height) "Change the dimensions of WINDOW to WIDTH x HEIGHT pixels." - (sdl2:set-window-size! (unwrap-window window) (list width height))) + (sdl2:set-window-size! (unwrap-window window) width height)) (define (set-window-position! window x y) "Move the upper-left corner of WINDOW to pixel coordinates (X, Y)." - (sdl2:set-window-position! (unwrap-window window) (list x y))) + (sdl2:set-window-position! (unwrap-window window) x y)) (define* (run-game #:key (window-title "Chickadee!") @@ -91,7 +91,7 @@ (invoke "autoreconf" "-vfi"))))))))) (define guile-sdl2 - (let ((commit "1054cbd906ced5cb38476b00700aa8c279f6e1c8")) + (let ((commit "ed821d76b70a1454285d415dfae7db9394c535f2")) (package (name "guile-sdl2") (version (string-append "0.5.0-1." (string-take commit 7))) @@ -102,7 +102,7 @@ (commit commit))) (sha256 (base32 - "17cccc2648lhyxq62b1zpzbvmfdqpyn4hnbj2962hbj1mxdms1y8")))) + "1kh3hzf2lmpf773hbxzb0g7c0ghqydp9s969sigg58l8wbr85iyf")))) (build-system gnu-build-system) (arguments '(#:make-flags '("GUILE_AUTO_COMPILE=0") |