diff options
author | David Thompson <dthompson@vistahigherlearning.com> | 2019-06-04 20:49:16 -0400 |
---|---|---|
committer | David Thompson <dthompson@vistahigherlearning.com> | 2019-06-04 20:49:16 -0400 |
commit | 279f17ac0e1b3d019c2b294098e834d249376686 (patch) | |
tree | 47be849d3b35635d167e00cd8448815a75167a23 /manuals/chickadee/Grid.html | |
parent | 7b808b9268ec735a7a176d10bf1887b3fa66d13e (diff) |
Update chickadee manual.
Diffstat (limited to 'manuals/chickadee/Grid.html')
-rw-r--r-- | manuals/chickadee/Grid.html | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/manuals/chickadee/Grid.html b/manuals/chickadee/Grid.html index f6e1cbf..1b578ac 100644 --- a/manuals/chickadee/Grid.html +++ b/manuals/chickadee/Grid.html @@ -1,6 +1,6 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> -<!-- Copyright (C) 2017 David Thompson davet@gnu.org +<!-- Copyright (C) 2017, 2018, 2019 David Thompson davet@gnu.org Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 @@ -13,6 +13,8 @@ A copy of the license is also available from the Free Software Foundation Web site at http://www.gnu.org/licenses/fdl.html. +* Chickadee: (chickadee). Game programming toolkit for Guile. + The document was typeset with http://www.texinfo.org/ (GNU Texinfo). --> @@ -130,42 +132,42 @@ this filtering technique, a game can resolve collisions between different objects in different ways. </p> <dl> -<dt><a name="index-make_002dgrid"></a>Procedure: <strong>make-grid</strong> <em>[<var>cell-size</var> 64]</em></dt> +<dt><a name="index-make_002dgrid"></a>Procedure: <strong>make-grid</strong> <em>[cell-size 64]</em></dt> <dd><p>Return a new grid partitioned into <var>cell-size</var> tiles. </p></dd></dl> <dl> -<dt><a name="index-grid_003f"></a>Procedure: <strong>grid?</strong> <em><var>obj</var></em></dt> +<dt><a name="index-grid_003f"></a>Procedure: <strong>grid?</strong> <em>obj</em></dt> <dd><p>Return <code>#t</code> if <var>obj</var> is a grid. </p></dd></dl> <dl> -<dt><a name="index-cell_003f"></a>Procedure: <strong>cell?</strong> <em><var>obj</var></em></dt> +<dt><a name="index-cell_003f"></a>Procedure: <strong>cell?</strong> <em>obj</em></dt> <dd><p>Return <code>#t</code> if <var>obj</var> is a grid cell. </p></dd></dl> <dl> -<dt><a name="index-cell_002dcount"></a>Procedure: <strong>cell-count</strong> <em><var>cell</var></em></dt> +<dt><a name="index-cell_002dcount"></a>Procedure: <strong>cell-count</strong> <em>cell</em></dt> <dd><p>Return the number of items in <var>cell</var>. </p></dd></dl> <dl> -<dt><a name="index-grid_002dcell_002dsize"></a>Procedure: <strong>grid-cell-size</strong> <em><var>grid</var></em></dt> +<dt><a name="index-grid_002dcell_002dsize"></a>Procedure: <strong>grid-cell-size</strong> <em>grid</em></dt> <dd><p>Return the cell size of <var>grid</var>. </p></dd></dl> <dl> -<dt><a name="index-grid_002dcell_002dcount"></a>Procedure: <strong>grid-cell-count</strong> <em><var>grid</var></em></dt> +<dt><a name="index-grid_002dcell_002dcount"></a>Procedure: <strong>grid-cell-count</strong> <em>grid</em></dt> <dd><p>Return the number of cells currently in <var>grid</var>. </p></dd></dl> <dl> -<dt><a name="index-grid_002ditem_002dcount"></a>Procedure: <strong>grid-item-count</strong> <em><var>grid</var></em></dt> +<dt><a name="index-grid_002ditem_002dcount"></a>Procedure: <strong>grid-item-count</strong> <em>grid</em></dt> <dd><p>Return the number of items in <var>grid</var>. </p></dd></dl> <dl> -<dt><a name="index-grid_002dadd"></a>Procedure: <strong>grid-add</strong> <em><var>grid</var> <var>item</var> <var>x</var> <var>y</var> <var>width</var> <var>height</var></em></dt> +<dt><a name="index-grid_002dadd"></a>Procedure: <strong>grid-add</strong> <em>grid item x y width height</em></dt> <dd> <p>Add <var>item</var> to <var>grid</var> represented by the axis-aligned bounding box whose lower-left corner is at (<var>x</var>, <var>y</var>) and is @@ -173,17 +175,17 @@ box whose lower-left corner is at (<var>x</var>, <var>y</var>) and is </p></dd></dl> <dl> -<dt><a name="index-grid_002dremove"></a>Procedure: <strong>grid-remove</strong> <em><var>grid</var> <var>item</var></em></dt> +<dt><a name="index-grid_002dremove"></a>Procedure: <strong>grid-remove</strong> <em>grid item</em></dt> <dd><p>Return <var>item</var> from <var>grid</var>. </p></dd></dl> <dl> -<dt><a name="index-grid_002dclear"></a>Procedure: <strong>grid-clear</strong> <em><var>grid</var></em></dt> +<dt><a name="index-grid_002dclear"></a>Procedure: <strong>grid-clear</strong> <em>grid</em></dt> <dd><p>Remove all items from <var>grid</var>. </p></dd></dl> <dl> -<dt><a name="index-grid_002dmove"></a>Procedure: <strong>grid-move</strong> <em><var>grid</var> <var>item</var> <var>position</var> <var>filter</var></em></dt> +<dt><a name="index-grid_002dmove"></a>Procedure: <strong>grid-move</strong> <em>grid item position filter</em></dt> <dd><p>Attempt to move <var>item</var> in <var>grid</var> to <var>position</var> (a 2D vector) and check for collisions. For each collision, <var>filter</var> will be called with two arguments: <var>item</var> and the item it collided @@ -192,18 +194,18 @@ resolve the colliding objects. </p></dd></dl> <dl> -<dt><a name="index-for_002deach_002dcell"></a>Procedure: <strong>for-each-cell</strong> <em><var>proc</var> <var>grid</var> [<var>rect</var>]</em></dt> +<dt><a name="index-for_002deach_002dcell"></a>Procedure: <strong>for-each-cell</strong> <em>proc grid [rect]</em></dt> <dd><p>Call <var>proc</var> with each cell in <var>grid</var> that intersects <var>rect</var>, or every cell if <var>rect</var> is <code>#f</code>. </p></dd></dl> <dl> -<dt><a name="index-for_002deach_002ditem"></a>Procedure: <strong>for-each-item</strong> <em><var>proc</var> <var>grid</var></em></dt> +<dt><a name="index-for_002deach_002ditem"></a>Procedure: <strong>for-each-item</strong> <em>proc grid</em></dt> <dd><p>Call <var>proc</var> for each item in <var>grid</var>. </p></dd></dl> <dl> -<dt><a name="index-slide"></a>Procedure: <strong>slide</strong> <em><var>item</var> <var>item-rect</var> <var>other</var> <var>other-rect</var> <var>goal</var></em></dt> +<dt><a name="index-slide"></a>Procedure: <strong>slide</strong> <em>item item-rect other other-rect goal</em></dt> <dd> <p>Resolve the collision that occurs between <var>item</var> and <var>other</var> when moving <var>item-rect</var> to <var>goal</var> by sliding <var>item-rect</var> |