Add joint! macro

This commit is contained in:
oakes
2014-01-19 10:41:33 -05:00
parent 6bac86a94f
commit ea37299a37

View File

@@ -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))