From b693578c83a3168900f58db8fa34dfad4b64631e Mon Sep 17 00:00:00 2001 From: oakes Date: Wed, 8 Jan 2014 03:33:38 -0500 Subject: [PATCH] Turn macro into function --- src/play_clj/core_global.clj | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/play_clj/core_global.clj b/src/play_clj/core_global.clj index 49d8b28..488a054 100644 --- a/src/play_clj/core_global.clj +++ b/src/play_clj/core_global.clj @@ -16,22 +16,22 @@ `(Color. ^Color (utils/gdx-static-field :graphics :Color ~(first args))) `(Color. ~@args))) -(defn game* +(defmacro bitmap-font + [& options] + `(BitmapFont. ~@options)) + +(defn game [key] (case key - :width `(.getWidth (Gdx/graphics)) - :height `(.getHeight (Gdx/graphics)) - :fps `(.getFramesPerSecond (Gdx/graphics)) - :is-fullscreen? `(.isFullscreen (Gdx/graphics)) - :is-touched? `(.isTouched (Gdx/input)) - :x `(.getX (Gdx/input)) - :y `(.getY (Gdx/input)) + :width (.getWidth (Gdx/graphics)) + :height (.getHeight (Gdx/graphics)) + :fps (.getFramesPerSecond (Gdx/graphics)) + :is-fullscreen? (.isFullscreen (Gdx/graphics)) + :is-touched? (.isTouched (Gdx/input)) + :x (.getX (Gdx/input)) + :y (.getY (Gdx/input)) nil)) -(defmacro game - [key] - `~(game* key)) - ; input (defn resolve-key