diff options
author | Ekaitz Zarraga <ekaitz@elenq.tech> | 2022-07-07 00:17:10 +0200 |
---|---|---|
committer | Ekaitz Zarraga <ekaitz@elenq.tech> | 2022-07-08 21:21:59 +0200 |
commit | 4b08f2d18a46d5ee31f6cfd958701c230cbb7580 (patch) | |
tree | fa16bb7ee0882d6843a1aea12ea313440f511acd | |
parent | 2cbdf308ffca12156e308c488bbd49cae480d897 (diff) |
Parameterize scale
-rw-r--r-- | bytepusher.scm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bytepusher.scm b/bytepusher.scm index 8474999..b8e0bc3 100644 --- a/bytepusher.scm +++ b/bytepusher.scm @@ -12,6 +12,7 @@ (define width 256) (define height 256) +(define scale 2) (define keys (make-bitvector 16 #f)) @@ -100,7 +101,7 @@ (sdl-init) (call-with-window (make-window #:title "BytePusher" - #:size (list (* 4 width) (* 4 height))) + #:size (list (* scale width) (* scale height))) (lambda (w) (call-with-renderer (make-renderer w) @@ -164,7 +165,7 @@ (define (loop! renderer) (define texture (make-display-texture renderer)) - (set-renderer-scale! renderer 4 4) + (set-renderer-scale! renderer scale scale) (let loop () (let ((t0 (sdl-ticks))) (loop-frame!) @@ -184,8 +185,9 @@ (define (main) (load-program! "tests/palette.bp") (sdl-init) - (call-with-window (make-window #:title "BytePusher" - #:size (list (* 4 width) (* 4 height))) + (call-with-window + (make-window #:title "BytePusher" + #:size (list (* scale width) (* scale height))) (lambda (w) (call-with-renderer (make-renderer w) loop!))) (sdl-quit)) |