From e02d3d74b1aae368084c3c81145568274054a48c Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 6 Oct 2020 18:55:15 -0400 Subject: node-2d: Stop using framebuffers with canvases. --- examples/shmup/shmup.scm | 8 +-- starling/minibuffer.scm | 4 +- starling/node-2d.scm | 128 ++++++++++++++--------------------------------- 3 files changed, 41 insertions(+), 99 deletions(-) diff --git a/examples/shmup/shmup.scm b/examples/shmup/shmup.scm index 95f6292..b775234 100644 --- a/examples/shmup/shmup.scm +++ b/examples/shmup/shmup.scm @@ -653,12 +653,8 @@ (reset-game shmup)) (define-method (on-boot (shmup )) - (set! (views shmup) - (list (make - #:camera (make - #:width game-width - #:height game-height) - #:area (make-rect 0 0 window-width window-height)))) + (set! (cameras shmup) + (list (make #:resolution (vec2 game-width game-height)))) (attach-to shmup (make #:name 'background diff --git a/starling/minibuffer.scm b/starling/minibuffer.scm index dd8edbe..54aa50d 100644 --- a/starling/minibuffer.scm +++ b/starling/minibuffer.scm @@ -96,14 +96,14 @@ (_ #f)))) (define-method (on-boot (minibuffer )) - (let* ((view-area (area (car (views minibuffer)))) + (let* ((res (resolution (car (cameras minibuffer)))) (font (default-font)) (line-height (font-line-height font)) (padding 8.0)) (attach-to minibuffer (make #:region (make-rect 0.0 0.0 - (rect-width view-area) + (vec2-x res) (+ line-height (* padding 2.0))) #:color (make-color 0.0 0.0 0.0 1.0)) (make