summaryrefslogtreecommitdiff
path: root/engine
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 /engine
parent128ad5a6bb433a656805c0605aac28b0f6fad758 (diff)
Scale up
Diffstat (limited to 'engine')
-rw-r--r--engine/shell.scm13
1 files changed, 9 insertions, 4 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