summaryrefslogtreecommitdiff
path: root/manuals/chickadee/Sprites.html
diff options
context:
space:
mode:
Diffstat (limited to 'manuals/chickadee/Sprites.html')
-rw-r--r--manuals/chickadee/Sprites.html46
1 files changed, 19 insertions, 27 deletions
diff --git a/manuals/chickadee/Sprites.html b/manuals/chickadee/Sprites.html
index a0e308b..10a9506 100644
--- a/manuals/chickadee/Sprites.html
+++ b/manuals/chickadee/Sprites.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, 2018, 2019 David Thompson davet@gnu.org
+<!-- Copyright (C) 2017-2020 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
@@ -18,7 +18,7 @@ Foundation Web site at http://www.gnu.org/licenses/fdl.html.
The document was typeset with
http://www.texinfo.org/ (GNU Texinfo).
-->
-<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
+<!-- Created by GNU Texinfo 6.6, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Sprites (The Chickadee Game Toolkit)</title>
@@ -38,23 +38,14 @@ http://www.texinfo.org/ (GNU Texinfo).
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
-blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
-blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
-div.smalldisplay {margin-left: 3.2em}
-div.smallexample {margin-left: 3.2em}
-div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
-pre.smalldisplay {font-family: inherit; font-size: smaller}
-pre.smallexample {font-size: smaller}
-pre.smallformat {font-family: inherit; font-size: smaller}
-pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
@@ -89,24 +80,25 @@ ul.no-bullet {list-style: none}
</head>
<body lang="en">
-<a name="Sprites"></a>
-<div class="header">
+<span id="Sprites"></span><div class="header">
<p>
Next: <a href="Tile-Maps.html#Tile-Maps" accesskey="n" rel="next">Tile Maps</a>, Previous: <a href="Textures.html#Textures" accesskey="p" rel="prev">Textures</a>, Up: <a href="Graphics.html#Graphics" accesskey="u" rel="up">Graphics</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html#Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
-<a name="Sprites-1"></a>
-<h4 class="subsection">2.3.2 Sprites</h4>
+<span id="Sprites-1"></span><h4 class="subsection">2.3.3 Sprites</h4>
<p>For those who are new to this game, a sprite is a 2D rectangular
bitmap that is rendered to the screen. For 2D games, sprites are the
most essential graphical abstraction. They are used for drawing maps,
-players, NPCs, items, particles, text, etc. In Chickadee, bitmaps are
-stored in textures (see <a href="Textures.html#Textures">Textures</a>) and can be used to draw sprites
-via the <code>draw-sprite</code> procedure.
+players, NPCs, items, particles, text, etc.
+</p>
+<p>In Chickadee, the <code>(chickadee render sprite)</code> module provides the
+interface for working with sprites. Bitmaps are stored in textures
+(see <a href="Textures.html#Textures">Textures</a>) and can be used to draw sprites via the
+<code>draw-sprite</code> procedure.
</p>
<dl>
-<dt><a name="index-draw_002dsprite"></a>Procedure: <strong>draw-sprite</strong> <em>texture position [#:tint white] [#:origin] [#:scale] [#:rotation] [#:blend-mode alpha] [#:rect]</em></dt>
+<dt id="index-draw_002dsprite">Procedure: <strong>draw-sprite</strong> <em>texture position [#:tint white] [#:origin] [#:scale] [#:rotation] [#:blend-mode alpha] [#:rect]</em></dt>
<dd>
<p>Draw <var>texture</var> at <var>position</var>.
</p>
@@ -143,29 +135,29 @@ into a single image file and create a &ldquo;texture atlas&rdquo;
(see <a href="Textures.html#Textures">Textures</a>) to access the sub-images within.
</p>
<dl>
-<dt><a name="index-make_002dsprite_002dbatch"></a>Procedure: <strong>make-sprite-batch</strong> <em>texture [#:capacity 256]</em></dt>
+<dt id="index-make_002dsprite_002dbatch">Procedure: <strong>make-sprite-batch</strong> <em>texture [#:capacity 256]</em></dt>
<dd><p>Create a new sprite batch for <var>texture</var> with initial space for
<var>capacity</var> sprites. Sprite batches automatically resize when they
are full to accomodate as many sprites as necessary.
</p></dd></dl>
<dl>
-<dt><a name="index-sprite_002dbatch_003f"></a>Procedure: <strong>sprite-batch?</strong> <em>obj</em></dt>
+<dt id="index-sprite_002dbatch_003f">Procedure: <strong>sprite-batch?</strong> <em>obj</em></dt>
<dd><p>Return <code>#t</code> if <var>obj</var> is a sprite batch.
</p></dd></dl>
<dl>
-<dt><a name="index-sprite_002dbatch_002dtexture"></a>Procedure: <strong>sprite-batch-texture</strong> <em>batch</em></dt>
+<dt id="index-sprite_002dbatch_002dtexture">Procedure: <strong>sprite-batch-texture</strong> <em>batch</em></dt>
<dd><p>Return the texture for <var>batch</var>.
</p></dd></dl>
<dl>
-<dt><a name="index-set_002dsprite_002dbatch_002dtexture_0021"></a>Procedure: <strong>set-sprite-batch-texture!</strong> <em>batch texture</em></dt>
+<dt id="index-set_002dsprite_002dbatch_002dtexture_0021">Procedure: <strong>set-sprite-batch-texture!</strong> <em>batch texture</em></dt>
<dd><p>Set texture for <var>batch</var> to <var>texture</var>.
</p></dd></dl>
<dl>
-<dt><a name="index-sprite_002dbatch_002dadd_0021"></a>Procedure: <strong>sprite-batch-add!</strong> <em>batch position [#:origin] [#:scale] [:rotation] [#:tint <code>white</code>] [#:texture-region]</em></dt>
+<dt id="index-sprite_002dbatch_002dadd_0021">Procedure: <strong>sprite-batch-add!</strong> <em>batch position [#:origin] [#:scale] [:rotation] [#:tint <code>white</code>] [#:texture-region]</em></dt>
<dd>
<p>Add sprite located at <var>position</var> to <var>batch</var>.
</p>
@@ -176,12 +168,12 @@ parent is the batch texture may be specified as <var>texture-region</var>.
</p></dd></dl>
<dl>
-<dt><a name="index-sprite_002dbatch_002dclear_0021"></a>Procedure: <strong>sprite-batch-clear!</strong> <em>batch</em></dt>
+<dt id="index-sprite_002dbatch_002dclear_0021">Procedure: <strong>sprite-batch-clear!</strong> <em>batch</em></dt>
<dd><p>Reset size of <var>batch</var> to 0.
</p></dd></dl>
<dl>
-<dt><a name="index-draw_002dsprite_002dbatch"></a>Procedure: <strong>draw-sprite-batch</strong> <em>batch [#:blend-mode <code>alpha</code>]</em></dt>
+<dt id="index-draw_002dsprite_002dbatch">Procedure: <strong>draw-sprite-batch</strong> <em>batch [#:blend-mode <code>alpha</code>]</em></dt>
<dd><p>Render <var>batch</var> using <var>blend-mode</var>. Alpha blending is used by
default.
</p></dd></dl>
@@ -210,7 +202,7 @@ patch, they can be rendered at any size without unappealing scaling
artifacts.
</p>
<dl>
-<dt><a name="index-draw_002dnine_002dpatch"></a>Procedure: <strong>draw-nine-patch</strong> <em>texture rect [#:margin 0] [#:top-margin margin] [#:bottom-margin margin] [#:left-margin margin] [#:right-margin margin] [#:origin] [#:scale] [#:rotation] [#:blend-mode alpha] [#:tint white]</em></dt>
+<dt id="index-draw_002dnine_002dpatch">Procedure: <strong>draw-nine-patch</strong> <em>texture rect [#:margin 0] [#:top-margin margin] [#:bottom-margin margin] [#:left-margin margin] [#:right-margin margin] [#:origin] [#:scale] [#:rotation] [#:blend-mode alpha] [#:tint white]</em></dt>
<dd>
<p>Draw a nine patch sprite. A nine patch sprite renders <var>texture</var>
as a <var>width</var> x <var>height</var> rectangle whose stretchable areas are