summaryrefslogtreecommitdiff
path: root/chickadee.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2020-12-05 15:47:42 -0500
committerDavid Thompson <dthompson2@worcester.edu>2020-12-05 15:47:42 -0500
commit5e5b0cd174126e8b183466932892926e6b068ed2 (patch)
treef37ae30ed5745ece9703f0ae14c2612dc9e3afe0 /chickadee.scm
parentea3f616cc500d405a296f1a55478987d0b2ba8ca (diff)
Update to new guile-sdl2 API.
Diffstat (limited to 'chickadee.scm')
-rw-r--r--chickadee.scm20
1 files changed, 10 insertions, 10 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!")