Commit 1ac535de authored by Cory Chamblin's avatar Cory Chamblin
Browse files

removed screen dimension code

parent 7ed9db5b
......@@ -5,8 +5,6 @@
;;;; global state --------------------------------------------------------------
(defparameter *width* nil)
(defparameter *height* nil)
(defparameter *running* nil)
......@@ -26,10 +24,10 @@
(defclass <start-scene> (<scene>) ())
(defmethod display-scene ((s <start-scene>))
(draw-string (window s) (- (floor *width* 2) 7) 2 "CORYS ROGUELIKE")
(draw-string (window s) 0 2 " CORYS ROGUELIKE")
(draw-string (window s) (- (floor *width* 2) 11) 4 "Press [Space] to start")
(draw-string (window s) (- (floor *width* 2) 8) 5 "Press [Q] to quit"))
(draw-string (window s) 0 4 " Press [Space] to start")
(draw-string (window s) 0 5 " Press [Q] to quit"))
(defmethod handle-input ((s <start-scene>) key)
(case key
......@@ -83,16 +81,9 @@
x
y))
(defun update-window-dimensions (window)
(multiple-value-bind (width height) (charms:window-dimensions window)
(setf *width* width)
(setf *height* height)))
;;;; main -----------------------------------------------------------------------
(defun initialize (window)
(update-window-dimensions window)
(setf *running* t)
(make-instance '<start-scene>
:window window))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment