Rename functions for consistency
This commit is contained in:
@@ -32,7 +32,7 @@
|
|||||||
`~(symbol (str u/main-package ".physics.box2d.BodyDef$BodyType/"
|
`~(symbol (str u/main-package ".physics.box2d.BodyDef$BodyType/"
|
||||||
(u/key->pascal k) "Body")))
|
(u/key->pascal k) "Body")))
|
||||||
|
|
||||||
(defmacro body
|
(defmacro body-def
|
||||||
[k & options]
|
[k & options]
|
||||||
`(let [^BodyDef object# (BodyDef.)]
|
`(let [^BodyDef object# (BodyDef.)]
|
||||||
(set! (. object# type) (body-type ~k))
|
(set! (. object# type) (body-type ~k))
|
||||||
@@ -44,12 +44,12 @@
|
|||||||
(u/call! object# ~k ~@options)))
|
(u/call! object# ~k ~@options)))
|
||||||
|
|
||||||
(defn create-body!*
|
(defn create-body!*
|
||||||
[screen body-def]
|
[screen b-def]
|
||||||
(box-2d! screen :create-body body-def))
|
(box-2d! screen :create-body b-def))
|
||||||
|
|
||||||
(defmacro create-body!
|
(defmacro create-body!
|
||||||
[screen body-def & options]
|
[screen b-def & options]
|
||||||
`(let [^Body object# (create-body!* ~screen ~body-def)]
|
`(let [^Body object# (create-body!* ~screen ~b-def)]
|
||||||
(u/calls! object# ~@options)))
|
(u/calls! object# ~@options)))
|
||||||
|
|
||||||
(defn body-x
|
(defn body-x
|
||||||
@@ -88,18 +88,18 @@
|
|||||||
`(~(symbol (str u/main-package ".physics.box2d.joints."
|
`(~(symbol (str u/main-package ".physics.box2d.joints."
|
||||||
(u/key->pascal k) "JointDef."))))
|
(u/key->pascal k) "JointDef."))))
|
||||||
|
|
||||||
(defmacro joint
|
(defmacro joint-def
|
||||||
[k & options]
|
[k & options]
|
||||||
`(let [object# (joint-init ~k)]
|
`(let [object# (joint-init ~k)]
|
||||||
(u/fields! object# ~@options)))
|
(u/fields! object# ~@options)))
|
||||||
|
|
||||||
(defn create-joint!*
|
(defn create-joint!*
|
||||||
[screen joint-def]
|
[screen j-def]
|
||||||
(box-2d! screen :create-joint joint-def))
|
(box-2d! screen :create-joint j-def))
|
||||||
|
|
||||||
(defmacro create-joint!
|
(defmacro create-joint!
|
||||||
[screen joint-def & options]
|
[screen j-def & options]
|
||||||
`(let [object# (create-joint!* ~screen ~joint-def)]
|
`(let [object# (create-joint!* ~screen ~j-def)]
|
||||||
(u/calls! object# ~@options)))
|
(u/calls! object# ~@options)))
|
||||||
|
|
||||||
; fixtures
|
; fixtures
|
||||||
|
|||||||
Reference in New Issue
Block a user