From 161e8b0333ba02f8f0d802acf5b36408552bcba9 Mon Sep 17 00:00:00 2001 From: oakes Date: Tue, 31 Dec 2013 14:01:25 -0500 Subject: [PATCH] Rename functions that are LibGDX-specific --- common/src/play_clj/core_2d.clj | 6 +++--- common/src/play_clj/utils.clj | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/src/play_clj/core_2d.clj b/common/src/play_clj/core_2d.clj index 4577025..1b30248 100644 --- a/common/src/play_clj/core_2d.clj +++ b/common/src/play_clj/core_2d.clj @@ -41,9 +41,9 @@ (defmacro animation [duration images & args] `(Animation. ~duration - (utils/into-gdx-array ~images) - (utils/static-field :graphics :g2d :Animation - ~(or (first args) :normal)))) + (utils/gdx-into-array ~images) + (utils/gdx-static-field :graphics :g2d :Animation + ~(or (first args) :normal)))) (defn get-key-frame ([screen ^Animation animation] diff --git a/common/src/play_clj/utils.clj b/common/src/play_clj/utils.clj index 768985c..b692b37 100644 --- a/common/src/play_clj/utils.clj +++ b/common/src/play_clj/utils.clj @@ -10,7 +10,7 @@ [keys] (->> keys (map name) (s/join ".") (str "com.badlogic.gdx."))) -(defn static-field* +(defn gdx-static-field* [args] (->> (last args) split-keys @@ -19,10 +19,10 @@ (str (join-keys (butlast args)) "/") symbol)) -(defmacro static-field +(defmacro gdx-static-field [& args] - `~(static-field* args)) + `~(gdx-static-field* args)) -(defn into-gdx-array +(defn gdx-into-array [a] (-> a into-array Array.))