From 279f17ac0e1b3d019c2b294098e834d249376686 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 4 Jun 2019 20:49:16 -0400 Subject: Update chickadee manual. --- manuals/chickadee/Tile-Maps.html | 254 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 250 insertions(+), 4 deletions(-) (limited to 'manuals/chickadee/Tile-Maps.html') diff --git a/manuals/chickadee/Tile-Maps.html b/manuals/chickadee/Tile-Maps.html index cdf4f6e..473d720 100644 --- a/manuals/chickadee/Tile-Maps.html +++ b/manuals/chickadee/Tile-Maps.html @@ -1,6 +1,6 @@ - @@ -94,7 +96,7 @@ Next: -

2.3.4 Tile Maps

+

2.3.3 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 @@ -103,13 +105,64 @@ support for loading and rendering Tiled maps in the (chickadee render tiled) module.

-
Procedure: load-tile-map file-name
+
Procedure: load-tile-map file-name

Load the Tiled formatted map in file-name and return a new tile map object.

-
Procedure: draw-tile-map tile-map [#:layers] [#:region] [#:origin] [#:position] [#:scale] [#:rotation]
+
Procedure: tile-map? obj
+

Return #t if obj is a tile map. +

+ +
+
Procedure: tile-map-orientation tile-map
+

Return the orientation of tile-map. +

+ +
+
Procedure: tile-map-width tile-map
+

Return the width of tile-map in tiles. +

+ +
+
Procedure: tile-map-height tile-map
+

Return the height of tile-map in tiles. +

+ +
+
Procedure: tile-map-tile-width tile-map
+

Return the width of tiles in tile-map. +

+ +
+
Procedure: tile-map-tile-height tile-map
+

Return the height of tiles in tile-map. +

+ +
+
Procedure: tile-map-tilesets tile-map
+

Return the tilesets for tile-map. +

+ +
+
Procedure: tile-map-layers tile-map
+

Return the layers of tile-map. +

+ +
+
Procedure: tile-map-properties tile-map
+

Return the custom properties of tile-map. +

+ +
+
Procedure: point->tile tile-map x y
+

Translate the pixel coordinates (x, y) into tile +coordinates. +

+ +
+
Procedure: draw-tile-map tile-map [#:layers] [#:region] [#:origin] [#:position] [#:scale] [#:rotation]

Draw the layers of tile-map. By default, all layers are drawn. To draw a subset of the available layers, pass a list of layer ids @@ -119,6 +172,199 @@ using the layers keyword argument. the other arguments.

+ +

2.3.3.1 Tilesets

+ +
+
Procedure: tileset? obj
+

Return #t if obj is a tileset. +

+ +
+
Procedure: tileset-name tileset
+

Return the name of tileset. +

+ +
+
Procedure: tileset-first-gid tileset
+

Return the starting GID of tileset. +

+ +
+
Procedure: tileset-size tileset
+

Return the number of tiles in tileset. +

+ +
+
Procedure: tileset-tile-width tileset
+

Return the width of tiles in tileset. +

+ +
+
Procedure: tileset-tile-height tileset
+

Return the height of tiles in tileset. +

+ +
+
Procedure: tileset-atlas tileset
+

Return the texture atlas for tileset. +

+ +
+
Procedure: tileset-tiles tileset
+

Return the tiles in tileset. +

+ +
+
Procedure: tileset-properties tileset
+

Return the custom properties of tileset. +

+ + +

2.3.3.2 Tiles

+ +
+
Procedure: tile? obj
+

Return #t if obj is a tile. +

+ +
+
Procedure: tile-id tile
+

Return the ID of tile. +

+ +
+
Procedure: tile-animation tile
+

Return the animation for tile. +

+ +
+
Procedure: tile-properties tile
+

Return the custom properties of tile. +

+ + +

2.3.3.3 Animations

+ +
+
Procedure: animation-frame? obj
+

Return #t if obj is an animation frame. +

+ +
+
Procedure: animation-frame-tile frame
+

Return the tile for frame. +

+ +
+
Procedure: animation-frame-duration frame
+

Return the duration of frame. +

+ + +

2.3.3.4 Layers

+ +
+
Procedure: tile-layer? obj
+

Return #t if obj is a tile layer. +

+ +
+
Procedure: tile-layer-name layer
+

Return the name of layer. +

+ +
+
Procedure: tile-layer-width layer
+

Return the width in tiles of layer. +

+ +
+
Procedure: tile-layer-height layer
+

Return the height in tiles of layer. +

+ +
+
Procedure: tile-layer-tiles layer
+

Return the tile data for layer. +

+ +
+
Procedure: tile-layer-properties layer
+

Return the custom properties of layer. +

+ +
+
Procedure: object-layer? obj
+

Return #t if obj is an object layer. +

+ +
+
Procedure: object-layer-name layer
+

Return the name of layer. +

+ +
+
Procedure: object-layer-objects layer
+

Return the objects for layer. +

+ +
+
Procedure: object-layer-properties layer
+

Return the custom properties of layer. +

+ + +

2.3.3.5 Objects

+ +
+
Procedure: map-object? obj
+

Return #t if obj is a map object. +

+ +
+
Procedure: map-object-id obj
+

Return the ID of obj. +

+ +
+
Procedure: map-object-name obj
+

Return the name of obj. +

+ +
+
Procedure: map-object-type obj
+

Return the type of obj. +

+ +
+
Procedure: map-object-shape obj
+

Return the shape of obj. +

+ +
+
Procedure: map-object-properties obj
+

Return the custom properties of obj. +

+ + +

2.3.3.6 Polygons

+ +
+
Procedure: polygon? obj
+

Return #t if obj is a polygon. +

+ +
+
Procedure: polygon-points polygon
+

Return the list of points that form polygon. +

+ +
+
+

+Next: , Previous: , Up: Graphics   [Contents][Index]

+
-- cgit v1.2.3