summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2018-11-15 00:37:00 +0100
committerRicardo Wurmus <rekado@elephly.net>2018-11-15 00:39:18 +0100
commit41a7313ec93cbf3124ce3d0da0d1a32bf68f5ddc (patch)
tree1865930daa3091650ea593a32c2d08e60473f2e7 /engine
parent33d7a9af9e5fa6443b434d78bde6cf7c5936fca4 (diff)
shell: Remove frame time calculations.
Diffstat (limited to 'engine')
-rw-r--r--engine/shell.scm18
1 files changed, 2 insertions, 16 deletions
diff --git a/engine/shell.scm b/engine/shell.scm
index 4a9f098..3182483 100644
--- a/engine/shell.scm
+++ b/engine/shell.scm
@@ -1,5 +1,6 @@
;;; Lisp Game Jam 2018
;;; Copyright © 2018 David Thompson <davet@gnu.org>
+;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This program is free software: you can redistribute it and/or
;;; modify it under the terms of the GNU General Public License as
@@ -62,9 +63,7 @@
(projection #:getter projection
#: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))
+ (/ %height %scale-factor) 0 0 1)))
(define (error-string stack key args)
(call-with-output-string
@@ -106,19 +105,6 @@ Enter a debugger for the current game loop error."
(start-repl #:debug (repl-debug shell))
(set! (repl-debugging? shell) #f)))
-(define-method (before-draw)
- (set! (frame-start-time (root-node)) (sdl-ticks)))
-
-(define-method (after-draw)
- (let ((end (sdl-ticks))
- (start (frame-start-time (root-node)))
- (last (avg-frame-time (root-node))))
- (set! (avg-frame-time (root-node))
- (+ (* (- end start) 0.1) (* last 0.9)))))
-
-(add-hook! before-draw-hook before-draw)
-(add-hook! after-draw-hook after-draw)
-
(define (switch-scene shell new-scene)
(detach (current-scene shell))
(set! (current-scene shell) new-scene)