From eae5cac9275f79ddb725bc62e41fdf620fa8f412 Mon Sep 17 00:00:00 2001 From: Boutade Date: Tue, 15 Oct 2019 08:50:02 -0500 Subject: centering --- the-price-of-a-cup-of-coffee.lisp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/the-price-of-a-cup-of-coffee.lisp b/the-price-of-a-cup-of-coffee.lisp index 891d702..bdb5bd7 100644 --- a/the-price-of-a-cup-of-coffee.lisp +++ b/the-price-of-a-cup-of-coffee.lisp @@ -170,20 +170,18 @@ (generosity 0.25) (vulnerability 3)) - - (defvar *nance*) (defun boot-up (renderer) - (boot-up-assets renderer) - (setf *nance* (make-instance 'hero :sheet *nance-texture*))) + (setf *nance* (make-instance 'hero :sheet *nance-texture*)) + (setf (sdl2:rect-x (pos *nance*)) + (round (* 0.5 (- +window-width+ (sdl2:rect-width (pos *nance*))))))) (defparameter +frame-delay+ (round (/ 1000 60))) - (defun action-key-pressed () (print "Action")) -- cgit v1.2.3