summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2018-01-28 10:34:14 -0500
committerDavid Thompson <dthompson2@worcester.edu>2018-01-29 22:30:34 -0500
commit9c99fc7d12a5c90555b649ed845ab28d6a1b174c (patch)
tree48617436247b472f4d84bb6c6756bc4f5ffa5b59 /doc
parent4649420f53b50a0feb89960e9dbb864364b7aaaf (diff)
render: Add Tiled map renderer.
* chickadee/render/tiled.scm: New file. * Makefile.am (SOURCES): Add it. * doc/api.texi (Tile Maps): New subsection.
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