Turn macro into function
This commit is contained in:
@@ -16,22 +16,22 @@
|
|||||||
`(Color. ^Color (utils/gdx-static-field :graphics :Color ~(first args)))
|
`(Color. ^Color (utils/gdx-static-field :graphics :Color ~(first args)))
|
||||||
`(Color. ~@args)))
|
`(Color. ~@args)))
|
||||||
|
|
||||||
(defn game*
|
(defmacro bitmap-font
|
||||||
|
[& options]
|
||||||
|
`(BitmapFont. ~@options))
|
||||||
|
|
||||||
|
(defn game
|
||||||
[key]
|
[key]
|
||||||
(case key
|
(case key
|
||||||
:width `(.getWidth (Gdx/graphics))
|
:width (.getWidth (Gdx/graphics))
|
||||||
:height `(.getHeight (Gdx/graphics))
|
:height (.getHeight (Gdx/graphics))
|
||||||
:fps `(.getFramesPerSecond (Gdx/graphics))
|
:fps (.getFramesPerSecond (Gdx/graphics))
|
||||||
:is-fullscreen? `(.isFullscreen (Gdx/graphics))
|
:is-fullscreen? (.isFullscreen (Gdx/graphics))
|
||||||
:is-touched? `(.isTouched (Gdx/input))
|
:is-touched? (.isTouched (Gdx/input))
|
||||||
:x `(.getX (Gdx/input))
|
:x (.getX (Gdx/input))
|
||||||
:y `(.getY (Gdx/input))
|
:y (.getY (Gdx/input))
|
||||||
nil))
|
nil))
|
||||||
|
|
||||||
(defmacro game
|
|
||||||
[key]
|
|
||||||
`~(game* key))
|
|
||||||
|
|
||||||
; input
|
; input
|
||||||
|
|
||||||
(defn resolve-key
|
(defn resolve-key
|
||||||
|
|||||||
Reference in New Issue
Block a user