summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/api.texi26
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/api.texi b/doc/api.texi
index e2864a5..82cde8f 100644
--- a/doc/api.texi
+++ b/doc/api.texi
@@ -551,6 +551,7 @@ blocks to implement additional rendering techniques.
* Rendering Engine:: Rendering state management.
* Textures:: 2D images.
* Sprites:: Draw 2D images.
+* Tile Maps:: Draw 2D tile maps.
* Lines and Shapes:: Draw line segments and polygons.
* Fonts:: Drawing text.
* Blending and Depth Testing:: Control how pixels are combined.
@@ -773,6 +774,31 @@ Refer to @code{draw-sprite} (@pxref{Sprites}) for information about
the other arguments.
@end deffn
+@node Tile Maps
+@subsection Tile Maps
+
+A tile map is a scene created by composing lots of small sprites,
+called ``tiles'', into a larger image. One program for editing such
+maps is called @url{http://mapeditor.org,Tiled}. Chickadee has native
+support for loading and rendering Tiled maps in the @code{(chickadee
+render tiled)} module.
+
+@deffn {Procedure} load-tile-map @var{file-name}
+Load the Tiled formatted map in @var{file-name} and return a new tile
+map object.
+@end deffn
+
+@deffn {Procedure} draw-tile-map @var{tile-map} [#:layers] [#:region] @
+ [#:origin] [#:position] [#:scale] [#:rotation]
+
+Draw the layers of @var{tile-map}. By default, all layers are drawn.
+To draw a subset of the available layers, pass a list of layer ids
+using the @var{layers} keyword argument.
+
+Refer to @code{draw-sprite} (@pxref{Sprites}) for information about
+the other arguments.
+@end deffn
+
@node Lines and Shapes
@subsection Lines and Shapes