From 0a2d0f9d508e71f30668b3cfaf8179fbb7cc7e56 Mon Sep 17 00:00:00 2001 From: oakes Date: Fri, 11 Apr 2014 14:00:59 -0400 Subject: [PATCH] Move function and improve docstring --- src/play_clj/core_graphics.clj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/play_clj/core_graphics.clj b/src/play_clj/core_graphics.clj index ca7b6d9..1133e11 100644 --- a/src/play_clj/core_graphics.clj +++ b/src/play_clj/core_graphics.clj @@ -156,17 +156,10 @@ in the tiled map in `screen`. `(let [^MapLayers object# (map-layers* ~screen)] (u/calls! object# ~@options))) -(defn map-layer-names - "Returns a list with strings cooresponding to the name of each layer in the -tiled map in `screen`." - [screen] - (for [^MapLayer layer (map-layers screen)] - (.getName layer))) - (defmacro map-layers! "Calls a single method on a `map-layers`. - (map-layers! screen :remove (map-layer screen \"objects\"))" + (map-layers! object :remove (map-layer screen \"objects\"))" [object k & options] `(u/call! ^MapLayers ~object ~k ~@options)) @@ -194,6 +187,13 @@ non-tile layers, like object and image layers. [object k & options] `(u/call! ^MapLayer ~object ~k ~@options)) +(defn map-layer-names + "Returns a list with strings cooresponding to the name of each layer in the +tiled map in `screen`." + [screen] + (for [^MapLayer layer (map-layers screen)] + (.getName layer))) + (defn map-objects* ([] (MapObjects.))