summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-07-08 19:22:40 +0200
committerRicardo Wurmus <rekado@elephly.net>2018-07-27 17:15:43 +0200
commit5df431a9038712e175f729bcbfbe86927f88545d (patch)
treead8ac7eb9e6a25a2ed9b9d8064cc86fe758d572d
parent128ad5a6bb433a656805c0605aac28b0f6fad758 (diff)
Scale up
-rw-r--r--engine/shell.scm13
-rw-r--r--scripts/inevitable.in4
2 files changed, 11 insertions, 6 deletions
diff --git a/engine/shell.scm b/engine/shell.scm
index 12f6699..d0dd3c7 100644
--- a/engine/shell.scm
+++ b/engine/shell.scm
@@ -45,8 +45,9 @@
(load-tile-font "assets/fonts/bubblemad_8x8.png" 8 8
" !\"©_%❤'()*+,-./0123456789:←<=>?@abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"))
-(define %height 240)
-(define %width 320)
+(define %scale-factor 2)
+(define %height (* %scale-factor 240))
+(define %width (* %scale-factor 320))
(define-class <shell> (<node>)
(debug? #:allocation #:virtual
@@ -67,9 +68,13 @@
#:min-filter 'nearest
#:mag-filter 'nearest))
(fb-region #:getter fb-region
- #:init-form (make-rect 0.0 0.0 (* 2 %width) (* 2 %height)))
+ #:init-form (make-rect 0.0 0.0
+ (* %scale-factor %width)
+ (* %scale-factor %height)))
(projection #:getter projection
- #:init-form (orthographic-projection 0 %width %height 0 0 1))
+ #:init-form (orthographic-projection 0
+ (/ %width %scale-factor)
+ (/ %height %scale-factor) 0 0 1))
(frame-start-time #:accessor frame-start-time)
(avg-frame-time #:accessor avg-frame-time #:init-value 0.0)
(eval-prompt #:accessor eval-prompt
diff --git a/scripts/inevitable.in b/scripts/inevitable.in
index b83a201..618926e 100644
--- a/scripts/inevitable.in
+++ b/scripts/inevitable.in
@@ -25,5 +25,5 @@
(run-node (lambda () (make-shell (lambda () (make <intro>))))
#:window-title "Inevitable"
- #:window-width 640
- #:window-height 480)
+ #:window-width (* 2 640)
+ #:window-height (* 2 480))