Remove unnecessary newlines from docstrings

This commit is contained in:
oakes
2014-01-21 02:38:46 -05:00
parent 4aa9772d1c
commit ba43d64eb5
5 changed files with 42 additions and 84 deletions

View File

@@ -98,8 +98,7 @@ object"
object, sets it as the screen for the `game`, and runs the functions from object, sets it as the screen for the `game`, and runs the functions from
`screens` in the order they are provided in `screens` in the order they are provided in
(set-screen! hello-world main-screen text-screen) (set-screen! hello-world main-screen text-screen)"
"
[^Game game & screens] [^Game game & screens]
(let [add-inputs! (fn [] (let [add-inputs! (fn []
(input! :set-input-processor (InputMultiplexer.)) (input! :set-input-processor (InputMultiplexer.))
@@ -123,7 +122,6 @@ object, sets it as the screen for the `game`, and runs the functions from
is the atom storing the screen map behind the scenes, and returns the new screen is the atom storing the screen map behind the scenes, and returns the new screen
map map
(update! screen :renderer (stage)) (update! screen :renderer (stage))"
"
[{:keys [update-fn!]} & {:keys [] :as args}] [{:keys [update-fn!]} & {:keys [] :as args}]
(update-fn! args)) (update-fn! args))

View File

@@ -6,8 +6,7 @@
"Clears the screen with a uniform color, defaulting to black "Clears the screen with a uniform color, defaulting to black
(clear!) (clear!)
(clear! 0.5 0.5 1 1) (clear! 0.5 0.5 1 1)"
"
([] ([]
(clear! 0 0 0 0)) (clear! 0 0 0 0))
([r g b a] ([r g b a]
@@ -19,8 +18,7 @@
"Returns a [Color](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Color.html) "Returns a [Color](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/Color.html)
(color :white) (color :white)
(color 1 1 1 1) (color 1 1 1 1)"
"
[& args] [& args]
`~(if (keyword? (first args)) `~(if (keyword? (first args))
`(Color. ^Color (u/static-field-upper :graphics :Color ~(first args))) `(Color. ^Color (u/static-field-upper :graphics :Color ~(first args)))
@@ -31,56 +29,49 @@
(defmacro app! (defmacro app!
"Calls a single method on [Gdx.app](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Application.html) "Calls a single method on [Gdx.app](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Application.html)
(app! :error \"MYTAG\" \"An error occurred, so I'm logging it!\") (app! :error \"MYTAG\" \"An error occurred, so I'm logging it!\")"
"
[k & options] [k & options]
`(u/call! ^Application (Gdx/app) ~k ~@options)) `(u/call! ^Application (Gdx/app) ~k ~@options))
(defmacro audio! (defmacro audio!
"Calls a single method on [Gdx.audio](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Audio.html) "Calls a single method on [Gdx.audio](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Audio.html)
(audio! :new-audio-recorder 44100 false) (audio! :new-audio-recorder 44100 false)"
"
[k & options] [k & options]
`(u/call! ^Audio (Gdx/audio) ~k ~@options)) `(u/call! ^Audio (Gdx/audio) ~k ~@options))
(defmacro files! (defmacro files!
"Calls a single method on [Gdx.files](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Files.html) "Calls a single method on [Gdx.files](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Files.html)
(files! :internal \"image.png\") (files! :internal \"image.png\")"
"
[k & options] [k & options]
`(u/call! ^Files (Gdx/files) ~k ~@options)) `(u/call! ^Files (Gdx/files) ~k ~@options))
(defmacro gl! (defmacro gl!
"Calls a single method on [Gdx.gl20](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/GL20.html) "Calls a single method on [Gdx.gl20](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/GL20.html)
(gl! :gl-create-program) (gl! :gl-create-program)"
"
[k & options] [k & options]
`(u/call! ^GL20 (Gdx/gl20) ~k ~@options)) `(u/call! ^GL20 (Gdx/gl20) ~k ~@options))
(defmacro graphics! (defmacro graphics!
"Calls a single method on [Gdx.graphics](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Graphics.html) "Calls a single method on [Gdx.graphics](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Graphics.html)
(graphics! :is-fullscreen) (graphics! :is-fullscreen)"
"
[k & options] [k & options]
`(u/call! ^Graphics (Gdx/graphics) ~k ~@options)) `(u/call! ^Graphics (Gdx/graphics) ~k ~@options))
(defmacro input! (defmacro input!
"Calls a single method on [Gdx.input](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Input.html) "Calls a single method on [Gdx.input](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Input.html)
(input! :is-touched) (input! :is-touched)"
"
[k & options] [k & options]
`(u/call! ^Input (Gdx/input) ~k ~@options)) `(u/call! ^Input (Gdx/input) ~k ~@options))
(defmacro net! (defmacro net!
"Calls a single method on [Gdx.net](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Net.html) "Calls a single method on [Gdx.net](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Net.html)
(net! :open-uri \"https://nightcode.info/\") (net! :open-uri \"https://nightcode.info/\")"
"
[k & options] [k & options]
`(u/call! ^Net (Gdx/net) ~k ~@options)) `(u/call! ^Net (Gdx/net) ~k ~@options))
@@ -90,8 +81,7 @@
"Calls the global method cooresponding to `k` in a more Clojuresque way "Calls the global method cooresponding to `k` in a more Clojuresque way
(game :width) (game :width)
(game :is-touched?) (game :is-touched?)"
"
[k] [k]
(case k (case k
:width (graphics! :get-width) :width (graphics! :get-width)
@@ -107,8 +97,7 @@
"Returns the static field cooresponding to `k` from [Input.Keys](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Input.Keys.html) "Returns the static field cooresponding to `k` from [Input.Keys](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Input.Keys.html)
(key-code :a) (key-code :a)
(key-code :page-down) (key-code :page-down)"
"
[k] [k]
`~(symbol (str u/main-package ".Input$Keys/" (u/key->upper k)))) `~(symbol (str u/main-package ".Input$Keys/" (u/key->upper k))))
@@ -116,8 +105,7 @@
"Returns a boolean indicating if the key cooresponding to `k` is being pressed "Returns a boolean indicating if the key cooresponding to `k` is being pressed
(is-pressed? :a) (is-pressed? :a)
(is-pressed? :page-down) (is-pressed? :page-down)"
"
[k] [k]
`(input! :is-key-pressed (key-code ~k))) `(input! :is-key-pressed (key-code ~k)))

View File

@@ -19,8 +19,7 @@ macros that create the renderers will call this themselves)"
(defmacro tiled-map! (defmacro tiled-map!
"Calls a single method on a `tiled-map` "Calls a single method on a `tiled-map`
(tiled-map! screen :get-layers) (tiled-map! screen :get-layers)"
"
[screen k & options] [screen k & options]
`(let [^BatchTiledMapRenderer object# (u/get-obj ~screen :renderer)] `(let [^BatchTiledMapRenderer object# (u/get-obj ~screen :renderer)]
(u/call! ^TiledMap (.getMap object#) ~k ~@options))) (u/call! ^TiledMap (.getMap object#) ~k ~@options)))
@@ -29,8 +28,7 @@ macros that create the renderers will call this themselves)"
"Returns a list with [MapLayer](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/MapLayer.html) "Returns a list with [MapLayer](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/MapLayer.html)
objects cooresponding to each layer in the tiled map in `screen` objects cooresponding to each layer in the tiled map in `screen`
(tiled-map-layers screen) (tiled-map-layers screen)"
"
[screen] [screen]
(let [^BatchTiledMapRenderer renderer (u/get-obj screen :renderer) (let [^BatchTiledMapRenderer renderer (u/get-obj screen :renderer)
^MapLayers layers (-> renderer .getMap .getLayers)] ^MapLayers layers (-> renderer .getMap .getLayers)]
@@ -50,8 +48,7 @@ objects cooresponding to each layer in the tiled map in `screen`
"Returns a [TiledMapTileLayer](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/tiled/TiledMapTileLayer.html) "Returns a [TiledMapTileLayer](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/tiled/TiledMapTileLayer.html)
from the tiled map in `screen` that matches `layer` from the tiled map in `screen` that matches `layer`
(tiled-map-layer screen \"water\") (tiled-map-layer screen \"water\")"
"
[screen layer & options] [screen layer & options]
`(let [^TiledMapTileLayer object# (tiled-map-layer* ~screen ~layer)] `(let [^TiledMapTileLayer object# (tiled-map-layer* ~screen ~layer)]
(u/calls! object# ~@options))) (u/calls! object# ~@options)))
@@ -60,8 +57,7 @@ from the tiled map in `screen` that matches `layer`
"Calls a single method on a `tiled-map-layer` "Calls a single method on a `tiled-map-layer`
(tiled-map-layer! (tiled-map-layer screen \"water\") (tiled-map-layer! (tiled-map-layer screen \"water\")
:set-cell 0 0 nil) :set-cell 0 0 nil)"
"
[object k & options] [object k & options]
`(u/call! ^TiledMapTileLayer (cast TiledMapTileLayer ~object) ~k ~@options)) `(u/call! ^TiledMapTileLayer (cast TiledMapTileLayer ~object) ~k ~@options))
@@ -74,8 +70,7 @@ from the tiled map in `screen` that matches `layer`
"Returns a [TiledMapTileLayer.Cell](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/tiled/TiledMapTileLayer.Cell.html) "Returns a [TiledMapTileLayer.Cell](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/tiled/TiledMapTileLayer.Cell.html)
from the tiled map in `screen` from the given `layer` and position `x` and `y` from the tiled map in `screen` from the given `layer` and position `x` and `y`
(tiled-map-cell screen \"water\" 0 0) (tiled-map-cell screen \"water\" 0 0)"
"
[screen layer x y & options] [screen layer x y & options]
`(let [^TiledMapTileLayer$Cell object# (tiled-map-cell* ~screen ~layer ~x ~y)] `(let [^TiledMapTileLayer$Cell object# (tiled-map-cell* ~screen ~layer ~x ~y)]
(u/calls! object# ~@options))) (u/calls! object# ~@options)))
@@ -84,8 +79,7 @@ from the tiled map in `screen` from the given `layer` and position `x` and `y`
"Calls a single method on a `tiled-map-cell` "Calls a single method on a `tiled-map-cell`
(tiled-map-cell! (tiled-map-cell screen \"water\" 0 0) (tiled-map-cell! (tiled-map-cell screen \"water\" 0 0)
:set-rotation 90) :set-rotation 90)"
"
[object k & options] [object k & options]
`(u/call! ^TiledMapTileLayer$Cell ~object ~k ~@options)) `(u/call! ^TiledMapTileLayer$Cell ~object ~k ~@options))
@@ -100,8 +94,7 @@ from the tiled map in `screen` from the given `layer` and position `x` and `y`
"Returns an [OrthogonalTiledMapRenderer](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/tiled/renderers/OrthogonalTiledMapRenderer.html) "Returns an [OrthogonalTiledMapRenderer](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/tiled/renderers/OrthogonalTiledMapRenderer.html)
with the tiled map file at `path` and `unit` scale with the tiled map file at `path` and `unit` scale
(orthogonal-tiled-map \"level1.tmx\" (/ 1 8)) (orthogonal-tiled-map \"level1.tmx\" (/ 1 8))"
"
[path unit & options] [path unit & options]
`(u/calls! ^OrthogonalTiledMapRenderer (orthogonal-tiled-map* ~path ~unit) `(u/calls! ^OrthogonalTiledMapRenderer (orthogonal-tiled-map* ~path ~unit)
~@options)) ~@options))
@@ -121,8 +114,7 @@ with the tiled map file at `path` and `unit` scale
"Returns an [IsometricTiledMapRenderer](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/tiled/renderers/IsometricTiledMapRenderer.html) "Returns an [IsometricTiledMapRenderer](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/tiled/renderers/IsometricTiledMapRenderer.html)
with the tiled map file at `path` and `unit` scale with the tiled map file at `path` and `unit` scale
(isometric-tiled-map \"level1.tmx\" (/ 1 8)) (isometric-tiled-map \"level1.tmx\" (/ 1 8))"
"
[path unit & options] [path unit & options]
`(u/calls! ^IsometricTiledMapRenderer (isometric-tiled-map* ~path ~unit) `(u/calls! ^IsometricTiledMapRenderer (isometric-tiled-map* ~path ~unit)
~@options)) ~@options))
@@ -143,8 +135,7 @@ with the tiled map file at `path` and `unit` scale
"Returns an [IsometricStaggeredTiledMapRenderer](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/tiled/renderers/IsometricStaggeredTiledMapRenderer.html) "Returns an [IsometricStaggeredTiledMapRenderer](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/tiled/renderers/IsometricStaggeredTiledMapRenderer.html)
with the tiled map file at `path` and `unit` scale with the tiled map file at `path` and `unit` scale
(isometric-staggered-tiled-map \"level1.tmx\" (/ 1 8)) (isometric-staggered-tiled-map \"level1.tmx\" (/ 1 8))"
"
[path unit & options] [path unit & options]
`(u/calls! ^IsometricStaggeredTiledMapRenderer `(u/calls! ^IsometricStaggeredTiledMapRenderer
(isometric-staggered-tiled-map* ~path ~unit) (isometric-staggered-tiled-map* ~path ~unit)
@@ -166,8 +157,7 @@ with the tiled map file at `path` and `unit` scale
"Returns a [HexagonalTiledMapRenderer](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/tiled/renderers/HexagonalTiledMapRenderer.html) "Returns a [HexagonalTiledMapRenderer](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/tiled/renderers/HexagonalTiledMapRenderer.html)
with the tiled map file at `path` and `unit` scale with the tiled map file at `path` and `unit` scale
(hexagonal-tiled-map \"level1.tmx\" (/ 1 8)) (hexagonal-tiled-map \"level1.tmx\" (/ 1 8))"
"
[path unit & options] [path unit & options]
`(u/calls! ^HexagonalTiledMapRenderer (hexagonal-tiled-map* ~path ~unit) `(u/calls! ^HexagonalTiledMapRenderer (hexagonal-tiled-map* ~path ~unit)
~@options)) ~@options))
@@ -186,8 +176,7 @@ with the tiled map file at `path` and `unit` scale
(defmacro stage (defmacro stage
"Returns a [Stage](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/Stage.html) "Returns a [Stage](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/scenes/scene2d/Stage.html)
(stage) (stage)"
"
[& options] [& options]
`(u/calls! ^Stage (stage*) ~@options)) `(u/calls! ^Stage (stage*) ~@options))
@@ -243,8 +232,7 @@ with the tiled map file at `path` and `unit` scale
(defn draw! (defn draw!
"Draws the `entities` with the renderer from `screen` "Draws the `entities` with the renderer from `screen`
(draw! screen entities) (draw! screen entities)"
"
[{:keys [renderer] :as screen} entities] [{:keys [renderer] :as screen} entities]
(assert renderer) (assert renderer)
(let [^SpriteBatch batch (batch screen)] (let [^SpriteBatch batch (batch screen)]
@@ -272,8 +260,7 @@ with the tiled map file at `path` and `unit` scale
"Calls the renderer from `screen` and optionally draws and returns the "Calls the renderer from `screen` and optionally draws and returns the
`entities` `entities`
(render! screen entities) (render! screen entities)"
"
([{:keys [renderer] :as screen}] ([{:keys [renderer] :as screen}]
(cond (cond
(isa? (type renderer) BatchTiledMapRenderer) (isa? (type renderer) BatchTiledMapRenderer)
@@ -294,8 +281,7 @@ with the tiled map file at `path` and `unit` scale
(defmacro orthographic (defmacro orthographic
"Returns an [OrthographicCamera](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/OrthographicCamera.html) "Returns an [OrthographicCamera](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/OrthographicCamera.html)
(orthographic) (orthographic)"
"
[& options] [& options]
`(let [^OrthographicCamera object# (orthographic*)] `(let [^OrthographicCamera object# (orthographic*)]
(u/calls! object# ~@options))) (u/calls! object# ~@options)))
@@ -314,8 +300,7 @@ with the tiled map file at `path` and `unit` scale
(defmacro perspective (defmacro perspective
"Returns an [PerspectiveCamera](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/PerspectiveCamera.html) "Returns an [PerspectiveCamera](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/PerspectiveCamera.html)
(perspective) (perspective)"
"
[& options] [& options]
`(let [^PerspectiveCamera object# (perspective*)] `(let [^PerspectiveCamera object# (perspective*)]
(u/calls! object# ~@options))) (u/calls! object# ~@options)))
@@ -329,8 +314,7 @@ with the tiled map file at `path` and `unit` scale
(defn size! (defn size!
"Sets the size of the camera in `screen` "Sets the size of the camera in `screen`
(size! screen 480 360) (size! screen 480 360)"
"
[screen width height] [screen width height]
(let [^OrthographicCamera camera (u/get-obj screen :camera)] (let [^OrthographicCamera camera (u/get-obj screen :camera)]
(assert camera) (assert camera)
@@ -340,8 +324,7 @@ with the tiled map file at `path` and `unit` scale
"Sets the width of the camera in `screen`, adjusting the height so the ratio "Sets the width of the camera in `screen`, adjusting the height so the ratio
remains in tact remains in tact
(width! screen 480) (width! screen 480)"
"
[screen new-width] [screen new-width]
(size! screen new-width (* new-width (/ (game :height) (game :width))))) (size! screen new-width (* new-width (/ (game :height) (game :width)))))
@@ -349,8 +332,7 @@ remains in tact
"Sets the height of the camera in `screen`, adjusting the width so the ratio "Sets the height of the camera in `screen`, adjusting the width so the ratio
remains in tact remains in tact
(height! screen 360) (height! screen 360)"
"
[screen new-height] [screen new-height]
(size! screen (* new-height (/ (game :width) (game :height))) new-height)) (size! screen (* new-height (/ (game :width) (game :height))) new-height))

View File

@@ -7,8 +7,7 @@
"Returns a [BitmapFont](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/BitmapFont.html) "Returns a [BitmapFont](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/BitmapFont.html)
(bitmap-font) (bitmap-font)
(bitmap-font file-handle region) (bitmap-font file-handle region)"
"
[& options] [& options]
`(BitmapFont. ~@options)) `(BitmapFont. ~@options))
@@ -31,8 +30,7 @@
(texture \"image.png\" :flip true false) (texture \"image.png\" :flip true false)
(texture \"image.png\" (texture \"image.png\"
:flip true false :flip true false
:set-region 0 0 100 100) :set-region 0 0 100 100)"
"
[arg & options] [arg & options]
`(let [entity# (texture* ~arg)] `(let [entity# (texture* ~arg)]
(u/calls! ^TextureRegion (u/get-obj entity# :object) ~@options) (u/calls! ^TextureRegion (u/get-obj entity# :object) ~@options)
@@ -42,8 +40,7 @@
"Calls a single method on a `texture` "Calls a single method on a `texture`
(texture! entity :flip true false) (texture! entity :flip true false)
(texture! entity :get-region-width) (texture! entity :get-region-width)"
"
[entity k & options] [entity k & options]
`(u/call! ^TextureRegion (u/get-obj ~entity :object) ~k ~@options)) `(u/call! ^TextureRegion (u/get-obj ~entity :object) ~k ~@options))
@@ -55,8 +52,7 @@
(play-mode :loop-random) (play-mode :loop-random)
(play-mode :loop-reversed) (play-mode :loop-reversed)
(play-mode :normal) (play-mode :normal)
(play-mode :reversed) (play-mode :reversed)"
"
[key] [key]
`(u/static-field-upper :graphics :g2d :Animation ~key)) `(u/static-field-upper :graphics :g2d :Animation ~key))
@@ -72,16 +68,14 @@
(animation 0.2 (animation 0.2
[walk-1 walk-2 walk-3] [walk-1 walk-2 walk-3]
:set-play-mode (play-mode :loop-pingpong)) :set-play-mode (play-mode :loop-pingpong))"
"
[duration textures & options] [duration textures & options]
`(u/calls! ^Animation (animation* ~duration ~textures) ~@options)) `(u/calls! ^Animation (animation* ~duration ~textures) ~@options))
(defmacro animation! (defmacro animation!
"Calls a single method on an `animation` "Calls a single method on an `animation`
(animation! object :set-play-mode (play-mode :loop)) (animation! object :set-play-mode (play-mode :loop))"
"
[object k & options] [object k & options]
`(u/call! ^Animation ~object ~k ~@options)) `(u/call! ^Animation ~object ~k ~@options))
@@ -89,8 +83,7 @@
"Returns a `texture` entity with a frame from `animation` based on the total "Returns a `texture` entity with a frame from `animation` based on the total
time the `screen` has been showing time the `screen` has been showing
(animation->texture screen anim) (animation->texture screen anim)"
"
([{:keys [total-time]} ^Animation animation] ([{:keys [total-time]} ^Animation animation]
(texture* (.getKeyFrame animation total-time true))) (texture* (.getKeyFrame animation total-time true)))
([{:keys [total-time]} ^Animation animation is-looping?] ([{:keys [total-time]} ^Animation animation is-looping?]

View File

@@ -19,8 +19,7 @@
(defmacro box-2d (defmacro box-2d
"Returns a [World](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/World.html) "Returns a [World](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/World.html)
(box-2d 0 0) (box-2d 0 0)"
"
[gravity-x gravity-y & options] [gravity-x gravity-y & options]
`(let [^World object# (box-2d* ~gravity-x ~gravity-y)] `(let [^World object# (box-2d* ~gravity-x ~gravity-y)]
(u/calls! object# ~@options))) (u/calls! object# ~@options)))
@@ -42,8 +41,7 @@
(defmacro body-def (defmacro body-def
"Returns a [BodyDef](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/BodyDef.html) "Returns a [BodyDef](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/BodyDef.html)
(body-def :dynamic) (body-def :dynamic)"
"
[k & options] [k & options]
`(let [^BodyDef object# (BodyDef.)] `(let [^BodyDef object# (BodyDef.)]
(set! (. object# type) ~(body-type k)) (set! (. object# type) ~(body-type k))
@@ -113,8 +111,7 @@
(defmacro joint-def (defmacro joint-def
"Returns a [JointDef](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/JointDef.html) "Returns a [JointDef](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/physics/box2d/JointDef.html)
(joint-def :rope) (joint-def :rope)"
"
[k & options] [k & options]
`(let [object# (~(joint-init k))] `(let [object# (~(joint-init k))]
(u/fields! object# ~@options))) (u/fields! object# ~@options)))