Gabriel Pariat
2 years ago
17 changed files with 432 additions and 224 deletions
@ -1,17 +1,17 @@
@@ -1,17 +1,17 @@
|
||||
(in-package :pong.client) |
||||
|
||||
(defconstant +title-top-padding+ 30) |
||||
(defconstant +menu-padding+ 10) |
||||
(defconstant +menu-group-padding+ 20) |
||||
(defconstant +menu-font+ "assets/ComicMono.ttf") |
||||
(defconstant +menu-font-size+ 32) |
||||
(defconstant +menu-title-font-size+ 52) |
||||
(defconstant +menu-group-title-font-size+ 42) |
||||
(defconstant +menu-text-color+ r:+white+) |
||||
(defconstant +menu-local-1-player+ "1 Player") |
||||
(defconstant +menu-local-2-players+ "2 Players") |
||||
(defconstant +menu-online-create+ "Create Game") |
||||
(defconstant +menu-online-join+ "Join Game") |
||||
(defconstant +score-txt-size+ 32) |
||||
(defconstant +score-padding+ 20) |
||||
(defconstant +score-font+ "assets/ComicMono.ttf") |
||||
(defparameter *title-top-padding* 30) |
||||
(defparameter *menu-padding* 10) |
||||
(defparameter *menu-group-padding* 20) |
||||
(defparameter *menu-font* "client/assets/ComicMono.ttf") |
||||
(defparameter *menu-font-size* 32) |
||||
(defparameter *menu-title-font-size* 52) |
||||
(defparameter *menu-group-title-font-size* 42) |
||||
(defparameter *menu-text-color* r:+white+) |
||||
(defparameter *menu-local-1-player* "1 Player") |
||||
(defparameter *menu-local-2-players* "2 Players") |
||||
(defparameter *menu-online-create* "Create Game") |
||||
(defparameter *menu-online-join* "Join Game") |
||||
(defparameter *score-txt-size* 32) |
||||
(defparameter *score-padding* 20) |
||||
(defparameter *score-font* "client/assets/ComicMono.ttf") |
||||
|
@ -1,23 +0,0 @@
@@ -1,23 +0,0 @@
|
||||
(in-package :pong.client) |
||||
|
||||
(defun main () |
||||
(let* ((last-time nil) |
||||
(current-time (get-internal-real-time))) |
||||
(r:with-window (800 600 "Pariatech's Pong") |
||||
(gui:with-gui |
||||
(open-main-menu) |
||||
|
||||
(r:set-config-flags r:+flag-window-resizable+) |
||||
(r:set-target-fps 60) |
||||
(r:set-exit-key 0) |
||||
(loop |
||||
until (or (r:window-should-close) (scene-should-close *scene*)) |
||||
do (setf last-time current-time) |
||||
(setf current-time (/ (get-internal-real-time) internal-time-units-per-second)) |
||||
|
||||
(let ((timelapse (- current-time last-time))) |
||||
(on-update *scene* timelapse)) |
||||
(r:with-drawing |
||||
(r:clear-background r:+gray+) |
||||
(on-draw *scene*) |
||||
(r:draw-fps 20 20))))))) |
Loading…
Reference in new issue