diff --git a/src/play_clj/g2d_physics.clj b/src/play_clj/g2d_physics.clj index 4f4f8bd..a41a3df 100644 --- a/src/play_clj/g2d_physics.clj +++ b/src/play_clj/g2d_physics.clj @@ -93,6 +93,10 @@ `(let [object# (~(joint-init k))] (u/fields! object# ~@options))) +(defmacro joint! + [object k & options] + `(u/call! ^Joint ~object ~k ~@options)) + (defn create-joint!* [screen j-def] (box-2d! screen :create-joint j-def)) @@ -110,6 +114,10 @@ (u/fields! object# ~@options) object#)) +(defmacro fixture! + [object k & options] + `(u/call! ^Fixture ~object ~k ~@options)) + ; shapes (defn chain* @@ -170,10 +178,6 @@ [object k & options] `(u/call! ^Contact ~object ~k ~@options)) -(defmacro fixture! - [object k & options] - `(u/call! ^Fixture ~object ~k ~@options)) - (defn find-body [body entities] (some #(if (= body (:body %)) %) entities))