<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=iso-8859-1" />
<title>LISPBUILDER-SDL - </title>
<style type="text/css">
body {
margin: 10px 20px 20px 220px;
padding: 0px;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: small;
text-align: justify;
max-width: 50em;
background-color: white;
}
a, a:visited {
text-decoration: none;
color: maroon;
}
/* index */
div.index {
position: fixed;
top: 0px;
left: 0px;
width: 180px;
height: 100%;
margin: 0px;
padding: 5px;
font-size: 12px;
background-color: #DCDCDC;
border-right: thin black solid;
}
div.index ol {
color: navy;
margin: 0px;
padding-left: 0px;
}
div.index ol li {
list-style: none;
}
div.index ol li:before {
display: marker;
content: counter(heading1) ". ";
counter-increment: heading1;
}
div.index ol ol {
padding-left: 10px;
font-size: 10px;
list-style: none;
counter-reset: heading2;
}
div.index ol ol li:before {
display: marker;
content: counter(heading1)"." counter(heading2)" ";
counter-increment: heading2;
}
/* heading styles */
body > h1 {
margin-top: 0px;
}
h1 {
margin-top: 40px;
margin-bottom: 0px;
color: #4682B4;
}
h1:before {
display: marker;
content: counter(chapter) ". ";
counter-increment: chapter;
counter-reset: section1;
}
h1 + p {
margin-top: 5px;
}
h2 {
margin-top: 20px;
color: #000000;
margin-bottom: 0px;
}
h2:before {
display: marker;
content: counter(chapter) "." counter(section1) " ";
counter-increment: section1;
}
h2 + p {
margin-top: 0px;
}
h3 {
margin-top: 20px;
color: #000000;
margin-bottom: 0px;
}
h3:before {
display: marker;
content: counter(chapter) "." counter(section1) "." counter(section2) " ";
counter-increment: section2;
}
h3 + p {
margin-top: 0px;
}
h4 {
margin-top: 20px;
color: #000000;
margin-bottom: 0px;
}
h4:before {
display: marker;
content: counter(chapter) "." counter(section1) "." counter(section2) "." counter(section3) " ";
counter-increment: section3;
}
h4 + p {
margin-top: 0px;
}
/* generated content for images and tables */
img:after {
content: "[" counter(image) "] " attr(title);
counter-increment: image;
display: block;
font-size: 10px;
font-weight: bold;
margin-top: 5px;
margin-bottom: 20px;
color: black;
}
table:after {
content: "Table " counter(table) ": " attr(summary);
counter-increment: table;
display: table-caption;
caption-side: bottom;
font-size: 10px;
font-weight: bold;
margin-top: 5px;
margin-bottom: 20px;
white-space: nowrap;
color: black;
}
/* code for examples, code and pathnames*/
div.example table {
color: black;
}
div.example, div.code, div.path, div.sequence {
margin: 10px 0px;
border: 1px black solid;
padding: 10px;
background-color: #F4F4F4;
counter-reset: image;
color: maroon;
}
div.example:before {
content: "Example " counter(example);
counter-increment: example;
display: block;
}
div.example + p {
margin-bottom: 0px;
}
div.code:before {
content: "Code";
}
div.path:before {
content: "Path";
}
div.sequence:before {
content: "Sequence";
}
p.reference:before {
display: marker;
content: "[" counter(reference) "]";
counter-increment: reference;
font-weight: bold;
margin-right: 5px;
}
div.code:before, div.example:before, div.path:before, div.sequence:before {
font-weight: bold;
font-size: 15px;
margin-bottom: 20px;
color: black;
}
pre {
color: Green;
margin: 0px;
padding: 0px;
}
/* equation counter */
e:after {
content: "[" counter(equation) "]";
counter-increment: equation;
display: block;
float: right;
margin-right: 10px;
}
/* to prevent the CC image from being numbered */
img[alt="Creative Commons License"] {
display: inline;
}
img[alt="Creative Commons License"]:after {
display: none;
}
div#cc {
background-color: #DCDCDC;
border: thin black solid;
padding: 10px;
font-size: 10px;
}
/* Table Design */
/* http://www.duoh.com/csstutorials/csstables/ */
#mytable {
width: 700px;
padding: 0;
margin: 0;
}
caption {
padding: 0 0 5px 0;
width: 700px;
font: italic 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
text-align: right;
}
th {
font: bold 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #4f6b72;
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
border-top: 1px solid #C1DAD7;
letter-spacing: 2px;
text-transform: uppercase;
text-align: left;
padding: 6px 6px 6px 12px;
background: #CAE8EA url(images/bg_header.jpg) no-repeat;
}
th.nobg {
border-top: 0;
border-left: 0;
border-right: 1px solid #C1DAD7;
background: none;
}
td {
border-right: 1px solid #C1DAD7;
border-bottom: 1px solid #C1DAD7;
background: #fff;
padding: 6px 6px 6px 12px;
color: #4f6b72;
}
td.alt {
background: #F5FAFA;
color: #797268;
}
th.spec {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #fff url(images/bullet1.gif) no-repeat;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}
th.specalt {
border-left: 1px solid #C1DAD7;
border-top: 0;
background: #f5fafa url(images/bullet2.gif) no-repeat;
font: bold 10px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
color: #797268;
}
</style>
</head>
<!--
(CC) 2003 Luke Crook. Some Rights Reserved.
http://creativecommons.org/licenses/by/1.0
This page is licensed under a Creative Commons License.
Maintained by the Common Lisp Application Builder project at www.lispbuilder.org
The entire styleguide was copied wholesale from http://www.markschenk.com/cssexp/publication/article.xml
(CC) 2003 Mark Schenk. Some Rights Reserved.
http://creativecommons.org/licenses/by/1.0
This page is licensed under a Creative Commons License.
-->
<BODY BGCOLOR=#FFFFFF >
<h1><a name="top" class=none> LISPBUILDER-SDL - </a></h1>
<blockquote>
<br> </br><h2><a name=abstract class=abstract>Abstract</a></h2>
<p>
LISPBUILDER-SDL comprises several of packages that allow game development using Common Lisp.
LISPBUILDER-SDL provides a set of bindings and Lispy abstractions for
<a href="http://www.libsdl.org">SDL</a> and other graphics, sound, physics, character animation
and 3D libraries. LISPBUILDER-SDL core functionality includes
window and event management, 2D graphics, 3D graphics using OpenGL and sound support.
The goal for the LISPBUILDER-SDL project is to become a useful resource for the development of games in Lisp.
</p>
<p>
<a href="http://www.libsdl.org">SDL</a> provides the low-level 2D rendering support.
LISPBUILDER-SDL adds 2D graphical effects such as rotation,
rendering circles, polygons, squares, Bezier and Cuttmull-Rom curves as well as bitmap font support.
Additional packages provide native C drawing functions, True Type font rendering,
loading of multiple image formats, a sound mixer and networking support.
The lispbuilder packages are meant to work together with each package providing a specific core set of
functionality. For example, an image that is loaded by lispbuilder-sdl-image may be rotated using
lispbuilder-sdl-gfx. Text may be rendered to a surface using lispbuilder-sdl-ttf and finally blitted to
the display using lispbuilder-sdl.
</p>
<ul>
<li><a href="lispbuilder-sdl-gfx.html" title="lispbuilder-sdl-gfx">lispbuilder-sdl-gfx</a>:
2D graphical effects such as zooming, rotation, circles, polygons and squares, using
<a href="http://www.ferzkopp.net/Software/SDL_gfx-2.0/" title="http://www.ferzkopp.net/Software/SDL_gfx-2.0/" rel="nofollow">SDL_gfx</a></li>
<li> <a href="lispbuilder-sdl-image.html" title="lispbuilder-sdl-image">lispbuilder-sdl-image</a>:
Support for multople image formats such as <acronym title="Portable Network Graphics">PNG</acronym> and
<acronym title="Joint Photographics Experts Group">JPG</acronym>,
using <a href="http://www.libsdl.org/projects/SDL_image/" title="http://www.libsdl.org/projects/SDL_image/" rel="nofollow">SDL_image</a></li>
<li>lispbuilder-sdl-mixer: Sound mixing, using
<a href="http://www.libsdl.org/projects/SDL_mixer/" title="http://www.libsdl.org/projects/SDL_mixer/" rel="nofollow">SDL_mixer</a>
a multi-channel audio mixer library</li>
<li><a href="lispbuilder-sdl-ttf.html" title="lispbuilder-sdl-ttf">lispbuilder-sdl-ttf</a>:
True-type font rendering, using
<a href="http://www.libsdl.org/projects/SDL_ttf/" title="http://www.libsdl.org/projects/SDL_ttf/" rel="nofollow">SDL_ttf</a></li>
<li>lispbuilder-sdl-net: Networking, using
<a href="http://www.libsdl.org" title="http://www.libsdl.org" rel="nofollow">SDL_net</a>
a cross-platform, blocking network library</li>
</ul>
<p>
<font color=red>Current Version:</font> The version of LISPBUILDER-SDL to use is the
<a href="#downloads">latest version in SVN</a>.
</p>
<!-- <p> -->
<!-- <font color=red>Download shortcut:</font> <a href="http://www.balooga.com/lispbuilder/lispbuilder-sdl.zip">http://www.balooga.com/lispbuilder/lispbuilder-sdl.zip</a>. -->
<!-- </p> -->
</blockquote>
<br> </br><h2><a class=none name="examplesimple">Simple Example</a></h2>
<div class="example">
<p>
This example was created with the following code:
</p>
<p>
<img src="sdl-alien.png" width="200" height="167" title="Alien Technology" alt="Alien Technology"/>
</p>
<pre>
(sdl:with-init ()
(sdl:window 320 240)
(sdl:draw-surface (load-image "lisp.bmp"))
(sdl:update-display)
(sdl:with-events ()
(:quit-event () t)
(:video-expose-event (sdl:update-display))))
</pre>
</div>
<div class="index">
<ol>
<li><a href="#top">LISPBUILDER-SDL</a></li>
<ol>
<li><a href="#abstract">Abstract</a></li>
<li><a href="#examplesimple">Simple Example</a></li>
<li><a href="#compatibility">Compatibility</a></li>
<li><a href="#downloads">Downloads</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#usage">Usage</a></li>
<li><a href="#examples">Included Examples</a></li>
<li><a href="#dependency">Dependencies</a></li>
<li><a href="#license">License</a></li>
<li><a href="#packageoverview">Package Overview</a></li>
<ol>
<li><a href="#packageexports">Package Exports</a></li>
<li><a href="#packagestruct">Package Structure</a></li>
</ol>
<li><a href="#devintro">Introduction</a></li>
<ol>
<li><a href="#devinit">Initialisation</a></li>
<li><a href="#devwin">Creation of the SDL Window</a></li>
<li><a href="#devloop">Events and the Game Loop</a></li>
<li><a href="#devprim">Primitives</a></li>
<ol>
<li><a href="#devprimrect">Rectangle</a></li>
<li><a href="#devprimcol">Color</a></li>
</ol>
<li><a href="#devdraw">Drawing</a></li>
<li><a href="#font">Fonts</a></li>
<ol>
<li><a href="#fontinit">Initialisation</a></li>
<li><a href="#fontrend">Rendering Text</a></li>
</ol>
<li><a href="#devsurf">Surfaces</a></li>
<ol>
<li><a href="#devsurfover">Overview</a></li>
<li><a href="#devsurfcreat">Creation</a></li>
<li><a href="#devsurfload">Loading Images</a></li>
<li><a href="#devsurfpos">Positioning</a></li>
<li><a href="#devsurfblit">Drawing & Blitting</a></li>
</ol>
<li><a href="#devdisp">The SDL Display</a></li>
<li><a href="#devcursor">The Cursor</a></li>
<li><a href="#devex">Simple Example</a></li>
<li><a href="#devgarbage">Garbage Collection</a></li>
</ol>
<li><a href="#dictionar">LISPBUILDER-SDL dictionary</a></li>
<ol>
<li><a href="#dictionary">INDEX</a></li>
</ol>
<li><a href="#ack">Acknowledgements</a></li>
</ol>
</div>
<br> </br><h2><a class=none name="compatibility">Compatibility</h2>
<p>
The following table describes the status of LISPBUILDER-SDL on the major Common Lisp
implementations:
</p>
<table id="mytable" cellspacing="0" summary="Compatibility">
<tr>
<th><b>Lisp Implementation</b></th>
<th colspan="3"><b>LISPBUILDER-SDL Status</b></th>
<th><b>Comments</b></th>
</tr>
<tr>
<th colspan="1"></th>
<th><b>Win32</b></th>
<th><b>Linux</b></th>
<th><b>MacOS</b></th>
<th></th>
</tr>
<tr>
<th class="spec" scope="row">
<a href="http://clisp.cons.org/">CLISP v2.38</a>
</th>
<td bgcolor="#60c060">Working</td>
<td bgcolor="#60c060">Working</td>
<td bgcolor="#60c060">Working</td>
<td></td>
</tr>
<tr>
<th class="specalt" scope="row">
<a href="http://www.lispworks.com/">Lispworks v4.4.6 Personal</a>
</th>
<td class="alt" bgcolor="#60c060">Working</td>
<td class="alt" bgcolor="#60c060">Working</td>
<td class="alt" bgcolor="#60c060">Working</td>
<td></td>
</tr>
<tr>
<th class="spec" scope="row">
<a href="http://www.franz.com/">Allegro Express 8.0</a>
</th>
<td bgcolor="#ff6060">Unknown</td>
<td bgcolor="#60c060">Working</td>
<td bgcolor="#ff6060">Unknown</td>
<td></td>
</tr>
<tr>
<th class="specalt" scope="row">
<a href="http://openmcl.clozure.com/">OpenMCL</a>
</th>
<td class="alt" bgcolor=blue><font color="#FFFFFF">NA</font></td>
<td class="alt" bgcolor=blue><font color="#FFFFFF">NA</font></td>
<td class="alt" bgcolor="#ff6060">Unknown</td>
<td></td>
</tr>
<tr>
<th class="spec" scope="row">
<a href="http://www.sbcl.org/">SBCL</a>
</th>
<td bgcolor="#60c060">Working</td>
<td bgcolor="#60c060">Working</td>
<td bgcolor="#ff6060">Unknown</td>
<td></td>
</tr>
</table>
<br> </br><h2><a class=none name="downloads">Downloads</a></h2>
<p>See <a href="http://lispbuilder.sourceforge.net/index.html#download">the LISPBUILDER documentation</a>
for downloads.
</p>
<br> </br><h2><a class=none name="installation">Installation</a></h2>
<p>See <a href="http://lispbuilder.sourceforge.net/index.html#installation">the LISPBUILDER documentation</a>
for installation instructions.
</p>
<br> </br><h2><a class=none name="usage">Using LISPBUILDER-SDL</a></h2>
<p>
Enter the following at the REPL to compile and load the LISPBUILDER-SDL package:
<pre>(asdf:operate 'asdf:load-op :lispbuilder-sdl)</pre>
ASDF will take care of loading the CFFI and :LISPBUILDER-SDL dependencies.
The SDL.dll library will also be loaded into the Lisp image at this time.
</p>
<br> </br><h2><a class=none name="examples">Running the Included Examples</a></h2>
<p>Enter the following at the REPL to compile and load the examples included in the
LISPBUILDER-SDL-EXAMPLES package:</p>
<pre>
(asdf:operate 'asdf:load-op :lispbuilder-sdl-examples)
</pre>
<p>Run the examples by entering any of the following at the REPL:
</p>
<pre>
(SDL-EXAMPLES:BEZIER)
(SDL-EXAMPLES:BMP-SAMPLE)
(SDL-EXAMPLES:CIRCLE-1)
(SDL-EXAMPLES:CIRCLE-2)
(SDL-EXAMPLES:CIRCLE-3)
(SDL-EXAMPLES:CIRCLE-4)
(SDL-EXAMPLES:CIRCLE-5)
(SDL-EXAMPLES:DISTANCE-2D)
(SDL-EXAMPLES:FLOOD-FILL)
(SDL-EXAMPLES:INBUILT-FONTS)
(SDL-EXAMPLES:LINE-DRAWING)
(SDL-EXAMPLES:MANDELBROT)
(SDL-EXAMPLES:METABALLS)
(SDL-EXAMPLES:MOUSE-2D)
(SDL-EXAMPLES:MOUSE-PAINTER)
(SDL-EXAMPLES:PIXELS-1)
(SDL-EXAMPLES:PIXELS-2)
(SDL-EXAMPLES:PIXELS-3)
(SDL-EXAMPLES:PIXELS-4)
(SDL-EXAMPLES:POINTS-AND-LINES)
(SDL-EXAMPLES:RANDOM-RECTS)
(SDL-EXAMPLES:RANDOM-BOX-1)
(SDL-EXAMPLES:RANDOM-BOX-2)
(SDL-EXAMPLES:RANDOM-BOX-3)
(SDL-EXAMPLES:RANDOM-BOX-4)
(SDL-EXAMPLES:RECURSIVE-RECTS)
(SDL-EXAMPLES:SETUP-AND-DRAW)
(SDL-EXAMPLES:SIMPLE-FONT-DEMO)
(SDL-EXAMPLES:STROKE)
(SDL-EXAMPLES:VERTICES)
(SDL-EXAMPLES:WIDTH-HEIGHT)
</pre>
<br> </br><h2><a class=none name="dependency">Dependencies</a></h2>
<p>None.</p>
<br> </br><h2><a class=none name="license">License</a></h2>
<p>
LISPBUILDER-SDL is distributed under the
<a href="http://en.wikipedia.org/wiki/MIT_License">MIT-style license</a>.
</p>
<br> </br><h2><a class=none name="packageoverview">Package Overview</a></h2>
<h3><a class=none name="packageexports">Package Exports</a></h3>
<p>
Functions and symbols exported from the LISPBUILDER-SDL package are
accessible from the <code>LISPBUILDER-SDL:</code> prefix or the
shorter form <code>SDL:</code> nickname.
</p>
<h3><a class=none name="packagestruct">Package Structure</a></h3>
<p>
The <code>cffi/</code> directory contains the raw CFFI bindings.
These bindings may be automatically generated by <a href="http://www.swig.org">SWIG</a> or created by hand.
CFFI translation functions perform simple low-level conversions for example,
converting Lisp strings to C strings and back (see <code>cffi-translate.lisp</code>).
All functions in <code>cffi/</code> accept and return foreign objects only.
</p>
<p>
The <code>base/</code> directory defines wrappers over the functions in <code>cffi/</code> .
The functions in <code>base/</code> accept keyword arguments and accept NIL instead
of CFFI:NULL-POINTER where appropriate. Generally functions in <code>base/</code> accept and return foreign
objects. <code>base/</code> may perform some type checks (IS-VALID-PTR SURFACE) but
this layer is meant to be lean. Someone who implements a graphics engine
might use this layer instead of <code>sdl/</code> if speed is a concern.
There are no fancy drawing primitives in this layer.
</p>
<p>
The <code>sdl/</code> directory defines the abstractions over <code>cffi/</code> and <code>base/</code>.
Foreign objects are passed around <code>sdl/</code> neatly wrapped in CLOS objects, using TRIVIAL-GARBAGE for
automatic garbage collection (minimize foreign objects being left on the
heap). There are no functions in <code>sdl/</code> that accept or return foreign
objects (with the exception of the functions that create the CLOS
wrapper objects) Functions in <code>sdl/</code> call down into
<code>cffi/</code> and <code>base/</code> as appropriate. All LISPBUILDER-SDL symbols available in
<code>SDL:</code> are exported from <code>sdl/</code>, with symbols imported into <code>sdl/</code> from
<code>cffi/</code> and <code>base/</code> as appropriate (e.g. WITH-EVENTS). All drawing primitives are
defined in this layer; circles, rectangles, lines, triangles, with-bezier etc.
Functions in <code>sdl/</code> implement a lot of type checking.
</p>
<p>
An example of the difference between <code>base/</code> and <code>sdl/</code> is
WITH-RECTANGLE. The WITH-RECTANGLE macro in <code>base/</code> creates and destroys a foreign
SDL_Rect. The WITH-RECTANGLE macro in <code>sdl/</code> will create and destroy
a RECTANGLE object.
</p>
<br> </br><h2><a class=none name="devintro">Introduction</a></h2>
<h3><a class=none name="devinit">Initialisation of SDL</a></h3>
<p>
The SDL library and SDL subsystems must be initialized prior to use.
This is handled automatically when using the macro <a href="#with-init">WITH-INIT</a>.
<a href="#with-init">WITH-INIT</a> also uninitialises the SDL library upon exit.
More detailed information on the LISPBUILDER-SDL initialisation process can be found in the
documentation for <a href="#with-init">WITH-INIT</a>.
</p>
<pre>
(WITH-INIT (SDL-INIT-VIDEO)
...)
</pre>
<h3><a class=none name="devwin">Creation of the SDL Window</a></h3>
<p>
A window must be created to display any kind of output. A window of a specific pixel width and height
is created using the function <a href="#window">WINDOW</a>. <a href="#window">WINDOW</a> takes
additional keyword parameters to set the requested video mode, color bit depth, the window title and
the icon title.
More detailed information can be found in in the documentation for <a href="#window">WINDOW</a>.
</p>
<pre>
(WITH-INIT (SDL-INIT-VIDEO)
(WINDOW 320 240))
</pre>
<h3><a class=none name="devloop">Handling Events and the Game Loop</a></h3>
<p>
LISPBUILDER-SDL provides the <a href="#with-events">WITH-EVENTS</a> macro that simplifies
the game loop and handling SDL events. Event handlers are defined by specifying the event type a well as an
optional list of fields specific to that event.
</p>
<p>
More detailed information on all SDL events (Keyboard events, Joystick events, User events etc.) can be
found in in the documentation for <a href="#with-events">WITH-EVENTS</a>.
</p>
<p>
For example, to process the current x and y mouse position
when the mouse is moved:
</p>
<pre>
(:MOUSE-MOTION-EVENT (:X X-POS :Y Y-POS)
...)
</pre>
<p>
Or to process the x and y relative mouse positions when the mouse is moved:
</p>
<pre>
(:MOUSE-MOTION-EVENT (:X-REL relative-x :Y-REL relative-y)
...)
</pre>
<p>
The only event that must be handled with <a href="#with-events">WITH-EVENTS</a>
is the :QUIT-EVENT. If :QUIT-EVENT is ignored then it is impossible for the user to close the SDL Window
or exit the game loop.
</p>
<pre>
(WITH-EVENTS ()
(:QUIT-EVENT () T)
(:MOUSE-MOTION-EVENT (:X mouse-x :Y mouse-y)
...))
</pre>
<p>
In addition to handling events, <a href="#with-events">WITH-EVENTS</a> also manages the game loop.
Introducing the :IDLE event. :IDLE, although not technically an actual event, is executed once per game
loop after all events have been processed in the SDL event queue. :IDLE is where the user can place code
that needs to be executed once per game loop and that is not 'event' driven. This code may involve
updating world physics, updating the state of game objects and rendering sprites to the display.
</p>
<pre>
(WITH-EVENTS ()
(:QUIT-EVENT () T)
(:MOUSE-MOTION-EVENT (:X mouse-x :Y mouse-y)
...)
(:IDLE ()
(UPDATE-DISPLAY)))
</pre>
<p>
<a href="#with-events">WITH-EVENTS</a> can also limit execution of the the game loop to a specific number
of iterations a second using <a href="#frame-rate">FRAME-RATE</a>. This effectively limits the number of
frames displayed per second. To set the frame rate to 60 frames per second,
<code>(SETF (SDL:FRAME-RATE) 60)</code>. To unlock the frame rate effectively running the game loop as fast
as the CPU will allow set the FRAME-RATE to NIL, <code>(SETF (SDL:FRAME-RATE) NIL)</code>
</p>
<p>The SDL display surface needs to be updated once per game loop, as described in the section
<a href="#devdisp">SDL Display</a>.
</p>
<pre>
(SETF (FRAME-RATE) 30)
(WITH-EVENTS ()
...)
</pre>
<h3><a class=none name="devprim">Primitives</a></h3>
<p>
LISPBUILDER-SDL supports the SDL <a href="#rectangle">RECTANGLE</a> and <a href="#color">COLOR</a> primitives.
These are described below.
</p>
<h4><a class=none name="devprimrect">Rectangle</a></h4>
<p>
A new rectangle is created by the function <a href="#rectangle">RECTANGLE</a>.
The function <a href="#rectangle-from-edges">RECTANGLE-FROM-EDGES</a> will create a new rectangle
from the specified top left and bottom right coordinates. The function
<a href="#rectangle-from-midpoint">RECTANGLE-FROM-MIDPOINT</a> will create a new rectangle from midpoint.
</p>
<p>
The macros <a href="#with-rectangle">WITH-RECTANGLE</a> and <a href="#with-rectangle">WITH-RECTANGLEs</a>
will create a new rectangle and free this rectangle when it goes out of scope.
</p>
<p>
The rectangle position and width and height can be inspected and modified using the following functions:
<a href="#x">X</a>, <a href="#y">Y</a>, <a href="#width">WIDTH</a> and <a href="#height">HEIGHT</a>.
<a href="#x2">X2</a> and <a href="#y2">Y2</a> will return the (+ x width) and (+ y height) of the rectangle respectively.
</p>
<p>
Additional functions that operate on rectangles are as follows:
<ul>
<li><a href="#point-*">POINT-*</a></li>
<li><a href="#get-point">GET-POINT</a></li>
<li><a href="#set-point">SET-POINT</a></li>
<li><a href="#position">POSITION</a></li>
<li><a href="#get-position">GET-POSITION</a></li>
<li><a href="#rectangle-*">RECTANGLE-*</a></li>
<li><a href="#get-rectangle">GET-RECTANGLE</a></li>
<li><a href="#set-rectangle">SET-RECTANGLE</a></li>
<li><a href="#draw-box">DRAW-BOX</a>, <a href="#draw-rectangle">DRAW-RECTANGLE</a></li>
</ul>
The section <a href="#devdraw">Drawing</a> describes how to render a rectangle to a surface.
</p>
<h4><a class=none name="devprimcol">Color</a></h4>
<p>
A new SDL color is created by <a href="#color">COLOR</a>, returning either a new RGB or RGBA color.
</p>
<p>
RGB/A color componets can be manipulated using the functions <a href="#r">R</a>, <a href="#g">G</a>,
<a href="#b">B</a>, <a href="#a">A</a>, <a href="#set-color">SET-COLOR</a> and
<a href="#set-color-*">SET-COLOR-*</a>. Two colors may be compared using <a href="#color==">COLOR=</a>.
</p>
<p>
Functions that accept a color parameter will most likely bind color to
<a href="#*default-color*">*DEFAULT-COLOR*</a> when unspecified. The macro
<a href="#with-font">WITH-COLOR</a> will bind a color to <a href="#*default-color*">*DEFAULT-COLOR*</a>
within the scope of this macro. When <a href="#*default-color*">*DEFAULT-COLOR*</a> is bound to a color,
all subsequent drawing functions will use this implied color while it remains in scope.
</p>
<p>
Additional functions that operate on colors are as follows:
<ul>
<li><a href="#color-*">COLOR-*</a></li>
<li><a href="#any-color-but-this">ANY-COLOR-BUT-THIS</a></li>
<li><a href="#map-color">MAP-COLOR</a></li>
<li><a href="#pack-color">PACK-COLOR</a></li>
</ul>
</p>
<p>
LISPBULDER-SDL contains several predefined colors; <a href="#*black*">*BLACK*</a>,
<a href="#*white*">*WHITE*</a>.
</p>
<h3><a class=none name="devdraw">Drawing</a></h3>
<p>
LISPBUILDER-SDL provides low-level drawing support for several primitives. Most primitives can be drawn
with or without alpha transparency. In addition, the filled primitives can be drawn with a single pixel
outline (or stroke) that is a different color to the fill color.
<ul>
<li>Blitting Surfaces: <a href="#draw-surface">DRAW-SURFACE</a> and
<a href="#blit-surface">BLIT-SURFACE</a></li>
<li>Bezier and Cutmull-Rom Curves: <a href="#draw-bezier">DRAW-BEZIER</a>,
<a href="#draw-shape">DRAW-SHAPE</a>, <a href="#with-bezier">WITH-BEZIER</a>,
<a href="#with-curve">WITH-CURVE</a> and <a href="#draw-curve">DRAW-CURVE</a>.</li>
<li>Boxes and Rectangles: <a href="#draw-box">DRAW-BOX</a>,
<a href="#draw-rectangle">DRAW-RECTANGLE</a></li>
<li>Circles: <a href="#draw-circle">DRAW-CIRCLE</a> and
<a href="#draw-filled-circle">DRAW-FILLED-CIRCLE</a></li>
<li>Lines: <a href="#draw-hline">DRAW-HLINE</a>, <a href="#draw-vline">DRAW-VLINE</a> and
<a href="#draw-line">DRAW-LINE</a></li>
<li>Points: <a href="#draw-point">DRAW-POINT</a></li>
<li>Polygons and Triangles: <a href="#draw-polygon">DRAW-POLYGON</a>,
<a href="#draw-trigon">DRAW-TRIGON</a> and <a href="#with-shape">WITH-SHAPE</a></li>
<li>Filling Surfaces with Color: <a href="#fill-surface">FILL-SURFACE</a></li>
<li>Filling Arbitrary Shapes with Color: <a href="#flood-fill">FLOOD-FILL</a></li>
</ul>
</p>
<p>
Drawing functions require a target surface and color. LISPBUILDER-SDL uses defaults for both
target surface (<a href="#*default-surface*">*DEFAULT-SURFACE*</a>) and color
(<a href="#*default-color*">*DEFAULT-COLOR*</a>) unless these are otherwise specified by the user.
The macros <a href="#with-surface">with-surface</a>, and
<a href="#with-surfaces">with-surfaces</a> will bind a surface to *DEFAULT-SURFACE* within the scope these
macros. For example, instead of specifying a target surface for each draw-* function a user may bind
*DEFAULT-SURFACE* to a surface once and subsequent draw-* functions will use this implied surface
while it remains in scope.
</p>
<pre>
(DRAW-POINT (sdl:point :x x1 :y y1) :surface a-surface :color *white*)
(DRAW-POINT (sdl:point :x x2 :y y2) :surface a-surface :color *white*)
(DRAW-POINT (sdl:point :x x3 :y y3) :surface a-surface :color *white*)
(DRAW-POINT (sdl:point :x x4 :y y4) :surface a-surface :color *white*)
</pre>
<p>Now, we use <a href="#with-surface">WITH-SURFACE</a> to bind a surface to *DEFAULT-SURFACE*.</p>
<pre>
(WITH-SURFACE (a-surface)
(DRAW-POINT (sdl:point :x x1 :y y1) :color *white*)
(DRAW-POINT (sdl:point :x x2 :y y2) :color *white*)
(DRAW-POINT (sdl:point :x x3 :y y3) :color *white*)
(DRAW-POINT (sdl:point :x x4 :y y4) :color *white*))
</pre>
<p>
We can use <a href="#with-color">WITH-COLOR</a> to bind *DEFAULT-COLOR* to *white*:
</p>
<pre>
(WITH-SURFACE (a-surface)
(WITH-COLOR (*white*)
(DRAW-POINT (sdl:point :x x1 :y y1))
(DRAW-POINT (sdl:point :x x2 :y y2))
(DRAW-POINT (sdl:point :x x3 :y y3))
(DRAW-POINT (sdl:point :x x4 :y y4)))
</pre>
<p>
Finally, if the target surface is the display then WITH-SURFACE is not required as :SURFACE when NIL
will be bound to *DEFAULT-DISPLAY* as a default. So the above code can be shortened as follows:
</p>
<pre>
(WITH-COLOR (*white*)
(DRAW-POINT (sdl:point :x x1 :y y1))
(DRAW-POINT (sdl:point :x x2 :y y2))
(DRAW-POINT (sdl:point :x x3 :y y3))
(DRAW-POINT (sdl:point :x x4 :y y4)))
</pre>
<h3><a class=none name="font">Fonts</a></h3>
<p>
LISPBUILDER-SDL contains several bitmap fonts of different sizes and faces (italics/bolded). See
<a href="#initialise-font">INITIALISE-FONT</a> for the complete list of built-in fonts.
</p>
<h4><a class=none name="fontinit">Initialisation and Freeing Fonts</a></h3>
<p>
Fonts are initialised using <a href="#initialise-default-font">INITIALISE-DEFAULT-FONT</a>, or
<a href="#initialise-font">INITIALISE-FONT</a>. The resouces allocated to a font are freed by
<a href="#free-font">FREE-FONT</a>. A font must be initialised prior to use.
</p>
<p>
LISPBUILDER-SDL provides the macros <a href="#with-default-font">WITH-DEFAULT-FONT</a> and
<a href="#with-font">WITH-FONT</a> for the above functions that bind
<a href=#"*default-font*">*DEFAULT-FONT*</a> to font within the scope of the macro.
<p>
<h4><a class=none name="fontrend">Rendering Text</a></h3>
<p>
LISPBUILDER-SDL supports the rendering of colored text over a transparent background (Solid rendering),
and the rendering of colored text over a solid colored background (Shaded rendering). Text may be left, right or
center justified. Text can be drawn directly to a target surface using
<a href="#draw-string-solid">DRAW-STRING-SOLID</a> and <a href="#draw-string-shaded">DRAW-STRING-SHADED</a>.
Text can be rendered to a new surface of character height and string width using
<a href="#render-string-solid">RENDER-STRING-SOLID</a> and
<a href="#render-string-shaded">RENDER-STRING-SHADED</a>. This new surface may be optionally cached in the
font object. A cached surface font can be accessed using <a href="#cached-surface">CACHED-SURFACE</a>) and can
be blitted to a target surface using <a href="#draw-font">DRAW-FONT</a>.
</p>
<p>
The font rendering functions accept a font object. This font parameter is bound to
<a href="#*default-font*">*DEFAULT-FONT*</a> when unspecified. The function
<a href="#initialise-default-font">INITIALISE-DEFAULT-FONT</a> and the macros
<a href="#with-font">WITH-FONT</a> and <a href="#with-default-font">WITH-DEFAULT-FONT</a> will bind a
font to <a href="#*default-font*">*DEFAULT-FONT*</a> within the scope of these macros. When
<a href="#*default-font*">*DEFAULT-FONT*</a> is bound to a font, all subsequent font drawing
or font rendering functions will use this implied font while it remains in scope.
</p>
<pre>
(WITH-COLOR (*WHITE*)
(WITH-FONT (*FONT-8x8*)
(DRAW-STRING-SOLID-* "Font is 8x8." 10 10)
(WITH-FONT (*FONT-10x20*)
(DRAW-STRING-SOLID-* "Font is 10x20." 10 20))
(DRAW-STRING-SOLID-* "Font is 8x8 again." 10 40)))
</pre>
<h3><a class=none name="devsurf">Surfaces</a></h3>
<p>
</p>
<h4><a class=none name="devsurfover">Overview of Surfaces</a></h4>
<p>
An SDL surface, <a href="#surface">SURFACE</a>, represents an area of <em>graphical</em> memory
that can be drawn or rendered to, for example the video framebuffer or an image that is loaded from disk.
</p>
<h4><a class=none name="devsurfcreat">Creating Surfaces</a></h4>
<p>
A surface is created:
<ul>
<li>Automatically by the SDL library to represent a framebuffer by
calling <a href="#window">WINDOW</a>.</li>
<li>When loading an image from disk using <a href="#load-image">LOAD-IMAGE</a>.</li>
<li>Explicitely using <a href="#create-surface">CREATE-SURFACE</a>, or
<a href="#copy-surface">COPY-SURFACE</a>.</li>
<li>Implicitely using <a href="#convert-surface">CONVERT-SURFACE</a>.</li>
</ul>
</p>
<p>
Functions that accept a surface parameter will most likely bind surface to
<a href="#*default-surface*">*DEFAULT-SURFACE*</a> when unspecified.
The macros <a href="#with-surface">WITH-SURFACE</a> and <a href="#with-surfaces">WITH-SURFACES</a> will bind a
surface to <a href="#*default-surface*">*DEFAULT-SURFACE*</a> within the scope of these macro.
When <a href="#*default-surface*">*DEFAULT-SURFACE*</a> is bound to a surface,
all subsequent drawing functions will use this implied surface while it remains in scope.
</p>
<p>
A surface can be explicitely freed by calling <a href="#free-surface">FREE-SURFACE</a>.
</p>
<h4><a class=none name="devsurfload">Images</a></h4>
<p>
BMP images are loaded from disk using <a href="#load-image">LOAD-IMAGE</a>. Support for additional
image formats is provided in the <a href="lispbuilder-sdl-image.html">LISPBUILDER-SDL-IMAGE</a> package.
A surface is saved to disk as a BMP image using <a href="#save-image">SAVE-IMAGE</a>.
</p>
<pre>
(DRAW-SURFACE (LOAD-IMAGE "sdl.bmp")
:surface *default-display*)
</pre>
<h4><a class=none name="devsurfpos">Positioning Surfaces</a></h4>
<p>
A <a href="#surface">SURFACE</a> stores its own position X/Y coordinates. These coordinates
can be inspected and modified using the following functions:
<a href="#x">X</a>, <a href="#y">Y</a>, <a href="#width">WIDTH</a> and <a href="#height">HEIGHT</a>.
</p>
<p>
Additional functions and macros that manage surface coordinates are as follows:
<ul>
<li><a href="#point-*">POINT-*</a></li>
<li><a href="#get-point">GET-POINT</a></li>
<li><a href="#set-point">SET-POINT</a></li>
<li><a href="#set-point-*">SET-POINT-*</a></li>
<li><a href="#position-*">POSITION-*</a></li>
<li><a href="#get-position">GET-POSITION</a></li>
<li><a href="#set-position-*">GET-POSITION</a></li>
<li><a href="#set-surface">SET-SURFACE</a></li>
<li><a href="#set-surface-*">SET-SURFACE-*</a></li>
<li><a href="#rectangle-*">RECTANGLE-*</a></li>
<li><a href="#get-rectangle-*">GET-RECTANGLE-*</a></li>
<li><a href="#get-surface-rect">GET-SURFACE-RECT</a></li>
<li><a href="#draw-surface-at">DRAW-SURFACE-AT</a></li>
</ul>
</p>
<h4><a class=none name="devsurfblit">Drawing & Blitting Surfaces</a></h4>
<p>The functions <a href="#blit-surface">BLIT-SURFACE</a> and <a href="#draw-surface">DRAW-SURFACE</a> will
blit or draw a source surface onto a destination surface using the position coordinates stored in the source surface.
<a href="#draw-surface-at">DRAW-SURFACE-AT</a> will draw the source surface at a specified position.
</p>
<p>
The composition rules that determine how the source surface is composed over the destination surface are
described in the description of <a href="#blit-surface">BLIT-SURFACE</a>.
<a href="#fill-surface">FILL-SURFACE</a> fill will the target surface with a single color.
<a href="#devprim">Drawing Primitives</a> describes how <a href="#*default-surface*">*DEFAULT-SURFACE*</a>
is used when calling blitting operations.
</p>
<p>
Use <a href="#set-color-key">SET-COLOR-KEY</a> and <a href="#clear-color-key">CLEAR-COLOR-KEY</a>
<a href="#set-alpha">SET-ALPHA</a> to modify the key color and alpha transparency proporties of a surface after the
surface has been created.
</p>
<p>
Set a <em>clipping</em> rectangle to limit the draw area on a destination surface.
The clipping rectangle for a surface is manipulated using <a href="#get-clip-rect">GET-CLIP-RECT</a> and
<a href="#set-clip-rect">SET-CLIP-RECT</a>. When this surface is the destination of a blit,
only the area within the <em>clip</em> rectangle will be drawn into.
</p>
<p>
Set a <em>cell</em> rectangle to limit the surface area on the source surface.
The cell rectangle for a surface is manipulated using <a href="#clear-cell">CLEAR-CELL</a> and
<a href="#set-cell">SET-CELL</a>. When this surface is the source of a blit,
only the areas within the <em>cell</em> rectangle will be used.
The cell is useful when only a small area of the source surface needs to be blitted to the destination surface.
For example a sequence of images composed into a single sprite sheet and only the current frame of animation
is to be drawn to the display at any one time.
</p>
<p>
<img src="waddle.png" width="285" height="51" title="Sprite Sheet" alt="Sprite Sheet"/>
</p>
<h4><a class=none name="devupdate">Updating SDL Surfaces and the SDL Display</a></h4>
<p>
The functions <a href="#update-display">UPDATE-DISPLAY</a> and <a href="#update-surface">UPDATE-SURFACE</a>
update the SDL display surface (or OpenGL context) and general SDL surfaces respectively.
</p>
<h3><a class=none name="devdisp">The SDL Display</a></h3>
<p>
The SDL display surface must be updated at least once each game loop using the function
<a href="#update-display">UPDATE-DISPLAY</a>. This function will call
<a href="#sdl-gl-swap-buffers">SDL-GL-SWAP-BUFFERS</a> to update the OpenGL display,
or <a href="#sdl-flip">SDL-FLIP</a> to update the SDL surface depending on the current
<a href="#*opengl-context*">*OPENGL-CONTEXT*</a>. The display can be filled with a background
color using <a href="#clear-display">CLEAR-DISPLAY</a>.
</p>
<p>
The properties of an SDL surface can be queried using <a href="#surface-info">SURFACE-INFO</a>.
The properties of the SDL display and video hardware can be queried using <a href="#video-info">VIDEO-INFO</a>.
The screen resolutions supported by a particular set of video flags can be retrieved using
<a href="#list-modes">LIST-MODES</a>. A pointer to the native SDL window can be retrieved using
<a href="#get-native-window">GET-NATIVE-WINDOW</a>. The name of the video driver can be retrieved as a STRING
using <a href="#video-driver-name">VIDEO-DRIVER-NAME</a>.
<h3><a class=none name="devcursor">The Cursor</a></h3>
<p>
The the current state of the cursor is returned using <a href="#query-cursor">QUERY-CURSOR</a>, and is set using
<a href="#query-cursor">SHOW-CURSOR</a>.
</p>
<h3><a class=none name="devex">Simple Example</a></h3>
<p>
Putting this all together, we can write short example showing a white rectangle that follows the users mouse
movements within an SDL Window. Exit the example by closing the window or pressing the Esc key on the keyboard.
</p>
<pre>
;; Initialise SDL and the Video subsystem
(WITH-INIT (SDL-INIT-VIDEO)
(WINDOW 320 240) ; Open a window, 320 x 240
(SETF (FRAME-RATE) 30) ; Lock the frame rate to 30 fps
(WITH-EVENTS ()
(:QUIT-EVENT () T) ; Absolutely have to handle the :QUIT-EVENT
(:KEY-DOWN-EVENT (:KEY key) (WHEN (KEY= key :SDL-KEY-ESCAPE) (PUSH-QUIT-EVENT)))
(:MOUSE-MOTION-EVENT (:X mouse-x :Y mouse-y)
(CLEAR-DISPLAY *black*)
;; Draw the box with center at the mouse x/y coordinates.
(DRAW-BOX-* (- mouse-x (/ 50 2)) (- mouse-y (/ 50 2)) 50 50 :color *white*))
(:IDLE ()
(UPDATE-DISPLAY))))
</pre>
<h3><a class=none name="devgarbage">Object Lifecycles and Garbage Collection</a></h3>
<p>
...
</p>
<br> </br><h2><a class=none name="dictionary">The LISPBUILDER-SDL dictionary Index</h2>
<ol>
<li><a href="#*black*"><code>*black*</code></a>
<li><a href="#*blue*"><code>*blue*</code></a>
<li><a href="#*cyan*"><code>*cyan*</code></a>
<li><a href="#*default-color*"><code>*default-color*</code></a>
<li><a href="#*default-display*"><code>*default-display*</code></a>
<li><a href="#*default-font*"><code>*default-font*</code></a>
<li><a href="#*default-font-path*"><code>*default-font-path*</code></a>
<li><a href="#*default-position*"><code>*default-position*</code></a>
<li><a href="#*default-rectangle*"><code>*default-rectangle*</code></a>
<li><a href="#*default-surface*"><code>*default-surface*</code></a>
<li><a href="#*external-init-on-startup*"><code>*external-init-on-startup*</code></a>
<li><a href="#*external-quit-on-exit*"><code>*external-quit-on-exit*</code></a>
<li><a href="#*font-10x20*"><code>*font-10x20*</code></a>
<li><a href="#*font-5x7*"><code>*font-5x7*</code></a>
<li><a href="#*font-5x8*"><code>*font-5x8*</code></a>
<li><a href="#*font-6x10*"><code>*font-6x10*</code></a>
<li><a href="#*font-6x12*"><code>*font-6x12*</code></a>
<li><a href="#*font-6x13*"><code>*font-6x13*</code></a>
<li><a href="#*font-6x13b*"><code>*font-6x13b*</code></a>
<li><a href="#*font-6x13o*"><code>*font-6x13o*</code></a>
<li><a href="#*font-6x9*"><code>*font-6x9*</code></a>
<li><a href="#*font-7x13*"><code>*font-7x13*</code></a>
<li><a href="#*font-7x13b*"><code>*font-7x13b*</code></a>
<li><a href="#*font-7x13o*"><code>*font-7x13o*</code></a>
<li><a href="#*font-7x14*"><code>*font-7x14*</code></a>
<li><a href="#*font-7x14b*"><code>*font-7x14b*</code></a>
<li><a href="#*font-8x13*"><code>*font-8x13*</code></a>
<li><a href="#*font-8x13b*"><code>*font-8x13b*</code></a>
<li><a href="#*font-8x13o*"><code>*font-8x13o*</code></a>
<li><a href="#*font-8x8*"><code>*font-8x8*</code></a>
<li><a href="#*font-9x15*"><code>*font-9x15*</code></a>
<li><a href="#*font-9x15b*"><code>*font-9x15b*</code></a>
<li><a href="#*font-9x18*"><code>*font-9x18*</code></a>
<li><a href="#*font-9x18b*"><code>*font-9x18b*</code></a>
<li><a href="#*green*"><code>*green*</code></a>
<li><a href="#*magenta*"><code>*magenta*</code></a>
<li><a href="#*opengl-context*"><code>*opengl-context*</code></a>
<li><a href="#*red*"><code>*red*</code></a>
<li><a href="#*sdl-initialized*"><code>*sdl-initialized*</code></a>
<li><a href="#*white*"><code>*white*</code></a>
<li><a href="#*yellow*"><code>*yellow*</code></a>
<li><a href="#a"><code>a</code></a>
<li><a href="#all-integers?"><code>all-integers?</code></a>
<li><a href="#any-color-but-this"><code>any-color-but-this</code></a>
<li><a href="#b"><code>b</code></a>
<li><a href="#bit-depth"><code>bit-depth</code></a>
<li><a href="#blit-surface"><code>blit-surface</code></a>
<li><a href="#cached-surface"><code>cached-surface</code></a>
<li><a href="#calculate-curve"><code>calculate-curve</code></a>
<li><a href="#cast"><code>cast</code></a>
<li><a href="#cast-all-to-int"><code>cast-all-to-int</code></a>
<li><a href="#cast-to-int"><code>cast-to-int</code></a>
<li><a href="#catmull-rom-spline"><code>catmull-rom-spline</code></a>
<li><a href="#char-height"><code>char-height</code></a>
<li><a href="#char-width"><code>char-width</code></a>
<li><a href="#check-types"><code>check-types</code></a>
<li><a href="#clear-cell"><code>clear-cell</code></a>
<li><a href="#clear-color-key"><code>clear-color-key</code></a>
<li><a href="#clear-display"><code>clear-display</code></a>
<li><a href="#color"><code>color</code></a>
<li><a href="#color"><code>color</code></a>
<li><a href="#color-*"><code>color-*</code></a>
<li><a href="#color-a"><code>color-a</code></a>
<li><a href="#color="><code>color=</code></a>
<li><a href="#convert-surface"><code>convert-surface</code></a>
<li><a href="#copy-point"><code>copy-point</code></a>
<li><a href="#copy-surface"><code>copy-surface</code></a>
<li><a href="#create-list-if-not"><code>create-list-if-not</code></a>
<li><a href="#create-path"><code>create-path</code></a>
<li><a href="#create-rwops-from-file"><code>create-rwops-from-file</code></a>
<li><a href="#create-surface"><code>create-surface</code></a>
<li><a href="#distance"><code>distance</code></a>
<li><a href="#distance-*"><code>distance-*</code></a>
<li><a href="#draw-bezier"><code>draw-bezier</code></a>
<li><a href="#draw-box"><code>draw-box</code></a>
<li><a href="#draw-box-*"><code>draw-box-*</code></a>
<li><a href="#draw-circle"><code>draw-circle</code></a>
<li><a href="#draw-circle-*"><code>draw-circle-*</code></a>
<li><a href="#draw-curve"><code>draw-curve</code></a>
<li><a href="#draw-filled-circle"><code>draw-filled-circle</code></a>
<li><a href="#draw-filled-circle-*"><code>draw-filled-circle-*</code></a>
<li><a href="#draw-font"><code>draw-font</code></a>
<li><a href="#draw-font"><code>draw-font</code></a>
<li><a href="#draw-font-at"><code>draw-font-at</code></a>
<li><a href="#draw-font-at-*"><code>draw-font-at-*</code></a>
<li><a href="#draw-hline"><code>draw-hline</code></a>
<li><a href="#draw-line"><code>draw-line</code></a>
<li><a href="#draw-line-*"><code>draw-line-*</code></a>
<li><a href="#draw-point"><code>draw-point</code></a>
<li><a href="#draw-point-*"><code>draw-point-*</code></a>
<li><a href="#draw-polygon"><code>draw-polygon</code></a>
<li><a href="#draw-rectangle"><code>draw-rectangle</code></a>
<li><a href="#draw-rectangle-*"><code>draw-rectangle-*</code></a>
<li><a href="#draw-shape"><code>draw-shape</code></a>
<li><a href="#draw-string-shaded"><code>draw-string-shaded</code></a>
<li><a href="#draw-string-shaded-*"><code>draw-string-shaded-*</code></a>
<li><a href="#draw-string-solid"><code>draw-string-solid</code></a>
<li><a href="#draw-string-solid-*"><code>draw-string-solid-*</code></a>
<li><a href="#draw-surface"><code>draw-surface</code></a>
<li><a href="#draw-surface-at"><code>draw-surface-at</code></a>
<li><a href="#draw-surface-at-*"><code>draw-surface-at-*</code></a>
<li><a href="#draw-trigon"><code>draw-trigon</code></a>
<li><a href="#draw-vline"><code>draw-vline</code></a>
<li><a href="#fill-surface"><code>fill-surface</code></a>
<li><a href="#fill-surface-*"><code>fill-surface-*</code></a>
<li><a href="#flood-fill"><code>flood-fill</code></a>
<li><a href="#flood-fill-*"><code>flood-fill-*</code></a>
<li><a href="#flood-fill-stack"><code>flood-fill-stack</code></a>
<li><a href="#flood-fill-stack-*"><code>flood-fill-stack-*</code></a>
<li><a href="#fp"><code>fp</code></a>
<li><a href="#fp-cell"><code>fp-cell</code></a>
<li><a href="#fp-position"><code>fp-position</code></a>
<li><a href="#frame-rate"><code>frame-rate</code></a>
<li><a href="#free-cached-surface"><code>free-cached-surface</code></a>
<li><a href="#free-color"><code>free-color</code></a>
<li><a href="#free-font"><code>free-font</code></a>
<li><a href="#free-rectangle"><code>free-rectangle</code></a>
<li><a href="#free-rwops"><code>free-rwops</code></a>
<li><a href="#free-surface"><code>free-surface</code></a>
<li><a href="#g"><code>g</code></a>
<li><a href="#get-clip-rect"><code>get-clip-rect</code></a>
<li><a href="#get-native-window"><code>get-native-window</code></a>
<li><a href="#get-point"><code>get-point</code></a>
<li><a href="#get-position"><code>get-position</code></a>
<li><a href="#get-rectangle"><code>get-rectangle</code></a>
<li><a href="#get-surface-rect"><code>get-surface-rect</code></a>
<li><a href="#height"><code>height</code></a>
<li><a href="#init-sdl"><code>init-sdl</code></a>
<li><a href="#init-sub-systems"><code>init-sub-systems</code></a>
<li><a href="#initialise-default-font"><code>initialise-default-font</code></a>
<li><a href="#initialise-font"><code>initialise-font</code></a>
<li><a href="#initialize-on-startup"><code>initialize-on-startup</code></a>
<li><a href="#initialized-sub-systems-p"><code>initialized-sub-systems-p</code></a>
<li><a href="#is-valid-ptr"><code>is-valid-ptr</code></a>
<li><a href="#key="><code>key=</code></a>
<li><a href="#list-modes"><code>list-modes</code></a>
<li><a href="#list-sub-systems"><code>list-sub-systems</code></a>
<li><a href="#load-image"><code>load-image</code></a>
<li><a href="#map-color"><code>map-color</code></a>
<li><a href="#pack-color"><code>pack-color</code></a>
<li><a href="#point"><code>point</code></a>
<li><a href="#point-*"><code>point-*</code></a>
<li><a href="#position-*"><code>position-*</code></a>
<li><a href="#push-quit-event"><code>push-quit-event</code></a>
<li><a href="#push-user-event"><code>push-user-event</code></a>
<li><a href="#query-cursor"><code>query-cursor</code></a>
<li><a href="#quit-on-exit"><code>quit-on-exit</code></a>
<li><a href="#quit-sdl"><code>quit-sdl</code></a>
<li><a href="#quit-sub-systems"><code>quit-sub-systems</code></a>
<li><a href="#r"><code>r</code></a>
<li><a href="#random+1"><code>random+1</code></a>
<li><a href="#random-rectangle"><code>random-rectangle</code></a>
<li><a href="#read-point"><code>read-point</code></a>
<li><a href="#rectangle"><code>rectangle</code></a>
<li><a href="#rectangle"><code>rectangle</code></a>
<li><a href="#rectangle-*"><code>rectangle-*</code></a>
<li><a href="#rectangle-from-edges"><code>rectangle-from-edges</code></a>
<li><a href="#rectangle-from-edges-*"><code>rectangle-from-edges-*</code></a>
<li><a href="#rectangle-from-midpoint-*"><code>rectangle-from-midpoint-*</code></a>
<li><a href="#render-string-shaded"><code>render-string-shaded</code></a>
<li><a href="#render-string-solid"><code>render-string-solid</code></a>
<li><a href="#return-sub-systems-of-status"><code>return-sub-systems-of-status</code></a>
<li><a href="#rotate-surface"><code>rotate-surface</code></a>
<li><a href="#rwops"><code>rwops</code></a>
<li><a href="#save-image"><code>save-image</code></a>
<li><a href="#sdl-any-format"><code>sdl-any-format</code></a>
<li><a href="#sdl-async-blit"><code>sdl-async-blit</code></a>
<li><a href="#sdl-color"><code>sdl-color</code></a>
<li><a href="#sdl-doublebuf"><code>sdl-doublebuf</code></a>
<li><a href="#sdl-fullscreen"><code>sdl-fullscreen</code></a>
<li><a href="#sdl-get-ticks"><code>sdl-get-ticks</code></a>
<li><a href="#sdl-hw-accel"><code>sdl-hw-accel</code></a>
<li><a href="#sdl-hw-palette"><code>sdl-hw-palette</code></a>
<li><a href="#sdl-hw-surface"><code>sdl-hw-surface</code></a>
<li><a href="#sdl-init-audio"><code>sdl-init-audio</code></a>
<li><a href="#sdl-init-cdrom"><code>sdl-init-cdrom</code></a>
<li><a href="#sdl-init-eventthread"><code>sdl-init-eventthread</code></a>
<li><a href="#sdl-init-everything"><code>sdl-init-everything</code></a>
<li><a href="#sdl-init-joystick"><code>sdl-init-joystick</code></a>
<li><a href="#sdl-init-noparachute"><code>sdl-init-noparachute</code></a>
<li><a href="#sdl-init-on-startup"><code>sdl-init-on-startup</code></a>
<li><a href="#sdl-init-timer"><code>sdl-init-timer</code></a>
<li><a href="#sdl-init-video"><code>sdl-init-video</code></a>
<li><a href="#sdl-iyuv-overlay"><code>sdl-iyuv-overlay</code></a>
<li><a href="#sdl-no-frame"><code>sdl-no-frame</code></a>
<li><a href="#sdl-opengl"><code>sdl-opengl</code></a>
<li><a href="#sdl-pre-alloc"><code>sdl-pre-alloc</code></a>
<li><a href="#sdl-quit-on-exit"><code>sdl-quit-on-exit</code></a>
<li><a href="#sdl-resizable"><code>sdl-resizable</code></a>
<li><a href="#sdl-rle-accel"><code>sdl-rle-accel</code></a>
<li><a href="#sdl-rle-accel-ok"><code>sdl-rle-accel-ok</code></a>
<li><a href="#sdl-src-alpha"><code>sdl-src-alpha</code></a>
<li><a href="#sdl-src-color-key"><code>sdl-src-color-key</code></a>
<li><a href="#sdl-surface"><code>sdl-surface</code></a>
<li><a href="#sdl-sw-surface"><code>sdl-sw-surface</code></a>
<li><a href="#sdl-uyvy-overlay"><code>sdl-uyvy-overlay</code></a>
<li><a href="#sdl-yuy2-overlay"><code>sdl-yuy2-overlay</code></a>
<li><a href="#sdl-yv12-overlay"><code>sdl-yv12-overlay</code></a>
<li><a href="#sdl-yvyu-overlay"><code>sdl-yvyu-overlay</code></a>
<li><a href="#set-alpha"><code>set-alpha</code></a>
<li><a href="#set-cell"><code>set-cell</code></a>
<li><a href="#set-cell-*"><code>set-cell-*</code></a>
<li><a href="#set-clip-rect"><code>set-clip-rect</code></a>
<li><a href="#set-color"><code>set-color</code></a>
<li><a href="#set-color-*"><code>set-color-*</code></a>
<li><a href="#set-color-key"><code>set-color-key</code></a>
<li><a href="#set-frame-rate"><code>set-frame-rate</code></a>
<li><a href="#set-point"><code>set-point</code></a>
<li><a href="#set-point-*"><code>set-point-*</code></a>
<li><a href="#set-position"><code>set-position</code></a>
<li><a href="#set-position-*"><code>set-position-*</code></a>
<li><a href="#set-rectangle"><code>set-rectangle</code></a>
<li><a href="#set-rectangle-*"><code>set-rectangle-*</code></a>
<li><a href="#set-surface"><code>set-surface</code></a>
<li><a href="#set-surface-*"><code>set-surface-*</code></a>
<li><a href="#show-cursor"><code>show-cursor</code></a>
<li><a href="#surface"><code>surface</code></a>
<li><a href="#surface"><code>surface</code></a>
<li><a href="#surface-info"><code>surface-info</code></a>
<li><a href="#to-degree"><code>to-degree</code></a>
<li><a href="#to-radian"><code>to-radian</code></a>
<li><a href="#update-display"><code>update-display</code></a>
<li><a href="#update-surface"><code>update-surface</code></a>
<li><a href="#update-surface-*"><code>update-surface-*</code></a>
<li><a href="#video-driver-name"><code>video-driver-name</code></a>
<li><a href="#video-info"><code>video-info</code></a>
<li><a href="#width"><code>width</code></a>
<li><a href="#window"><code>window</code></a>
<li><a href="#with-bezier"><code>with-bezier</code></a>
<li><a href="#with-color"><code>with-color</code></a>
<li><a href="#with-curve"><code>with-curve</code></a>
<li><a href="#with-default-font"><code>with-default-font</code></a>
<li><a href="#with-events"><code>with-events</code></a>
<li><a href="#with-font"><code>with-font</code></a>
<li><a href="#with-init"><code>with-init</code></a>
<li><a href="#with-locked-surface"><code>with-locked-surface</code></a>
<li><a href="#with-locked-surfaces"><code>with-locked-surfaces</code></a>
<li><a href="#with-point"><code>with-point</code></a>
<li><a href="#with-rectangle"><code>with-rectangle</code></a>
<li><a href="#with-rectangles"><code>with-rectangles</code></a>
<li><a href="#with-shape"><code>with-shape</code></a>
<li><a href="#with-surface"><code>with-surface</code></a>
<li><a href="#with-surface-slots"><code>with-surface-slots</code></a>
<li><a href="#with-surfaces"><code>with-surfaces</code></a>
<li><a href="#within-range"><code>within-range</code></a>
<li><a href="#within-range-*"><code>within-range-*</code></a>
<li><a href="#x"><code>x</code></a>
<li><a href="#x2"><code>x2</code></a>
<li><a href="#y"><code>y</code></a>
<li><a href="#y2"><code>y2</code></a>
</li>
</ol>
<br> </br><h2><a class=none name="dictionar">The NIL dictionary</a></h2>
<!-- Entry for *BLACK* -->
<p><br>[Special variable]<br><a class=none name='*black*'><b>*black*</b></a>
<blockquote><br>
<p>The <code>COLOR</code> black. </p>
</blockquote>
<!-- End of entry for *BLACK* -->
<!-- Entry for *BLUE* -->
<p><br>[Special variable]<br><a class=none name='*blue*'><b>*blue*</b></a>
<blockquote><br>
<p>The <code>COLOR</code> blue. </p>
</blockquote>
<!-- End of entry for *BLUE* -->
<!-- Entry for *CYAN* -->
<p><br>[Special variable]<br><a class=none name='*cyan*'><b>*cyan*</b></a>
<blockquote><br>
<p>The <code>COLOR</code> cyan. </p>
</blockquote>
<!-- End of entry for *CYAN* -->
<!-- Entry for *DEFAULT-COLOR* -->
<p><br>[Special variable]<br><a class=none name='*default-color*'><b>*default-color*</b></a>
<blockquote><br>
<p>Functions that accept the <code>KEY</code>word parameter <code>COLOR</code> will most likely bind to the symbol <code>*DEFAULT-COLOR*</code> if <code>COLOR</code> is not specified, automatically using whatever color is referenced by <code>*DEFAULT-COLOR*</code>. </p><p>A color is bound to <code>*DEFAULT-COLOR*</code> by the following macro: <a href="#with-color">WITH-COLOR</a>. </p><h5>Example </h5>
<pre><code>(draw-box a-box :surface sdl:default-display* :color sdl:*black*)
(draw-box b-box :surface sdl:default-display* :color sdl:*black*)
(draw-box c-box :surface sdl:default-display* :color sdl:*black*)
(with-surface (disp sdl:*default-display*)
(with-color (col sdl:*black*)
(draw-box a-box)
(draw-box b-box)
(draw-box c-box)))
</code></pre>
</blockquote>
<!-- End of entry for *DEFAULT-COLOR* -->
<!-- Entry for *DEFAULT-DISPLAY* -->
<p><br>[Special variable]<br><a class=none name='*default-display*'><b>*default-display*</b></a>
<blockquote><br>
<p>The symbol <code>*DEFAULT-DISPLAY*</code> is bound to the current display surface <a href="#display-surface">DISPLAY-SURFACE</a>) by the function <a href="#WINDOW">WINDOW</a>). </p>
</blockquote>
<!-- End of entry for *DEFAULT-DISPLAY* -->
<!-- Entry for *DEFAULT-FONT* -->
<p><br>[Special variable]<br><a class=none name='*default-font*'><b>*default-font*</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for *DEFAULT-FONT* -->
<!-- Entry for *DEFAULT-FONT-PATH* -->
<p><br>[Special variable]<br><a class=none name='*default-font-path*'><b>*default-font-path*</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for *DEFAULT-FONT-PATH* -->
<!-- Entry for *DEFAULT-POSITION* -->
<p><br>[Special variable]<br><a class=none name='*default-position*'><b>*default-position*</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for *DEFAULT-POSITION* -->
<!-- Entry for *DEFAULT-RECTANGLE* -->
<p><br>[Special variable]<br><a class=none name='*default-rectangle*'><b>*default-rectangle*</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for *DEFAULT-RECTANGLE* -->
<!-- Entry for *DEFAULT-SURFACE* -->
<p><br>[Special variable]<br><a class=none name='*default-surface*'><b>*default-surface*</b></a>
<blockquote><br>
<p>Functions that accept the <code>KEY</code>word parameter <code>SURFACE</code> will most likely bind to the symbol <code>*DEFAULT-SURFACE*</code> if <code>SURFACE</code> is not specified, automatically using whatever surface is referenced by <code>*DEFAULT-SURFACE*</code>. </p><p>A surface is bound to <code>*DEFAULT-SURFACE*</code> by the following macros: <a href="#with-surface">WITH-SURFACE</a>, and <a href="#with-surfaces">WITH-SURFACES</a>. </p><h5>Example </h5>
<pre><code>(draw-surface surf-1 :surface sdl:*default-display*)
(draw-surface surf-2 :surface sdl:*default-display*)
(draw-surface surf-2 :surface sdl:*default-display*)
(with-surface (disp sdl:*default-display*)
(draw-surface surf-1)
(draw-surface surf-2)
(draw-surface surf-2))
</code></pre>
</blockquote>
<!-- End of entry for *DEFAULT-SURFACE* -->
<!-- Entry for *EXTERNAL-INIT-ON-STARTUP* -->
<p><br>[Special variable]<br><a class=none name='*external-init-on-startup*'><b>*external-init-on-startup*</b></a>
<blockquote><br>
<p>The list of functions that are called from <a href="#init-sdl">INIT-SDL</a>. </p>
</blockquote>
<!-- End of entry for *EXTERNAL-INIT-ON-STARTUP* -->
<!-- Entry for *EXTERNAL-QUIT-ON-EXIT* -->
<p><br>[Special variable]<br><a class=none name='*external-quit-on-exit*'><b>*external-quit-on-exit*</b></a>
<blockquote><br>
<p>The list of functions that are called from <a href="#quit-sdl">QUIT-SDL</a>. </p>
</blockquote>
<!-- End of entry for *EXTERNAL-QUIT-ON-EXIT* -->
<!-- Entry for *FONT-10X20* -->
<p><br>[Special variable]<br><a class=none name='*font-10x20*'><b>*font-10x20*</b></a>
<blockquote><br>
<p>Contains the font data for an 10x20 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-10X20* -->
<!-- Entry for *FONT-5X7* -->
<p><br>[Special variable]<br><a class=none name='*font-5x7*'><b>*font-5x7*</b></a>
<blockquote><br>
<p>Contains the font data for an 5x7 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-5X7* -->
<!-- Entry for *FONT-5X8* -->
<p><br>[Special variable]<br><a class=none name='*font-5x8*'><b>*font-5x8*</b></a>
<blockquote><br>
<p>Contains the font data for an 5x8 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-5X8* -->
<!-- Entry for *FONT-6X10* -->
<p><br>[Special variable]<br><a class=none name='*font-6x10*'><b>*font-6x10*</b></a>
<blockquote><br>
<p>Contains the font data for an 6x10 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-6X10* -->
<!-- Entry for *FONT-6X12* -->
<p><br>[Special variable]<br><a class=none name='*font-6x12*'><b>*font-6x12*</b></a>
<blockquote><br>
<p>Contains the font data for an 6x12 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-6X12* -->
<!-- Entry for *FONT-6X13* -->
<p><br>[Special variable]<br><a class=none name='*font-6x13*'><b>*font-6x13*</b></a>
<blockquote><br>
<p>Contains the font data for an 6x13 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-6X13* -->
<!-- Entry for *FONT-6X13B* -->
<p><br>[Special variable]<br><a class=none name='*font-6x13b*'><b>*font-6x13b*</b></a>
<blockquote><br>
<p>Contains the font data for an 6x13 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-6X13B* -->
<!-- Entry for *FONT-6X13O* -->
<p><br>[Special variable]<br><a class=none name='*font-6x13o*'><b>*font-6x13o*</b></a>
<blockquote><br>
<p>Contains the font data for an 6x13 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-6X13O* -->
<!-- Entry for *FONT-6X9* -->
<p><br>[Special variable]<br><a class=none name='*font-6x9*'><b>*font-6x9*</b></a>
<blockquote><br>
<p>Contains the font data for an 6x9 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-6X9* -->
<!-- Entry for *FONT-7X13* -->
<p><br>[Special variable]<br><a class=none name='*font-7x13*'><b>*font-7x13*</b></a>
<blockquote><br>
<p>Contains the font data for an 7x13 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-7X13* -->
<!-- Entry for *FONT-7X13B* -->
<p><br>[Special variable]<br><a class=none name='*font-7x13b*'><b>*font-7x13b*</b></a>
<blockquote><br>
<p>Contains the font data for an 7x13 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-7X13B* -->
<!-- Entry for *FONT-7X13O* -->
<p><br>[Special variable]<br><a class=none name='*font-7x13o*'><b>*font-7x13o*</b></a>
<blockquote><br>
<p>Contains the font data for an 7x13 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-7X13O* -->
<!-- Entry for *FONT-7X14* -->
<p><br>[Special variable]<br><a class=none name='*font-7x14*'><b>*font-7x14*</b></a>
<blockquote><br>
<p>Contains the font data for an 7x14 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-7X14* -->
<!-- Entry for *FONT-7X14B* -->
<p><br>[Special variable]<br><a class=none name='*font-7x14b*'><b>*font-7x14b*</b></a>
<blockquote><br>
<p>Contains the font data for an 7x14 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-7X14B* -->
<!-- Entry for *FONT-8X13* -->
<p><br>[Special variable]<br><a class=none name='*font-8x13*'><b>*font-8x13*</b></a>
<blockquote><br>
<p>Contains the font data for an 8x13 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-8X13* -->
<!-- Entry for *FONT-8X13B* -->
<p><br>[Special variable]<br><a class=none name='*font-8x13b*'><b>*font-8x13b*</b></a>
<blockquote><br>
<p>Contains the font data for an 8x13 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-8X13B* -->
<!-- Entry for *FONT-8X13O* -->
<p><br>[Special variable]<br><a class=none name='*font-8x13o*'><b>*font-8x13o*</b></a>
<blockquote><br>
<p>Contains the font data for an 8x13 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-8X13O* -->
<!-- Entry for *FONT-8X8* -->
<p><br>[Special variable]<br><a class=none name='*font-8x8*'><b>*font-8x8*</b></a>
<blockquote><br>
<p>Contains the font data for an 8x8 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-8X8* -->
<!-- Entry for *FONT-9X15* -->
<p><br>[Special variable]<br><a class=none name='*font-9x15*'><b>*font-9x15*</b></a>
<blockquote><br>
<p>Contains the font data for an 9x15 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-9X15* -->
<!-- Entry for *FONT-9X15B* -->
<p><br>[Special variable]<br><a class=none name='*font-9x15b*'><b>*font-9x15b*</b></a>
<blockquote><br>
<p>Contains the font data for an 9x15 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-9X15B* -->
<!-- Entry for *FONT-9X18* -->
<p><br>[Special variable]<br><a class=none name='*font-9x18*'><b>*font-9x18*</b></a>
<blockquote><br>
<p>Contains the font data for an 9x18 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-9X18* -->
<!-- Entry for *FONT-9X18B* -->
<p><br>[Special variable]<br><a class=none name='*font-9x18b*'><b>*font-9x18b*</b></a>
<blockquote><br>
<p>Contains the font data for an 9x18 bitmap font. </p>
</blockquote>
<!-- End of entry for *FONT-9X18B* -->
<!-- Entry for *GREEN* -->
<p><br>[Special variable]<br><a class=none name='*green*'><b>*green*</b></a>
<blockquote><br>
<p>The <code>COLOR</code> green. </p>
</blockquote>
<!-- End of entry for *GREEN* -->
<!-- Entry for *MAGENTA* -->
<p><br>[Special variable]<br><a class=none name='*magenta*'><b>*magenta*</b></a>
<blockquote><br>
<p>The <code>COLOR</code> magenta. </p>
</blockquote>
<!-- End of entry for *MAGENTA* -->
<!-- Entry for *OPENGL-CONTEXT* -->
<p><br>[Special variable]<br><a class=none name='*opengl-context*'><b>*opengl-context*</b></a>
<blockquote><br>
<p>The symbol <code>*OPENGL-CONTEXT*</code> is <code>T</code> when an OpenGL display context is created, and <code>NIL</code> otherwise. <a href="#update-surface">UPDATE-SURFACE</a> will call <a href="#sdl-gl-swap-buffers">SDL-GL-SWAP-BUFFERS</a> when <code>*OPENGL-CONTEXT*</code> is <code>T</code>, and <a href="#sdl-flip">SDL-FLIP</a> otherwise. </p>
</blockquote>
<!-- End of entry for *OPENGL-CONTEXT* -->
<!-- Entry for *RED* -->
<p><br>[Special variable]<br><a class=none name='*red*'><b>*red*</b></a>
<blockquote><br>
<p>The <code>COLOR</code> red. </p>
</blockquote>
<!-- End of entry for *RED* -->
<!-- Entry for *SDL-INITIALIZED* -->
<p><br>[Special variable]<br><a class=none name='*sdl-initialized*'><b>*sdl-initialized*</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for *SDL-INITIALIZED* -->
<!-- Entry for *WHITE* -->
<p><br>[Special variable]<br><a class=none name='*white*'><b>*white*</b></a>
<blockquote><br>
<p>The <code>COLOR</code> white. </p>
</blockquote>
<!-- End of entry for *WHITE* -->
<!-- Entry for *YELLOW* -->
<p><br>[Special variable]<br><a class=none name='*yellow*'><b>*yellow*</b></a>
<blockquote><br>
<p>The <code>COLOR</code> yellow. </p>
</blockquote>
<!-- End of entry for *YELLOW* -->
<!-- Entry for A -->
<p><br>[Generic accessor]<br><a class=none name='a'><b>a</b> <i>color</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>a</b> <i>color</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the alpha component of color <code>COLOR</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for A -->
<!-- Entry for A -->
<p><br>[Specialized accessor]<br><a class=none><b>a</b> <i>(color color-a)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>a</b> <i>(color color-a)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the alpha color component of the color <code>COLOR</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for A -->
<!-- Entry for A -->
<p><br>[Method]<br><a class=none><b>a</b> <i>(color color)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns <code>NIL</code> as <code>COLOR</code> has no alpha component. </p>
</blockquote>
<!-- End of entry for A -->
<!-- Entry for ALL-INTEGERS? -->
<p><br>[Macro]<br><a class=none name='all-integers?'><b>all-integers?</b> <i><tt>&rest</tt> values</i> => <i>result</i></a>
<blockquote><br>
<p>Returns <code>T</code> if all values are <code>INTEGERS</code>. </p>
</blockquote>
<!-- End of entry for ALL-INTEGERS? -->
<!-- Entry for ANY-COLOR-BUT-THIS -->
<p><br>[Generic function]<br><a class=none name='any-color-but-this'><b>any-color-but-this</b> <i>color</i> => <i>result</i></a>
<blockquote><br>
<p>Returns a new color that is different to the color <code>COLOR</code>. </p>
</blockquote>
<!-- End of entry for ANY-COLOR-BUT-THIS -->
<!-- Entry for ANY-COLOR-BUT-THIS -->
<p><br>[Method]<br><a class=none><b>any-color-but-this</b> <i>color</i> => <i>result</i></a>
<blockquote><br>
<p>Returns a new color that is different to the color <code>COLOR</code>. </p>
</blockquote>
<!-- End of entry for ANY-COLOR-BUT-THIS -->
<!-- Entry for B -->
<p><br>[Generic accessor]<br><a class=none name='b'><b>b</b> <i>color</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>b</b> <i>color</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the blue component of color <code>COLOR</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for B -->
<!-- Entry for B -->
<p><br>[Specialized accessor]<br><a class=none><b>b</b> <i>(color color)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>b</b> <i>(color color)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the blue color component of the color <code>COLOR</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for B -->
<!-- Entry for BIT-DEPTH -->
<p><br>[Function]<br><a class=none name='bit-depth'><b>bit-depth</b> <i>surface</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the bit depth (the number of bytes per pixel, or bpp) of the surface <code>SURFACE</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for BIT-DEPTH -->
<!-- Entry for BLIT-SURFACE -->
<p><br>[Function]<br><a class=none name='blit-surface'><b>blit-surface</b> <i>src <tt>&optional</tt> surface</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for BLIT-SURFACE -->
<!-- Entry for CACHED-SURFACE -->
<p><br>[Generic accessor]<br><a class=none name='cached-surface'><b>cached-surface</b> <i>sdl-font</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>cached-surface</b> <i>sdl-font</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CACHED-SURFACE -->
<!-- Entry for CACHED-SURFACE -->
<p><br>[Specialized accessor]<br><a class=none><b>cached-surface</b> <i>(sdl-font sdl-font)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>cached-surface</b> <i>(sdl-font sdl-font)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CACHED-SURFACE -->
<!-- Entry for CALCULATE-CURVE -->
<p><br>[Function]<br><a class=none name='calculate-curve'><b>calculate-curve</b> <i>p1 p2 p3 p4 segments</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CALCULATE-CURVE -->
<!-- Entry for CAST -->
<p><br>[Macro]<br><a class=none name='cast'><b>cast</b> <i>type value</i> => <i>result</i></a>
<blockquote><br>
<p>Coerces the value <code>VALUE</code> to the type <code>TYPE</code>. </p>
</blockquote>
<!-- End of entry for CAST -->
<!-- Entry for CAST-ALL-TO-INT -->
<p><br>[Macro]<br><a class=none name='cast-all-to-int'><b>cast-all-to-int</b> <i><tt>&rest</tt> values</i> => <i>result</i></a>
<blockquote><br>
<p>Casts the values in <code>REST</code> to <code>FIXNUM</code>s. </p>
</blockquote>
<!-- End of entry for CAST-ALL-TO-INT -->
<!-- Entry for CAST-TO-INT -->
<p><br>[Macro]<br><a class=none name='cast-to-int'><b>cast-to-int</b> <i>value</i> => <i>result</i></a>
<blockquote><br>
<p>Casts the value <code>VALUE</code> to a <code>FIXNUM</code>. </p>
</blockquote>
<!-- End of entry for CAST-TO-INT -->
<!-- Entry for CATMULL-ROM-SPLINE -->
<p><br>[Function]<br><a class=none name='catmull-rom-spline'><b>catmull-rom-spline</b> <i>val v0 v1 v2 v3</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CATMULL-ROM-SPLINE -->
<!-- Entry for CHAR-HEIGHT -->
<p><br>[Generic function]<br><a class=none name='char-height'><b>char-height</b> <i>bitmap-font</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CHAR-HEIGHT -->
<!-- Entry for CHAR-HEIGHT -->
<p><br>[Method]<br><a class=none><b>char-height</b> <i>(bitmap-font bitmap-font)</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CHAR-HEIGHT -->
<!-- Entry for CHAR-WIDTH -->
<p><br>[Generic function]<br><a class=none name='char-width'><b>char-width</b> <i>bitmap-font</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CHAR-WIDTH -->
<!-- Entry for CHAR-WIDTH -->
<p><br>[Method]<br><a class=none><b>char-width</b> <i>(bitmap-font bitmap-font)</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CHAR-WIDTH -->
<!-- Entry for CHECK-TYPES -->
<p><br>[Macro]<br><a class=none name='check-types'><b>check-types</b> <i>type <tt>&rest</tt> rest</i> => <i>result</i></a>
<blockquote><br>
<p>Performs <code>CHECK-TYPE</code> on items in rest. </p>
</blockquote>
<!-- End of entry for CHECK-TYPES -->
<!-- Entry for CLEAR-CELL -->
<p><br>[Function]<br><a class=none name='clear-cell'><b>clear-cell</b> <i><tt>&key</tt> surface</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CLEAR-CELL -->
<!-- Entry for CLEAR-COLOR-KEY -->
<p><br>[Function]<br><a class=none name='clear-color-key'><b>clear-color-key</b> <i><tt>&key</tt> surface rle-accel</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CLEAR-COLOR-KEY -->
<!-- Entry for CLEAR-DISPLAY -->
<p><br>[Function]<br><a class=none name='clear-display'><b>clear-display</b> <i>color <tt>&key</tt> surface update-p</i> => <i>result</i></a>
<blockquote><br>
<p>Fills the display <code>SURFACE</code> using color <code>COLOR</code>. <code>SURFACE</code> is bound to <code>*DEFAULT-DISPLAY*</code> if unspecified. The display is updated when <code>UPDATE-P</code> is <code>T</code>. </p>
</blockquote>
<!-- End of entry for CLEAR-DISPLAY -->
<!-- Entry for COLOR -->
<p><br>[Standard class]<br><a class=none name='color'><b>color</b></a>
<blockquote><br>
<p>An SDL color containing <code>INTEGER</code> Red, Green and Blue color components. </p>
</blockquote>
<!-- End of entry for COLOR -->
<!-- Entry for COLOR -->
<p><br>[Function]<br><a class=none name='color'><b>color</b> <i><tt>&key</tt> r g b a</i> => <i>result</i></a>
<blockquote><br>
<p>Creates and returns a new <a href="#color">COLOR</a> from the soecified red <code>R</code>, green <code>G</code>, and blue <code>B</code> color components. When <code>A</code> is an <code>INTEGER</code>, will return a new <a href="#color-a">COLOR-A</a> with the alpha transparency. </p>
</blockquote>
<!-- End of entry for COLOR -->
<!-- Entry for COLOR-* -->
<p><br>[Generic function]<br><a class=none name='color-*'><b>color-*</b> <i>color</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the RGB/A components of color as a spread. If <code>COLOR</code> contains an alpha component then <code>RESULT</code> is <code>(VALUES R G B A)</code> If <code>COLOR</code> contains no alpha component then <code>RESULT</code> is <code>(VALUES R G B)</code></p>
</blockquote>
<!-- End of entry for COLOR-* -->
<!-- Entry for COLOR-* -->
<p><br>[Method]<br><a class=none><b>color-*</b> <i>(color foreign-color)</i> => <i>result</i></a>
<blockquote><br>
<p>Not implemented yet. Returns <code>NIL</code></p>
</blockquote>
<!-- End of entry for COLOR-* -->
<!-- Entry for COLOR-* -->
<p><br>[Method]<br><a class=none><b>color-*</b> <i>(color color-a)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the read, green, blue and alpha components of the color <code>COLOR</code> as a spread. </p>
</blockquote>
<!-- End of entry for COLOR-* -->
<!-- Entry for COLOR-* -->
<p><br>[Method]<br><a class=none><b>color-*</b> <i>(color color)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the read, green and blue components of the color <code>COLOR</code> as a spread. </p>
</blockquote>
<!-- End of entry for COLOR-* -->
<!-- Entry for COLOR-A -->
<p><br>[Standard class]<br><a class=none name='color-a'><b>color-a</b></a>
<blockquote><br>
<p>An SDL color containing <code>INTEGER</code> Red, Green, Blue and Alpha color components. </p>
</blockquote>
<!-- End of entry for COLOR-A -->
<!-- Entry for COLOR= -->
<p><br>[Generic function]<br><a class=none name='color='><b>color=</b> <i>color1 color2</i> => <i>result</i></a>
<blockquote><br>
<p>Returns <code>T</code> if colors match, returns <code>NIL</code> otherwise. </p>
</blockquote>
<!-- End of entry for COLOR= -->
<!-- Entry for COLOR= -->
<p><br>[Method]<br><a class=none><b>color=</b> <i>(color1 color-a) (color2 color-a)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns <code>T</code> if the <code>RGBA</code> colors match, returns <code>NIL</code> otherwise. </p>
</blockquote>
<!-- End of entry for COLOR= -->
<!-- Entry for COLOR= -->
<p><br>[Method]<br><a class=none><b>color=</b> <i>(color1 color) (color2 color)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns <code>T</code> if the <code>RGB</code> colors match, returns <code>NIL</code> otherwise. </p>
</blockquote>
<!-- End of entry for COLOR= -->
<!-- Entry for COLOR= -->
<p><br>[Method]<br><a class=none><b>color=</b> <i>color1 color2</i> => <i>result</i></a>
<blockquote><br>
<p>Returns <code>NIL</code>. This is a catch all when an <code>RGB</code> color is compared with an <code>RGBA</code> color. </p>
</blockquote>
<!-- End of entry for COLOR= -->
<!-- Entry for CONVERT-SURFACE -->
<p><br>[Function]<br><a class=none name='convert-surface'><b>convert-surface</b> <i><tt>&key</tt> surface key-color alpha-value free-p</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CONVERT-SURFACE -->
<!-- Entry for COPY-POINT -->
<p><br>[Function]<br><a class=none name='copy-point'><b>copy-point</b> <i>point</i> => <i>result</i></a>
<blockquote><br>
<p>Returns a copy of the point <code>POINT</code>. </p>
</blockquote>
<!-- End of entry for COPY-POINT -->
<!-- Entry for COPY-SURFACE -->
<p><br>[Function]<br><a class=none name='copy-surface'><b>copy-surface</b> <i><tt>&key</tt> surface key-color alpha-value type rle-accel</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for COPY-SURFACE -->
<!-- Entry for CREATE-LIST-IF-NOT -->
<p><br>[Function]<br><a class=none name='create-list-if-not'><b>create-list-if-not</b> <i>var</i> => <i>result</i></a>
<blockquote><br>
<p>If <code>VAR</code> is not already a list, then returns <code>(LIST VAR)</code>. </p>
</blockquote>
<!-- End of entry for CREATE-LIST-IF-NOT -->
<!-- Entry for CREATE-PATH -->
<p><br>[Function]<br><a class=none name='create-path'><b>create-path</b> <i>filename <tt>&optional</tt> path</i> => <i>result</i></a>
<blockquote><br>
<p>Creates a new path from <code>FILENAME</code> and <code>PATH</code>. </p>
</blockquote>
<!-- End of entry for CREATE-PATH -->
<!-- Entry for CREATE-RWOPS-FROM-FILE -->
<p><br>[Function]<br><a class=none name='create-rwops-from-file'><b>create-rwops-from-file</b> <i>filename</i> => <i>result</i></a>
<blockquote><br>
<p>Creates and returns a new <code>RWOPS</code> object from the file at location <code>FILENAME</code>. </p>
</blockquote>
<!-- End of entry for CREATE-RWOPS-FROM-FILE -->
<!-- Entry for CREATE-SURFACE -->
<p><br>[Function]<br><a class=none name='create-surface'><b>create-surface</b> <i>width height <tt>&key</tt> bpp surface key-color alpha-value type rle-accel</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for CREATE-SURFACE -->
<!-- Entry for DISTANCE -->
<p><br>[Function]<br><a class=none name='distance'><b>distance</b> <i>p1 p2</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the distance between the <code>POINT</code>s <code>P1</code> and <code>P2</code>. </p>
</blockquote>
<!-- End of entry for DISTANCE -->
<!-- Entry for DISTANCE-* -->
<p><br>[Function]<br><a class=none name='distance-*'><b>distance-*</b> <i>x1 y1 x2 y2</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the distance between the coordinates <code>X1</code>, <code>Y1</code> and <code>X2</code>, <code>Y2</code>. </p>
</blockquote>
<!-- End of entry for DISTANCE-* -->
<!-- Entry for DRAW-BEZIER -->
<p><br>[Function]<br><a class=none name='draw-bezier'><b>draw-bezier</b> <i>points type <tt>&key</tt> clipping-p surface color segments</i> => <i>result</i></a>
<blockquote><br>
<p>Draw a bezier curve of color <code>COLOR</code> to the surface <code>SURFACE</code>. The shape of the Bezier curve is defined by several control points. A control point is a vertex containing an X and Y coordinate pair. </p><h5>Parameters </h5>
<ul><li><code>VERTICES</code> is the list of control points of type <code>SDL:POINT</code>. </li>
<li><code>TYPE</code> describes the line style used to draw the curve and may be one of <code>:LINE-STRIP</code>, <code>:LINES</code>, or <code>:POINTS</code>. Use <code>:LINE-STRIP</code> to draw a single continuous line through the specified waypoints. Use <code>:LINES</code> to draw a line between alternate waypoint pairs. Use <code>:POINTS</code> to draw a single pixel at each waypoint. </li>
<li><code>SEGMENTS</code> is the number of segments used to draw the curve. Default is 10 segments if unspecified. The greater the number of segments, the smoother the curve. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the line color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>CLIPPING-P</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is therefore safer to leave <code>CLIPPING-P</code> as <code>T</code>. </li>
</ul><h5>Example </h5>
<pre><code>(DRAW-BEZIER (LIST (SDL:POINT :X 60 :Y 40)
(SDL:POINT :X 160 :Y 10)
(SDL:POINT :X 170 :Y 150)
(SDL:POINT :X 60 :Y 150))
:LINE-STRIP)
</code></pre>
</blockquote>
<!-- End of entry for DRAW-BEZIER -->
<!-- Entry for DRAW-BOX -->
<p><br>[Function]<br><a class=none name='draw-box'><b>draw-box</b> <i>rect <tt>&key</tt> clipping-p surface color stroke-color alpha</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-box-*">DRAW-BOX-*</a>. </p><h5>Parameters </h5>
<ul><li><code>RECT</code> is the rectangle to fill, of type <code>SDL:RECTANGLE</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-BOX -->
<!-- Entry for DRAW-BOX-* -->
<p><br>[Function]<br><a class=none name='draw-box-*'><b>draw-box-*</b> <i>x y w h <tt>&key</tt> clipping-p surface color stroke-color alpha</i> => <i>result</i></a>
<blockquote><br>
<p>Draws a filled rectangle of color <code>COLOR</code> to surface <code>SURFACE</code>. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> are the <code>INTEGER</code> coordinates of the top-left corner of the rectangle. </li>
<li><code>W</code> and <code>H</code> are the width and height of the rectangle, of type <code>INTEGER</code>. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the fill color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>STROKE-COLOR</code> when not <code>NIL</code> will draw a <code>1</code> pixel line of color <code>COLOR</code> around the perimiter of the box. </li>
<li><code>ALPHA</code> when between <code>0</code> and <code>255</code> is used as the alpha transparency value when blitting the rectangle onto <code>SURFACE</code>. <EM>Note:</EM> An intermediate surface is created, the rectangle is drawn onto this intermediate surface and then this surface is blitted to <code>SURFACE</code>. </li>
<li><code>CLIPPING-P</code> when <code>T</code> will clip the shape to the dimensions of <code>SURFACE</code>. The default is <code>NIL</code> as the SDL library will perform the necessary clipping automatically. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-BOX-* -->
<!-- Entry for DRAW-CIRCLE -->
<p><br>[Function]<br><a class=none name='draw-circle'><b>draw-circle</b> <i>p1 r <tt>&key</tt> surface color alpha</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-circle-*">DRAW-CIRCLE-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> is the X/Y coordinate of the center of the circle, of type <code>SDL:POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-CIRCLE -->
<!-- Entry for DRAW-CIRCLE-* -->
<p><br>[Function]<br><a class=none name='draw-circle-*'><b>draw-circle-*</b> <i>x0 y0 r <tt>&key</tt> surface color alpha</i> => <i>result</i></a>
<blockquote><br>
<p>Draws a circle circumference of color <code>COLOR</code> to the surface <code>SURFACE</code>. Use <a href="#draw-filled-circle-*">DRAW-FILLED-CIRCLE-*</a> to draw a filled circle. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> specify the center coordinate of the circle, of type <code>INTEGER</code>. </li>
<li><code>R</code> is the circle r, of type <code>INTEGER</code>. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the circumference color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>ALPHA</code> when between <code>0</code> and <code>255</code> is used as the alpha transparency value when blitting the rectangle onto <code>SURFACE</code>. <EM>Note:</EM> An intermediate surface is created, the rectangle is drawn onto this intermediate surface and then this surface is blitted to <code>SURFACE</code>. </li>
<li><code>CLIPPING-P</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is therefore safer to leave <code>CLIPPING-P</code> as <code>T</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-CIRCLE-* -->
<!-- Entry for DRAW-CURVE -->
<p><br>[Function]<br><a class=none name='draw-curve'><b>draw-curve</b> <i>points type <tt>&key</tt> clipping-p surface color segments</i> => <i>result</i></a>
<blockquote><br>
<p>Draw a Cattmul-Rom spline using color <code>COLOR</code> to the surface <code>SURFACE</code>. The shape of the curve is defined by waypoints. A waypoint is a vertex containing an X and Y coordinate pair. </p><h5>Parameters </h5>
<ul><li><code>POINTS</code> is a list of waypoints or vetices for the spline, of type <code>SDL:POINT</code></li>
<li><code>TYPE</code> describes the line style used to draw the curve and may be one of <code>:LINE-STRIP</code>, <code>:LINES</code>, or <code>:POINTS</code>. Use <code>:LINE-STRIP</code> to draw a single continuous line through the specified waypoints. Use <code>:LINES</code> to draw a line between alternate waypoint pairs. Use <code>:POINTS</code> to draw a single pixel at each waypoint. </li>
<li><code>SEGMENTS</code> is the number of segments used to draw the Catmull-Rom spline. Default is 10 segments if unspecified. The greater the number of segments, the smoother the spline. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. </li>
<li><code>COLOR</code> is the line color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>CLIPPING-P</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is therefore safer to leave <code>CLIPPING-P</code> as <code>T</code>. </li>
</ul><h5>Example </h5>
<pre><code>(DRAW-CURVE (LIST (SDL:POINT :X 60 :Y 40)
(SDL:POINT :X 160 :Y 10)
(SDL:POINT :X 170 :Y 150)
(SDL:POINT :X 60 :Y 150))
:LINE-STRIP
10)
</code></pre>
</blockquote>
<!-- End of entry for DRAW-CURVE -->
<!-- Entry for DRAW-FILLED-CIRCLE -->
<p><br>[Function]<br><a class=none name='draw-filled-circle'><b>draw-filled-circle</b> <i>p1 r <tt>&key</tt> surface color stroke-color alpha</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-filled-circle-*">DRAW-FILLED-CIRCLE-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> is the X/Y coordinate of the center of the filled circle, of type <code>SDL:POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FILLED-CIRCLE -->
<!-- Entry for DRAW-FILLED-CIRCLE-* -->
<p><br>[Function]<br><a class=none name='draw-filled-circle-*'><b>draw-filled-circle-*</b> <i>x0 y0 r <tt>&key</tt> surface color stroke-color alpha</i> => <i>result</i></a>
<blockquote><br>
<p>Draws a filled circle of color <code>COLOR</code> to the surface <code>SURFACE</code>. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> specify the center coordinate of the circle, of type <code>INTEGER</code>. </li>
<li><code>R</code> is the circle radius, of type <code>INTEGER</code>. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the fill color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>STROKE-COLOR</code> when not <code>NIL</code> will draw a <code>1</code> pixel line of color <code>COLOR</code> around the perimiter of the circle </li>
<li><code>ALPHA</code> when between <code>0</code> and <code>255</code> is used as the alpha transparency value when blitting the rectangle onto <code>SURFACE</code>. <EM>Note:</EM> An intermediate surface is created, the rectangle is drawn onto this intermediate surface and then this surface is blitted to <code>SURFACE</code>. </li>
<li><code>CLIPPING-P</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is therefore safer to leave <code>CLIPPING-P</code> as <code>T</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FILLED-CIRCLE-* -->
<!-- Entry for DRAW-FONT -->
<p><br>[Generic function]<br><a class=none name='draw-font'><b>draw-font</b> <i><tt>&key</tt> font surface</i> => <i>result</i></a>
<blockquote><br>
<p>Blit the cached surface in the font <code>FONT</code> to the destination surface <code>SURFACE</code>. The cached surface is created during a previous call to any of the DRAW-STRING* functions. Uses the <code>POSITION</code> of the cached surface to render at X/Y coordinates on the destination <code>SURFACE</code>. This function can provide a speed increase upon redraws when the text in <code>FONT</code> remains unchanged between screen updates. </p>
</blockquote>
<!-- End of entry for DRAW-FONT -->
<!-- Entry for DRAW-FONT -->
<p><br>[Function]<br><a class=none name='draw-font'><b>draw-font</b> <i><tt>&key</tt> font surface</i> => <i>result</i></a>
<blockquote><br>
<p>Blit the cached surface in the font <code>FONT</code> to the destination surface <code>SURFACE</code>. The cached surface is created during a previous call to any of the DRAW-STRING* functions. Uses the <code>POSITION</code> of the cached surface to render at X/Y coordinates on the destination <code>SURFACE</code>. This function can provide a speed increase upon redraws when the text in <code>FONT</code> remains unchanged between screen updates. </p>
</blockquote>
<!-- End of entry for DRAW-FONT -->
<!-- Entry for DRAW-FONT-AT -->
<p><br>[Generic function]<br><a class=none name='draw-font-at'><b>draw-font-at</b> <i>position <tt>&key</tt> font surface</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-font">DRAW-FONT</a>. </p><h5>Parameters </h5>
<ul><li><code>POINT</code> is the <code>X</code> and <code>Y</code> coordinates of the the <code>FONT</code>s cached surface, of type <code>POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FONT-AT -->
<!-- Entry for DRAW-FONT-AT -->
<p><br>[Method]<br><a class=none><b>draw-font-at</b> <i>position <tt>&key</tt> font surface</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-font">DRAW-FONT</a>. </p><ul><li><code>POINT</code> is the X/Y position of the the font's cached surface. <code>POINT</code> is of type <code>POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FONT-AT -->
<!-- Entry for DRAW-FONT-AT-* -->
<p><br>[Generic function]<br><a class=none name='draw-font-at-*'><b>draw-font-at-*</b> <i>x y <tt>&key</tt> font surface</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-font">DRAW-FONT</a></p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> are the <code>INTEGER</code> position coordinates of the <code>FONT</code>s cached surface. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FONT-AT-* -->
<!-- Entry for DRAW-FONT-AT-* -->
<p><br>[Method]<br><a class=none><b>draw-font-at-*</b> <i>x y <tt>&key</tt> font surface</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-font">DRAW-FONT</a>. </p><h5>Parameters </h5>
<ul><li><code>POINT</code> is the <code>X</code> and <code>Y</code> coordinates of the the <code>FONT</code>s cached surface, of type <code>POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-FONT-AT-* -->
<!-- Entry for DRAW-HLINE -->
<p><br>[Function]<br><a class=none name='draw-hline'><b>draw-hline</b> <i>x0 x1 y <tt>&key</tt> surface color clipping-p</i> => <i>result</i></a>
<blockquote><br>
<p>Draw a horizontal line of color <code>COLOR</code> from <code>X0</code> to <code>X1</code> through <code>Y</code> onto the surface <code>SURFACE</code>. </p><h5>Parameters </h5>
<ul><li><code>X0</code> and <code>X1</code> are the horizontal start and end points of the line, of type <code>INTEGER</code>. </li>
<li><code>Y</code> is the vertical <code>INTEGER</code> coordinate that the horizontal line must intersect. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the line color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>CLIPPING-P</code> when <code>T</code> will clip the shape to the dimensions of <code>SURFACE</code>. The default is <code>NIL</code> as the SDL library will perform the necessary clipping automatically. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-HLINE -->
<!-- Entry for DRAW-LINE -->
<p><br>[Function]<br><a class=none name='draw-line'><b>draw-line</b> <i>p1 p2 <tt>&key</tt> surface color clipping-p</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-line-*">DRAW-LINE-*</a>. </p><h5>Parameters </h5>
<ul><li><code>POINT1</code> and <code>POINT2</code> are the start and end x/y co-ordinates of the line, of type <code>SDL:POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-LINE -->
<!-- Entry for DRAW-LINE-* -->
<p><br>[Function]<br><a class=none name='draw-line-*'><b>draw-line-*</b> <i>x0 y0 x1 y1 <tt>&key</tt> surface color clipping-p</i> => <i>result</i></a>
<blockquote><br>
<p>Draws a line of color <code>COLOR</code> to the surface <code>SURFACE</code>. </p><h5>Parameters </h5>
<ul><li><code>X0</code><code>Y0</code> are the start X/Y coordinates of the line, of type <code>INTEGER</code>. </li>
<li><code>X1</code><code>Y1</code> are the end X/Y coordinates of the line, of type <code>INTEGER</code>. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the line color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>CLIPPING-P</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is therefore safer to leave <code>CLIPPING-P</code> as <code>T</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-LINE-* -->
<!-- Entry for DRAW-POINT -->
<p><br>[Function]<br><a class=none name='draw-point'><b>draw-point</b> <i>point <tt>&key</tt> clipping-p surface color</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-point-*">DRAW-POINT-*</a>. </p><h5>Parameters </h5>
<ul><li><code>POSITION</code> is the <code>X</code>/<code>Y</code> coordinates of the pixel, of type <code>POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-POINT -->
<!-- Entry for DRAW-POINT-* -->
<p><br>[Function]<br><a class=none name='draw-point-*'><b>draw-point-*</b> <i>x y <tt>&key</tt> clipping-p surface color</i> => <i>result</i></a>
<blockquote><br>
<p>Draw a single pixel of color <code>COLOR</code> to the surface <code>SURFACE</code> at the specified <code>X</code> and <code>Y</code> coordiates. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> specify the coordinates of the pixel, and are of type <code>INTEGER</code>. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the pixel color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>CLIPPING-P</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is therefore safer to leave <code>CLIPPING-P</code> as <code>T</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-POINT-* -->
<!-- Entry for DRAW-POLYGON -->
<p><br>[Function]<br><a class=none name='draw-polygon'><b>draw-polygon</b> <i>vertices <tt>&key</tt> surface color clipping-p</i> => <i>result</i></a>
<blockquote><br>
<p>Draw the circumference of a polygon of color <code>COLOR</code> to surface SURFACE using the vertices in <code>POINTS</code>. Use <a href="#draw-filled-polygon-*">DRAW-FILLED-POLYGON-*</a> to draw a filled polygon. </p><h5>Parameters </h5>
<ul><li><code>POINTS</code> is the list of vertices for the polygon. <code>POINTS</code> is a list of <code>SDL:POINT</code>s. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the circumference color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>CLIPPING-P</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is therefore safer to leave <code>CLIPPING-P</code> as <code>T</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-POLYGON -->
<!-- Entry for DRAW-RECTANGLE -->
<p><br>[Function]<br><a class=none name='draw-rectangle'><b>draw-rectangle</b> <i>rect <tt>&key</tt> clipping-p surface color alpha</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-rectangle-*">DRAW-RECTANGLE-*</a>. </p><h5>Parameters </h5>
<ul><li><code>RECT</code> is the rectangle to draw, of type <code>SDL:RECTANGLE</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-RECTANGLE -->
<!-- Entry for DRAW-RECTANGLE-* -->
<p><br>[Function]<br><a class=none name='draw-rectangle-*'><b>draw-rectangle-*</b> <i>x y w h <tt>&key</tt> clipping-p surface color alpha</i> => <i>result</i></a>
<blockquote><br>
<p>Draw a rectangle outline of color <code>COLOR</code> to the surface <code>SURFACE</code>. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> are the <code>INTEGER</code> coordinates of the top-left corner of the rectangle. </li>
<li><code>W</code> and <code>H</code> are the width and height of the rectangle, of type <code>INTEGER</code>. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the line color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>ALPHA</code> when between <code>0</code> and <code>255</code> is used as the alpha transparency value when blitting the rectangle onto <code>SURFACE</code>. <EM>Note:</EM> An intermediate surface is created, the rectangle is drawn onto this intermediate surface and then this surface is blitted to <code>SURFACE</code>. </li>
<li><code>CLIPPING-P</code> when <code>T</code> will clip the shape to the dimensions of <code>SURFACE</code>. The default is <code>NIL</code> as the SDL library will perform the necessary clipping automatically. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-RECTANGLE-* -->
<!-- Entry for DRAW-SHAPE -->
<p><br>[Function]<br><a class=none name='draw-shape'><b>draw-shape</b> <i>points type <tt>&key</tt> clipping-p surface color</i> => <i>result</i></a>
<blockquote><br>
<p>Draw a polygon of color <code>COLOR</code> to the surface <code>SURFACE</code> using the vertices in <code>POINTS</code>. </p><h5>Parameters </h5>
<ul><li><code>POINTS</code> is a list of vertices, of type <code>SDL:POINT</code></li>
<li><code>TYPE</code> describes the line style used to draw the polygon and may be one of <code>:LINE-STRIP</code>, <code>:LINES</code>, or <code>:POINTS</code>. Use <code>:LINE-STRIP</code> to draw a single continuous line through the specified waypoints. Use <code>:LINES</code> to draw a line between alternate waypoint pairs. Use <code>:POINTS</code> to draw a single pixel at each waypoint. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the line color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>CLIPPING-P</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is therefore safer to leave <code>CLIPPING-P</code> as <code>T</code>. </li>
</ul><h5>Example </h5>
<pre><code>(DRAW-SHAPE (LIST (SDL:POINT :X 60 :Y 40)
(SDL:POINT :X 160 :Y 10)
(SDL:POINT :X 170 :Y 150)
(SDL:POINT :X 60 :Y 150))
:LINE-STRIP)
</code></pre>
</blockquote>
<!-- End of entry for DRAW-SHAPE -->
<!-- Entry for DRAW-STRING-SHADED -->
<p><br>[Function]<br><a class=none name='draw-string-shaded'><b>draw-string-shaded</b> <i>string p1 fg-color bg-color <tt>&key</tt> justify surface font</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-string-shaded-*">DRAW-STRING-SHADED-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> is the <code>X</code> and <code>Y</code> coordinates to render the text, of type <code>SDL:POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-STRING-SHADED -->
<!-- Entry for DRAW-STRING-SHADED-* -->
<p><br>[Function]<br><a class=none name='draw-string-shaded-*'><b>draw-string-shaded-*</b> <i>string x y fg-color bg-color <tt>&key</tt> justify surface font</i> => <i>result</i></a>
<blockquote><br>
<p>Draw text <code>STRING</code> at location <code>X</code><code>Y</code> using font <code>FONT</code> with text color <code>FG-COLOR</code> and background color <code>BG-COLOR</code> onto surface <code>SURFACE</code>. The surface background is filled with <code>BG-COLOR</code> so the surface cannot be keyed over other surfaces. </p><ul><li><code>STRING</code> is the text to render. </li>
<li><code>X</code> and <code>Y</code> are the <code>X</code> and <code>Y</code> coordinates, as <code>INTEGERS</code>. </li>
<li><code>FG-COLOR</code> color is the text color, of type <code>SDL-COLOR</code></li>
<li><code>BG-COLOR</code> color is the background color used to fill the surface <code>SURFACE</code>, of type <code>SDL-COLOR</code></li>
<li><code>FONT</code> is the font face used to render the text. Of type <code>FONT</code>. Bound to <code>*DEFAULT-FONT*</code> if unspecified. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL-SURFACE</code>. Bound to <code>*DEFAULT-SURFACE*</code> if unspecified. </li>
</ul><h5>Returns </h5>
<ul><li>Returns the surface <code>SURFACE</code>. </li>
</ul><h5>Example </h5>
<pre><code>(DRAW-STRING-SHADED-* &quot;Hello World!&quot; 0 0 F-COLOR B-COLOR :SURFACE A-SURFACE)
</code></pre>
</blockquote>
<!-- End of entry for DRAW-STRING-SHADED-* -->
<!-- Entry for DRAW-STRING-SOLID -->
<p><br>[Function]<br><a class=none name='draw-string-solid'><b>draw-string-solid</b> <i>string p1 <tt>&key</tt> justify surface font color</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#draw-string-solid-*">DRAW-STRING-SOLID-*</a>. </p><h5>Parameters </h5>
<ul><li><code>P1</code> is the <code>X</code> and <code>X</code> coordinates to render the text, of type <code>POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-STRING-SOLID -->
<!-- Entry for DRAW-STRING-SOLID-* -->
<p><br>[Function]<br><a class=none name='draw-string-solid-*'><b>draw-string-solid-*</b> <i>string x y <tt>&key</tt> justify surface font color</i> => <i>result</i></a>
<blockquote><br>
<p>Draw text <code>STRING</code> at location <code>X</code><code>Y</code> using font <code>FONT</code> with color <code>COLOR</code> onto surface <code>SURFACE</code>. The text is keyed onto <code>SURFACE</code>. </p><h5>Parameters </h5>
<ul><li><code>STRING</code> is the text to render. </li>
<li><code>X</code> and <code>Y</code> are the <code>X</code> and <code>Y</code> position coordinates, as <code>INTEGERS</code>. </li>
<li><code>FONT</code> is the font face used to render the string. Of type <code>FONT</code>. Bound to <code>*DEFAULT-FONT*</code> if unspecified. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL-SURFACE</code>. Bound to <code>*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> color is the text color, of type <code>SDL-COLOR</code>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns the surface <code>SURFACE</code>. </li>
</ul><h5>Example </h5>
<pre><code>(DRAW-STRING-SOLID-* &quot;Hello World!&quot; 0 0 :SURFACE A-SURFACE :COLOR A-COLOR)
</code></pre>
</blockquote>
<!-- End of entry for DRAW-STRING-SOLID-* -->
<!-- Entry for DRAW-SURFACE -->
<p><br>[Function]<br><a class=none name='draw-surface'><b>draw-surface</b> <i>src <tt>&key</tt> surface</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for DRAW-SURFACE -->
<!-- Entry for DRAW-SURFACE-AT -->
<p><br>[Function]<br><a class=none name='draw-surface-at'><b>draw-surface-at</b> <i>src point <tt>&key</tt> surface</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for DRAW-SURFACE-AT -->
<!-- Entry for DRAW-SURFACE-AT-* -->
<p><br>[Function]<br><a class=none name='draw-surface-at-*'><b>draw-surface-at-*</b> <i>src x y <tt>&key</tt> surface</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for DRAW-SURFACE-AT-* -->
<!-- Entry for DRAW-TRIGON -->
<p><br>[Function]<br><a class=none name='draw-trigon'><b>draw-trigon</b> <i>p1 p2 p3 <tt>&key</tt> surface color clipping-p</i> => <i>result</i></a>
<blockquote><br>
<p>Draw the outline of a trigon or triangle, of color <code>COLOR</code> to surface <code>SURFACE</code>. Use <a href="#draw-filled-trigon-*">DRAW-FILLED-TRIGON-*</a> to draw a filled trigon. </p><h5>Parameters </h5>
<ul><li><code>P1</code>, <code>P2</code> and <code>P3</code> specify the vertices of the trigon, of type <code>SDL:POINT</code>. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the circumference color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>CLIPPING-P</code> when left as the default value <code>T</code> will ensure that the shape is clipped to the dimensions of <code>SURFACE</code>. SDL will core dump if pixels are drawn outside a surface. It is therefore safer to leave <code>CLIPPING-P</code> as <code>T</code>. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-TRIGON -->
<!-- Entry for DRAW-VLINE -->
<p><br>[Function]<br><a class=none name='draw-vline'><b>draw-vline</b> <i>x y0 y1 <tt>&key</tt> surface color clipping-p</i> => <i>result</i></a>
<blockquote><br>
<p>Draw a vertical line of color <code>COLOR</code> from <code>Y0</code> to <code>Y1</code> through <code>X</code> onto the surface <code>SURFACE</code>. </p><h5>Parameters </h5>
<ul><li><code>X</code> is the horizontal <code>INTEGER</code> coordinate that the vertical line must intersect. </li>
<li><code>Y0</code> and <code>Y1</code> are the vertical start and end points of the line, of type <code>INTEGER</code>. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the line color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
<li><code>CLIPPING-P</code> when <code>T</code> will clip the shape to the dimensions of <code>SURFACE</code>. The default is <code>NIL</code> as the SDL library will perform the necessary clipping automatically. </li>
</ul>
</blockquote>
<!-- End of entry for DRAW-VLINE -->
<!-- Entry for FILL-SURFACE -->
<p><br>[Function]<br><a class=none name='fill-surface'><b>fill-surface</b> <i>color <tt>&key</tt> template surface update-p clipping-p</i> => <i>result</i></a>
<blockquote><br>
<p>fill the entire surface with the specified R G B A color. Use :template to specify the SDL<STRONG>Rect to be used as the fill template. Use :update-p to call SDL</STRONG>UpdateRect, using :template if provided. This allows for a 'dirty recs' screen update. </p>
</blockquote>
<!-- End of entry for FILL-SURFACE -->
<!-- Entry for FILL-SURFACE-* -->
<p><br>[Function]<br><a class=none name='fill-surface-*'><b>fill-surface-*</b> <i>color x y w h <tt>&key</tt> surface update-p clipping-p</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FILL-SURFACE-* -->
<!-- Entry for FLOOD-FILL -->
<p><br>[Function]<br><a class=none name='flood-fill'><b>flood-fill</b> <i>point <tt>&key</tt> surface color</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#flood-fill-*">FLOOD-FILL-*</a>. </p><h5>Parameters </h5>
<ul><li>POINT is the position to state the fill, of type <code>POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for FLOOD-FILL -->
<!-- Entry for FLOOD-FILL-* -->
<p><br>[Function]<br><a class=none name='flood-fill-*'><b>flood-fill-*</b> <i>x y <tt>&key</tt> surface color</i> => <i>result</i></a>
<blockquote><br>
<p>Performs a flood fill of surface <code>SURFACE</code> with color <code>COLOR</code>. The fill starts at the position specified by the <code>X</code> and <code>Y</code> coordinates. Uses a stack based flood fill that does a lot of consing because it uses PUSH/POP as the stack. This function is fast. </p><h5>Parameters </h5>
<ul><li><code>X</code> and <code>Y</code> are <code>INTEGER</code> coordinates. </li>
<li><code>SURFACE</code> is the target surface, of type <code>SDL:SDL-SURFACE</code>. Bound to <code>SDL:*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>COLOR</code> is the fill color, of type <code>SDL:COLOR</code> or <code>SDL:COLOR-A</code>. Bound to <code>SDL:*DEFAULT-COLOR*</code> if unspecified. </li>
</ul>
</blockquote>
<!-- End of entry for FLOOD-FILL-* -->
<!-- Entry for FLOOD-FILL-STACK -->
<p><br>[Function]<br><a class=none name='flood-fill-stack'><b>flood-fill-stack</b> <i>point <tt>&key</tt> surface color</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#flood-fill-stack-*">FLOOD-FILL-STACK-*</a>. </p><h5>Parameters </h5>
<ul><li>POINT is the position to state the fill, of type <code>POINT</code>. </li>
</ul>
</blockquote>
<!-- End of entry for FLOOD-FILL-STACK -->
<!-- Entry for FLOOD-FILL-STACK-* -->
<p><br>[Function]<br><a class=none name='flood-fill-stack-*'><b>flood-fill-stack-*</b> <i>x y <tt>&key</tt> surface color</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#flood-fill-*">FLOOD-FILL-*</a>. </p><p><code>FLOOD-FILL-STACK-*</code> is maintains an internal array-based stack. </p><p><EM>Note</EM>: More of an experiment to see if an array would be faster than a bunch of consing. The timing of both functions indicates they run at the same speed. With compiler declarations it may have better results. Another disadvantage to this is it preallocates the stack, chewing up quite a bit of ram. </p>
</blockquote>
<!-- End of entry for FLOOD-FILL-STACK-* -->
<!-- Entry for FP -->
<p><br>[Generic accessor]<br><a class=none name='fp'><b>fp</b> <i>object</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>fp</b> <i>rwops</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the default foreign object for <code>OBJECT</code>. </p>
</blockquote>
<!-- End of entry for FP -->
<!-- Entry for FP -->
<p><br>[Method]<br><a class=none><b>fp</b> <i>(object sdl-font)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the cached surface <code>SURFACE</code> in <code>FONT</code>, or <code>NIL</code> if the font does not contain a cached surface. </p>
</blockquote>
<!-- End of entry for FP -->
<!-- Entry for FP -->
<p><br>[Specialized accessor]<br><a class=none><b>fp</b> <i>(object rwops)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>fp</b> <i>(rwops rwops)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FP -->
<!-- Entry for FP -->
<p><br>[Specialized accessor]<br><a class=none><b>fp</b> <i>(object rectangle-array)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>fp</b> <i>(rwops rectangle-array)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FP -->
<!-- Entry for FP -->
<p><br>[Method]<br><a class=none><b>fp</b> <i>(object sdl-surface)</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FP -->
<!-- Entry for FP -->
<p><br>[Specialized accessor]<br><a class=none><b>fp</b> <i>(object rectangle)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>fp</b> <i>(rwops rectangle)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FP -->
<!-- Entry for FP -->
<p><br>[Specialized accessor]<br><a class=none><b>fp</b> <i>(object foreign-color)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>fp</b> <i>(rwops foreign-color)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FP -->
<!-- Entry for FP -->
<p><br>[Specialized accessor]<br><a class=none><b>fp</b> <i>(object color-a)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>fp</b> <i>(rwops color-a)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FP -->
<!-- Entry for FP -->
<p><br>[Specialized accessor]<br><a class=none><b>fp</b> <i>(object color)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>fp</b> <i>(rwops color)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FP -->
<!-- Entry for FP-CELL -->
<p><br>[Generic accessor]<br><a class=none name='fp-cell'><b>fp-cell</b> <i>sdl-surface</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>fp-cell</b> <i>sdl-surface</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FP-CELL -->
<!-- Entry for FP-CELL -->
<p><br>[Specialized accessor]<br><a class=none><b>fp-cell</b> <i>(sdl-surface sdl-surface)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>fp-cell</b> <i>(sdl-surface sdl-surface)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FP-CELL -->
<!-- Entry for FP-POSITION -->
<p><br>[Generic function]<br><a class=none name='fp-position'><b>fp-position</b> <i>object</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the default foreign SDL_Rect object for <code>OBJECT</code>. </p>
</blockquote>
<!-- End of entry for FP-POSITION -->
<!-- Entry for FP-POSITION -->
<p><br>[Method]<br><a class=none><b>fp-position</b> <i>(object sdl-font)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code> and <code>Y</code> coordinates of the cached surface <code>SURFACE</code> in <code>FONT</code>, as <code>POINT</code>. </p>
</blockquote>
<!-- End of entry for FP-POSITION -->
<!-- Entry for FP-POSITION -->
<p><br>[Method]<br><a class=none><b>fp-position</b> <i>(object sdl-surface)</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FP-POSITION -->
<!-- Entry for FRAME-RATE -->
<p><br>[Function]<br><a class=none name='frame-rate'><b>frame-rate</b> <i></i> => <i>result</i></a>
<blockquote><br>
<p>Returns the specified frame rate, not the actual frame rate. </p>
</blockquote>
<!-- End of entry for FRAME-RATE -->
<!-- Entry for FREE-CACHED-SURFACE -->
<p><br>[Generic function]<br><a class=none name='free-cached-surface'><b>free-cached-surface</b> <i>font</i> => <i>result</i></a>
<blockquote><br>
<p>Frees resources allocated to the cached surface <code>SURFACE</code> in <code>FONT</code>, if any. Sets the <code>FONT</code>s <code>CACHED-SURFACE</code> slot to NIL. </p>
</blockquote>
<!-- End of entry for FREE-CACHED-SURFACE -->
<!-- Entry for FREE-CACHED-SURFACE -->
<p><br>[Method]<br><a class=none><b>free-cached-surface</b> <i>(font sdl-font)</i> => <i>result</i></a>
<blockquote><br>
<p>Frees resources allocated to the cached surface <code>SURFACE</code> in <code>FONT</code>, if any. Sets the <code>FONT</code>s <code>CACHED-SURFACE</code> slot to NIL. </p>
</blockquote>
<!-- End of entry for FREE-CACHED-SURFACE -->
<!-- Entry for FREE-COLOR -->
<p><br>[Generic function]<br><a class=none name='free-color'><b>free-color</b> <i>color</i> => <i>result</i></a>
<blockquote><br>
<p>Free's resources allocated to COLOR. Meant specifically for the SDL_Color foreign object. <code>COLOR</code> and <code>COLOR-A</code> are ignored. </p>
</blockquote>
<!-- End of entry for FREE-COLOR -->
<!-- Entry for FREE-COLOR -->
<p><br>[Method]<br><a class=none><b>free-color</b> <i>(color foreign-color)</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FREE-COLOR -->
<!-- Entry for FREE-COLOR -->
<p><br>[Method]<br><a class=none><b>free-color</b> <i>(color sdl-color)</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FREE-COLOR -->
<!-- Entry for FREE-FONT -->
<p><br>[Generic function]<br><a class=none name='free-font'><b>free-font</b> <i>font</i> => <i>result</i></a>
<blockquote><br>
<p>Free's the resources allocated to the <code>FONT</code>. </p>
</blockquote>
<!-- End of entry for FREE-FONT -->
<!-- Entry for FREE-FONT -->
<p><br>[Method]<br><a class=none><b>free-font</b> <i>(font bitmap-font)</i> => <i>result</i></a>
<blockquote><br>
<p>Free resources associated with the bitmap font <code>FONT</code>. </p>
</blockquote>
<!-- End of entry for FREE-FONT -->
<!-- Entry for FREE-FONT -->
<p><br>[Method]<br><a class=none><b>free-font</b> <i>(font sdl-font)</i> => <i>result</i></a>
<blockquote><br>
<p>Free's the resources allocated to the <code>FONT</code>. </p>
</blockquote>
<!-- End of entry for FREE-FONT -->
<!-- Entry for FREE-RECTANGLE -->
<p><br>[Generic function]<br><a class=none name='free-rectangle'><b>free-rectangle</b> <i>rectangle</i> => <i>result</i></a>
<blockquote><br>
<p>Free's the resources allocated to <code>RECTANGLE</code>. Specifically free's the wrapped SDL_Rect foreign object. </p>
</blockquote>
<!-- End of entry for FREE-RECTANGLE -->
<!-- Entry for FREE-RECTANGLE -->
<p><br>[Method]<br><a class=none><b>free-rectangle</b> <i>(rectangle rectangle)</i> => <i>result</i></a>
<blockquote><br>
<p>Frees the resources allocated to the rectangle <code>RECTANGLE</code>. </p>
</blockquote>
<!-- End of entry for FREE-RECTANGLE -->
<!-- Entry for FREE-RECTANGLE -->
<p><br>[Method]<br><a class=none><b>free-rectangle</b> <i>(rectangle null-rectangle)</i> => <i>result</i></a>
<blockquote><br>
<p>Does nothing. A <code>NULL-RECTANGLE</code> cannot be freed. </p>
</blockquote>
<!-- End of entry for FREE-RECTANGLE -->
<!-- Entry for FREE-RWOPS -->
<p><br>[Generic function]<br><a class=none name='free-rwops'><b>free-rwops</b> <i>rwops</i> => <i>result</i></a>
<blockquote><br>
<p>Free's the resources allocated to <code>RWOPS</code>. Specifically free's the wrapped SDL_rwops foreign object. </p>
</blockquote>
<!-- End of entry for FREE-RWOPS -->
<!-- Entry for FREE-RWOPS -->
<p><br>[Method]<br><a class=none><b>free-rwops</b> <i>(rwops rwops)</i> => <i>result</i></a>
<blockquote><br>
<p>Free's the wrapped foreign SDL_rwops object. </p>
</blockquote>
<!-- End of entry for FREE-RWOPS -->
<!-- Entry for FREE-SURFACE -->
<p><br>[Generic function]<br><a class=none name='free-surface'><b>free-surface</b> <i>surface</i> => <i>result</i></a>
<blockquote><br>
<p>Free's the resources allocated to <code>SURFACE</code>. Specifically free's the wrapped SDL_Surface foreign object. </p>
</blockquote>
<!-- End of entry for FREE-SURFACE -->
<!-- Entry for FREE-SURFACE -->
<p><br>[Method]<br><a class=none><b>free-surface</b> <i>(surface surface)</i> => <i>result</i></a>
<blockquote><br>
<p>Free the foreign SDL<STRONG>Surface and the SDL</STRONG>Rect used for position. Also free the SDL_Rect used as the cell mask. </p>
</blockquote>
<!-- End of entry for FREE-SURFACE -->
<!-- Entry for FREE-SURFACE -->
<p><br>[Method]<br><a class=none><b>free-surface</b> <i>(surface sdl-surface)</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for FREE-SURFACE -->
<!-- Entry for G -->
<p><br>[Generic accessor]<br><a class=none name='g'><b>g</b> <i>color</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>g</b> <i>color</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the green component of color <code>COLOR</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for G -->
<!-- Entry for G -->
<p><br>[Specialized accessor]<br><a class=none><b>g</b> <i>(color color)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>g</b> <i>(color color)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the green color component of the color <code>COLOR</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for G -->
<!-- Entry for GET-CLIP-RECT -->
<p><br>[Function]<br><a class=none name='get-clip-rect'><b>get-clip-rect</b> <i><tt>&key</tt> surface rectangle</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for GET-CLIP-RECT -->
<!-- Entry for GET-NATIVE-WINDOW -->
<p><br>[Function]<br><a class=none name='get-native-window'><b>get-native-window</b> <i></i> => <i>result</i></a>
<blockquote><br>
<p>Returns a foreign pointer to the native SDL display window. </p>
</blockquote>
<!-- End of entry for GET-NATIVE-WINDOW -->
<!-- Entry for GET-POINT -->
<p><br>[Generic function]<br><a class=none name='get-point'><b>get-point</b> <i>object</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code> and <code>Y</code> coordinates of object <code>OBJ</code> as a <code>POINT</code>. </p>
</blockquote>
<!-- End of entry for GET-POINT -->
<!-- Entry for GET-POINT -->
<p><br>[Method]<br><a class=none><b>get-point</b> <i>(object sdl-surface)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code> and <code>Y</code> position coordinates of the surface <code>SURFACE</code> as a <code>POINT</code>. </p>
</blockquote>
<!-- End of entry for GET-POINT -->
<!-- Entry for GET-POINT -->
<p><br>[Method]<br><a class=none><b>get-point</b> <i>(object rectangle)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code> and <code>Y</code> coordinates of rectangle <code>RECTANGLE</code> as a <code>POINT</code>. </p>
</blockquote>
<!-- End of entry for GET-POINT -->
<!-- Entry for GET-POINT -->
<p><br>[Method]<br><a class=none><b>get-point</b> <i>(object vector)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the point <code>POINT</code>. </p>
</blockquote>
<!-- End of entry for GET-POINT -->
<!-- Entry for GET-POSITION -->
<p><br>[Generic function]<br><a class=none name='get-position'><b>get-position</b> <i>object</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#get-POINT">GET-POINT</a></p>
</blockquote>
<!-- End of entry for GET-POSITION -->
<!-- Entry for GET-POSITION -->
<p><br>[Method]<br><a class=none><b>get-position</b> <i>(object sdl-surface)</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#get-point">GET-POINT</a>. </p>
</blockquote>
<!-- End of entry for GET-POSITION -->
<!-- Entry for GET-POSITION -->
<p><br>[Method]<br><a class=none><b>get-position</b> <i>(object rectangle)</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#get-POINT">GET-POINT</a></p>
</blockquote>
<!-- End of entry for GET-POSITION -->
<!-- Entry for GET-RECTANGLE -->
<p><br>[Generic function]<br><a class=none name='get-rectangle'><b>get-rectangle</b> <i>rectangle</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for GET-RECTANGLE -->
<!-- Entry for GET-RECTANGLE -->
<p><br>[Method]<br><a class=none><b>get-rectangle</b> <i>(rectangle rectangle)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the rectangle <code>RECTANGLE</code>. </p>
</blockquote>
<!-- End of entry for GET-RECTANGLE -->
<!-- Entry for GET-SURFACE-RECT -->
<p><br>[Function]<br><a class=none name='get-surface-rect'><b>get-surface-rect</b> <i><tt>&key</tt> surface rectangle</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for GET-SURFACE-RECT -->
<!-- Entry for HEIGHT -->
<p><br>[Generic accessor]<br><a class=none name='height'><b>height</b> <i>obj</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>height</b> <i>obj</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the height of the object. </p>
</blockquote>
<!-- End of entry for HEIGHT -->
<!-- Entry for HEIGHT -->
<p><br>[Specialized accessor]<br><a class=none><b>height</b> <i>(obj sdl-font)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>height</b> <i>(obj sdl-font)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the <code>INTEGER</code> height of the cached surface <code>SURFACE</code> in <code>FONT</code>. </p>
</blockquote>
<!-- End of entry for HEIGHT -->
<!-- Entry for HEIGHT -->
<p><br>[Specialized accessor]<br><a class=none><b>height</b> <i>(obj sdl-surface)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>height</b> <i>(obj sdl-surface)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the height of the surface <code>SURFACE</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for HEIGHT -->
<!-- Entry for HEIGHT -->
<p><br>[Specialized accessor]<br><a class=none><b>height</b> <i>(obj rectangle)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>height</b> <i>(obj rectangle)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the <code>INTEGER</code> height of the rectangle <code>RECTANGLE</code>. </p>
</blockquote>
<!-- End of entry for HEIGHT -->
<!-- Entry for INIT-SDL -->
<p><br>[Function]<br><a class=none name='init-sdl'><b>init-sdl</b> <i><tt>&optional</tt> init</i> => <i>result</i></a>
<blockquote><br>
<p>Initalizes the SDL library when the <code>OPTIONAL</code> parameter <code>INIT</code> is <code>T</code>, or the value returned by <a href="#sdl-init-on-startup">SDL-INIT-ON-STARTUP</a> is <code>T</code>. </p>
</blockquote>
<!-- End of entry for INIT-SDL -->
<!-- Entry for INIT-SUB-SYSTEMS -->
<p><br>[Function]<br><a class=none name='init-sub-systems'><b>init-sub-systems</b> <i><tt>&optional</tt> flags</i> => <i>result</i></a>
<blockquote><br>
<p>Initializes the SDL subsystems specified in <code>FLAGS</code>. <code>FLAGS</code> is an <code>INTEGER</code> bitmask containing the logior of zero or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code> and <code>SDL-INIT-NOPARACHUTE</code>. </p><p><code>INIT-SUB-SYSTEMS</code> can be called only after SDL is succesfully initialized by <a href="#init-sdl">INIT-SDL</a>. </p>
</blockquote>
<!-- End of entry for INIT-SUB-SYSTEMS -->
<!-- Entry for INITIALISE-DEFAULT-FONT -->
<p><br>[Function]<br><a class=none name='initialise-default-font'><b>initialise-default-font</b> <i><tt>&optional</tt> font-definition</i> => <i>result</i></a>
<blockquote><br>
<p>Calls <a href="#initialise-font">INITIALISE-FONT</a> to create a new <code>BITMAP-FONT</code> from <code>FONT-DEFINITION</code>. <code>FONT-DEFINITION</code> is set to <code>*font-8x8*</code> if unspecified. Binds the symbol <code>*DEFAULT-FONT*</code> to the new font. Reutns the new font, or <code>NIL</code> if the font cannot be created. </p>
</blockquote>
<!-- End of entry for INITIALISE-DEFAULT-FONT -->
<!-- Entry for INITIALISE-FONT -->
<p><br>[Function]<br><a class=none name='initialise-font'><b>initialise-font</b> <i>font-definition</i> => <i>result</i></a>
<blockquote><br>
<p>Creates a new <code>BITMAP-FONT</code> object from the font data in <code>FONT-DEFINITION</code>. Returns the new bitmap font, or <code>NIL</code> if the font cannot be created. <code>FONT-DEFINITION</code> must be one of the following built-in fonts: <code>*FONT-10X20*, *FONT-5X7*, *FONT-5X8*, *FONT-6X10*, *FONT-6X12*, *FONT-6X13*, *FONT-6X13B*, *FONT-6X13O*, *FONT-6X9*, *FONT-7X13*, *FONT-7X13B*, *FONT-7X13O*, *FONT-7X14*, *FONT-7X14B*, *FONT-8X13*, *FONT-8X13B*, *FONT-8X13O*, *FONT-8X8*, *FONT-9X15*, *FONT-9X15B*, *FONT-9X18* OR *FONT-9X18B*</code>. </p>
</blockquote>
<!-- End of entry for INITIALISE-FONT -->
<!-- Entry for INITIALIZE-ON-STARTUP -->
<p><br>[Function]<br><a class=none name='initialize-on-startup'><b>initialize-on-startup</b> <i><tt>&rest</tt> flags</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the SDL subsystems that must be initialized in subsequent calls to <a href="#init-sub-systems">INIT-SUB-SYSTEMS</a>. </p><h5>Parameters </h5>
<ul><li><code>FLAGS</code> may be one or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code> and <code>SDL-INIT-NOPARACHUTE</code>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns an INTEGER bitmask of the SDL subsystems in <code>FLAGS</code>. </li>
</ul><h5>Example </h5>
<pre><code>(INITIALIZE-ON-STARTUP SDL:SDL-INIT-VIDEO SDL:SDL-INIT-CDROM)
</code></pre>
</blockquote>
<!-- End of entry for INITIALIZE-ON-STARTUP -->
<!-- Entry for INITIALIZED-SUB-SYSTEMS-P -->
<p><br>[Function]<br><a class=none name='initialized-sub-systems-p'><b>initialized-sub-systems-p</b> <i></i> => <i>result</i></a>
<blockquote><br>
<p>Returns a list of the initialized SDL subsystems. </p>
</blockquote>
<!-- End of entry for INITIALIZED-SUB-SYSTEMS-P -->
<!-- Entry for IS-VALID-PTR -->
<p><br>[Function]<br><a class=none name='is-valid-ptr'><b>is-valid-ptr</b> <i>pointer</i> => <i>result</i></a>
<blockquote><br>
<p>Returns T if pointer is not NULL and is a valid CFFI pointer to a foreign object. </p>
</blockquote>
<!-- End of entry for IS-VALID-PTR -->
<!-- Entry for KEY= -->
<p><br>[Function]<br><a class=none name='key='><b>key=</b> <i>key1 key2</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for KEY= -->
<!-- Entry for LIST-MODES -->
<p><br>[Function]<br><a class=none name='list-modes'><b>list-modes</b> <i>flags <tt>&optional</tt> surface</i> => <i>result</i></a>
<blockquote><br>
<p>Returns a LIST of vectors sorted largest to smallest that contains the width and height dimensions of the screen that will support the pixel format of the specified surface <code>SURFACE</code> and video flags <code>FLAGS</code>. <code>LIST-MODES</code> must be called after SDL is initialised using <a href="#init-sdl">INIT-SDL</a> or <a href="#with-init">WITH-INIT</a>. </p><h5>Parameters </h5>
<ul><li><code>FLAGS</code> is a bitmasked logior of one or more of the following; <a href="#sdl-sw-surface">SDL-SW-SURFACE</a>, <a href="#sdl-hw-surface">SDL-HW-SURFACE</a>, <a href="#sdl-async-blit">SDL-ASYNC-BLIT</a>, <a href="#sdl-any-format">SDL-ANY-FORMAT</a>, <a href="#sdl-hw-palette">SDL-HW-PALETTE</a>, <a href="#sdl-doublebuf">SDL-DOUBLEBUF</a>, <a href="#sdl-fullscreen">SDL-FULLSCREEN</a>, <a href="#sdl-opengl">SDL-OPENGL</a>, <a href="#sdl-resizable">SDL-RESIZABLE</a> and <a href="#sdl-no-frame">SDL-NO-FRAME</a>. </li>
<li><code>SURFACE</code> A surface of type <a href="#sdl-surface]">SDL-SURFACE</a>, or <code>NIL</code>. WHEN <code>NIL</code>, the pixel format will be that returned by <a href="#sdl-get-video-info]">SDL-GET-VIDEO-INFO</a>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns a list of <code>VECTOR</code>s of display dimensions, sorted largest to smallest, that will support the pixel format of surface <code>SURFACE</code>; for example <code>(#(1024 768) #(640 480) #(512 384) #(320 240))</code>. Returns <code>NIL</code> if there are no dimensions available for a particular pixel format. Returns <code>T</code> if any dimension will support the pixel format and video flags. </li>
</ul><h5>Example </h5>
<pre><code>(LIST-MODES &#039;(SDL-HW-SURFACE SDL-FULLSCREEN))
</code></pre>
</blockquote>
<!-- End of entry for LIST-MODES -->
<!-- Entry for LIST-SUB-SYSTEMS -->
<p><br>[Function]<br><a class=none name='list-sub-systems'><b>list-sub-systems</b> <i>flag</i> => <i>result</i></a>
<blockquote><br>
<p>Returns a list of SDL subsystems that are specified in <code>FLAGS</code>. </p><p><code>FLAGS</code> is an <code>INTEGER</code> bitmask containing the logior of zero or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code> and <code>SDL-INIT-NOPARACHUTE</code>. </p>
</blockquote>
<!-- End of entry for LIST-SUB-SYSTEMS -->
<!-- Entry for LOAD-IMAGE -->
<p><br>[Generic function]<br><a class=none name='load-image'><b>load-image</b> <i>source <tt>&key</tt> key-color alpha-value image-type force free</i> => <i>result</i></a>
<blockquote><br>
<p>Creates and returns a new surface from the source <code>SOURCE</code>. </p><h5>Parameters </h5>
<ul><li><code>SOURCE</code> is the source of the image. </li>
<li><code>KEY-COLOR</code> sets the color key to be used for the surface, of type <code>COLOR</code>, or 'COLOR-A`. </li>
<li><code>ALPHA-VALUE</code> sets the alpha value of the surface, of type INTEGER. Must be in the range 0-255. 255 is opaque, 0 is transparent. </li>
<li><code>IMAGE-TYPE</code> specifies the type of image to load. </li>
<li><code>FORCE</code> forces an image to be loaded as <code>IMAGE-TYPE</code>. </li>
<li><code>FREE</code> free's resources in <code>SOURCE</code> after creating a new <code>SDL_Surface</code>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns a new <code>SURFACE</code>, or <code>NIL</code> if <code>SOURCE</code> does not contain a valid image. </li>
</ul>
</blockquote>
<!-- End of entry for LOAD-IMAGE -->
<!-- Entry for LOAD-IMAGE -->
<p><br>[Method]<br><a class=none><b>load-image</b> <i>(source string) <tt>&key</tt> key-color alpha-value image-type force free</i> => <i>result</i></a>
<blockquote><br>
<p>Load a BMP image from a file at location <code>FILENAME</code>. </p><h5>Parameters </h5>
<ul><li><code>FILENAME</code> is the location of the image file on disk, as a <code>STRING</code>. </li>
<li><code>KEY-COLOR</code> when not <code>NIL</code> is the color to be used as the transpart pixel. When <code>KEY-COLOR</code> is <code>NIL</code>, the surface is created without a key color. See <a href="#set-color-key">SET-COLOR-KEY</a> for more detailed information. </li>
<li><code>ALPHA</code> when between <code>0</code> and <code>255</code> will set the level of alpha transparency for the new surface. When <code>ALPHA</code> is <code>NIL</code>, the new surface is created without alpha transparency. See <a href="#set-alpha">SET-ALPHA</a> for more detailed information. </li>
</ul>
</blockquote>
<!-- End of entry for LOAD-IMAGE -->
<!-- Entry for MAP-COLOR -->
<p><br>[Generic function]<br><a class=none name='map-color'><b>map-color</b> <i>color <tt>&optional</tt> surface</i> => <i>result</i></a>
<blockquote><br>
<p>Maps the color <code>COLOR</code> to the pixel format of the surface <code>SURFACE</code> and returns the pixel value that best approximates the color value of the surface <code>SURFACE</code>. If the surface has a palette (8-bit) the index of the closest matching color in the palette will be returned. If the surface has an alpha component it will be returned as all <code>1</code> bits (fully opaque). If the surface color depth is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format). </p>
</blockquote>
<!-- End of entry for MAP-COLOR -->
<!-- Entry for MAP-COLOR -->
<p><br>[Method]<br><a class=none><b>map-color</b> <i>(color color-a) <tt>&optional</tt> surface</i> => <i>result</i></a>
<blockquote><br>
<p>Maps the RBGA color <code>COLOR</code> to the pixel format of the surface <code>SURFACE</code> and returns the pixel value that best approximates the color value of the surface <code>SURFACE</code>. If the surface has a palette (8-bit) the index of the closest matching color in the palette will be returned. If thesurface has no alpha component the alpha value will be ignored (as it will be in formats with a palette). If the surface color depth is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format). </p>
</blockquote>
<!-- End of entry for MAP-COLOR -->
<!-- Entry for MAP-COLOR -->
<p><br>[Method]<br><a class=none><b>map-color</b> <i>(color color) <tt>&optional</tt> surface</i> => <i>result</i></a>
<blockquote><br>
<p>Maps the RBG color <code>COLOR</code> to the pixel format of the surface <code>SURFACE</code> and returns the pixel value that best approximates the color value of the surface <code>SURFACE</code>. If the surface has a palette (8-bit) the index of the closest matching color in the palette will be returned. If the surface has an alpha component it will be returned as all <code>1</code> bits (fully opaque). If the surface color depth is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format). </p>
</blockquote>
<!-- End of entry for MAP-COLOR -->
<!-- Entry for PACK-COLOR -->
<p><br>[Generic function]<br><a class=none name='pack-color'><b>pack-color</b> <i>color</i> => <i>result</i></a>
<blockquote><br>
<p>Packs the color components in <code>COLOR</code> into a four byte <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for PACK-COLOR -->
<!-- Entry for PACK-COLOR -->
<p><br>[Method]<br><a class=none><b>pack-color</b> <i>(color color-a)</i> => <i>result</i></a>
<blockquote><br>
<p>Packs the RGBA color components in color into a four byte <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for PACK-COLOR -->
<!-- Entry for PACK-COLOR -->
<p><br>[Method]<br><a class=none><b>pack-color</b> <i>(color color)</i> => <i>result</i></a>
<blockquote><br>
<p>Packs the RGB color components in color into a four byte <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for PACK-COLOR -->
<!-- Entry for POINT -->
<p><br>[Function]<br><a class=none name='point'><b>point</b> <i><tt>&key</tt> x y</i> => <i>result</i></a>
<blockquote><br>
<p>Creates a new <code>POINT</code> set to the specified horizontal <code>X</code> and vertical <code>Y</code> coordinate. </p>
</blockquote>
<!-- End of entry for POINT -->
<!-- Entry for POINT-* -->
<p><br>[Generic function]<br><a class=none name='point-*'><b>point-*</b> <i>point</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code> and <code>Y</code> coordinates of the object as a spread. The <code>RESULT</code> is <code>(VALUES X Y)</code></p>
</blockquote>
<!-- End of entry for POINT-* -->
<!-- Entry for POINT-* -->
<p><br>[Method]<br><a class=none><b>point-*</b> <i>(point sdl-surface)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code> and <code>Y</code> position coordinates of the surface <code>SURFACE</code> as a spread. </p>
</blockquote>
<!-- End of entry for POINT-* -->
<!-- Entry for POINT-* -->
<p><br>[Method]<br><a class=none><b>point-*</b> <i>(point rectangle)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code> and <code>Y</code> coordinates of the rectangle <code>RECTANGLE</code> as a spread. The <code>RESULT</code> is <code>(VALUES X Y)</code></p>
</blockquote>
<!-- End of entry for POINT-* -->
<!-- Entry for POINT-* -->
<p><br>[Method]<br><a class=none><b>point-*</b> <i>(point vector)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code> and <code>Y</code> coordinates of the point <code>POINT</code> as a spread. </p>
</blockquote>
<!-- End of entry for POINT-* -->
<!-- Entry for POSITION-* -->
<p><br>[Generic function]<br><a class=none name='position-*'><b>position-*</b> <i>obj</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#point-*">POINT-*</a></p>
</blockquote>
<!-- End of entry for POSITION-* -->
<!-- Entry for POSITION-* -->
<p><br>[Method]<br><a class=none><b>position-*</b> <i>(obj sdl-surface)</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#position">POSITION</a>. </p>
</blockquote>
<!-- End of entry for POSITION-* -->
<!-- Entry for POSITION-* -->
<p><br>[Method]<br><a class=none><b>position-*</b> <i>(obj rectangle)</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#point-*">POINT-*</a></p>
</blockquote>
<!-- End of entry for POSITION-* -->
<!-- Entry for POSITION-* -->
<p><br>[Method]<br><a class=none><b>position-*</b> <i>(obj vector)</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#point-*">POINT-*</a>. </p>
</blockquote>
<!-- End of entry for POSITION-* -->
<!-- Entry for PUSH-QUIT-EVENT -->
<p><br>[Function]<br><a class=none name='push-quit-event'><b>push-quit-event</b> <i></i> => <i>result</i></a>
<blockquote><br>
<p>Pushes a new <code>SDL_Event</code> of type <code>:SDL-QUIT-EVENT</code> onto the event queue. </p>
</blockquote>
<!-- End of entry for PUSH-QUIT-EVENT -->
<!-- Entry for PUSH-USER-EVENT -->
<p><br>[Function]<br><a class=none name='push-user-event'><b>push-user-event</b> <i><tt>&key</tt> code data1 data2</i> => <i>result</i></a>
<blockquote><br>
<p>Pushes a new <code>SDL_Event</code> of type <code>:SDL-USER-EVENT</code> onto the event queue. </p>
</blockquote>
<!-- End of entry for PUSH-USER-EVENT -->
<!-- Entry for QUERY-CURSOR -->
<p><br>[Function]<br><a class=none name='query-cursor'><b>query-cursor</b> <i></i> => <i>result</i></a>
<blockquote><br>
<p>Queries the current state of the cursor. Returns <code>T</code> if the cursor is enabled and shown on the display. Returns <code>NIL</code> if the cursor is disabled and hidden. </p>
</blockquote>
<!-- End of entry for QUERY-CURSOR -->
<!-- Entry for QUIT-ON-EXIT -->
<p><br>[Function]<br><a class=none name='quit-on-exit'><b>quit-on-exit</b> <i><tt>&rest</tt> flags</i> => <i>result</i></a>
<blockquote><br>
<p>Sets one or more SDL subsystems that must be uninitialized in subsequent calls to <a href="#quit-sub-systems">QUIT-SUB-SYSTEMS</a>. </p><h5>Parameters </h5>
<ul><li><code>FLAGS</code> may be one or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code>, <code>SDL-INIT-NOPARACHUTE</code>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns an INTEGER bitmask of the SDL subsystems in <code>FLAGS</code>. </li>
</ul><h5>Example </h5>
<pre><code>(QUIT-ON-EXIT SDL:SDL-INIT-VIDEO SDL:SDL-INIT-CDROM)
</code></pre>
</blockquote>
<!-- End of entry for QUIT-ON-EXIT -->
<!-- Entry for QUIT-SDL -->
<p><br>[Function]<br><a class=none name='quit-sdl'><b>quit-sdl</b> <i><tt>&optional</tt> quit</i> => <i>result</i></a>
<blockquote><br>
<p>Uninitalizes the SDL library when the <code>OPTIONAL</code> parameter <code>QUIT</code> is <code>T</code>, or the value returned by <a href="#sdl-quit-on-exit">SDL-QUIT-ON-EXIT</a> is <code>T</code>. </p>
</blockquote>
<!-- End of entry for QUIT-SDL -->
<!-- Entry for QUIT-SUB-SYSTEMS -->
<p><br>[Function]<br><a class=none name='quit-sub-systems'><b>quit-sub-systems</b> <i><tt>&optional</tt> flags</i> => <i>result</i></a>
<blockquote><br>
<p>Uninitializes the SDL subsystems specified in the <code>INTEGER</code> bitmask <code>FLAGS</code>. <code>FLAGS</code> contains the logior of zero or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code>, <code>SDL-INIT-NOPARACHUTE</code>. </p><p><code>QUIT-SUB-SYSTEMS</code> can be called only after SDL is successfully intialized using <a href="#init-sdl">INIT-SDL</a>. </p>
</blockquote>
<!-- End of entry for QUIT-SUB-SYSTEMS -->
<!-- Entry for R -->
<p><br>[Generic accessor]<br><a class=none name='r'><b>r</b> <i>color</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>r</b> <i>color</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the red component of color <code>COLOR</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for R -->
<!-- Entry for R -->
<p><br>[Specialized accessor]<br><a class=none><b>r</b> <i>(color color)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>r</b> <i>(color color)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the red color component of the color <code>COLOR</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for R -->
<!-- Entry for RANDOM+1 -->
<p><br>[Function]<br><a class=none name='random+1'><b>random+1</b> <i>rnd</i> => <i>result</i></a>
<blockquote><br>
<p>Returns a random number in the range 0 > num <= rnd. </p>
</blockquote>
<!-- End of entry for RANDOM+1 -->
<!-- Entry for RANDOM-RECTANGLE -->
<p><br>[Function]<br><a class=none name='random-rectangle'><b>random-rectangle</b> <i>bound-w bound-h <tt>&optional</tt> rectangle</i> => <i>result</i></a>
<blockquote><br>
<p>Creates and return s a new <code>RECTANGLE</code> of random x, y width and height within the specified bounds of width <code>BOUND-W</code> and height <code>BOUND-H</code>. <code>RECTANGLE</code> if unset will force the creation of a new <code>RECTANGLE</code> object. <code>RECTANGLE</code> if set will be modified with the coordinates. </p>
</blockquote>
<!-- End of entry for RANDOM-RECTANGLE -->
<!-- Entry for READ-POINT -->
<p><br>[Function]<br><a class=none name='read-point'><b>read-point</b> <i>point <tt>&key</tt> clipping-p surface</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for READ-POINT -->
<!-- Entry for RECTANGLE -->
<p><br>[Standard class]<br><a class=none name='rectangle'><b>rectangle</b></a>
<blockquote><br>
<p>A <code>RECTANGLE</code> object manages the foreign SDL_Rect object. </p>
</blockquote>
<!-- End of entry for RECTANGLE -->
<!-- Entry for RECTANGLE -->
<p><br>[Function]<br><a class=none name='rectangle'><b>rectangle</b> <i><tt>&key</tt> x y w h fp null</i> => <i>result</i></a>
<blockquote><br>
<p>Creates a new <code>RECTANGLE</code> from the specified <code>X</code>, <code>Y</code>, width <code>W</code> and height <code>H</code>. If <code>FP&#039; is </code>NIL<code> then a foreign SDL_Rect is created. If </code>FP<code> is a pointer to a foreign SDL_Rect object then </code>FP<code> is used. If </code>NULL<code> is </code>NIL<code>, then a new </code>RECTANGLE<code> is returned. If </code>NULL<code> not </code>NIL` then a <a href="#null-rectangle">NULL-RECTANGLE</a>` is created. </p>
</blockquote>
<!-- End of entry for RECTANGLE -->
<!-- Entry for RECTANGLE-* -->
<p><br>[Generic function]<br><a class=none name='rectangle-*'><b>rectangle-*</b> <i>obj</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code>, <code>Y</code>, <code>WIDTH</code> and <code>HEIGHT</code> coordinates of the object as a spread. The <code>RESULT</code> is <code>(VALUES X Y WIDTH HEIGHT)</code></p>
</blockquote>
<!-- End of entry for RECTANGLE-* -->
<!-- Entry for RECTANGLE-* -->
<p><br>[Method]<br><a class=none><b>rectangle-*</b> <i>(obj sdl-surface)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code>, <code>Y</code>, <code>WIDTH</code> and <code>HEIGHT</code> values of the surface <code>SURFACE</code> as a spread. The <code>RESULT</code> is <code>(VALUES X Y WIDTH HEIGHT)</code></p>
</blockquote>
<!-- End of entry for RECTANGLE-* -->
<!-- Entry for RECTANGLE-* -->
<p><br>[Method]<br><a class=none><b>rectangle-*</b> <i>(obj rectangle)</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the <code>X</code>, <code>Y</code>, <code>WIDTH</code> and <code>HEIGHT</code> coordinates of the rectangle <code>RECTANGLE</code> as a spread. The <code>RESULT</code> is <code>(VALUES X Y WIDTH HEIGHT)</code></p>
</blockquote>
<!-- End of entry for RECTANGLE-* -->
<!-- Entry for RECTANGLE-FROM-EDGES -->
<p><br>[Function]<br><a class=none name='rectangle-from-edges'><b>rectangle-from-edges</b> <i>p1 p2 <tt>&optional</tt> rectangle</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#rectangle-from-edges-*">RECTANGLE-FROM-EDGES-*</a>. </p><ul><li><code>P1</code> and <code>P2</code> are <code>POINTS</code> that specify the bounds of the <code>RECTANGLE</code>. <code>P1</code> specifies the top left coordinate. <code>P2</code> specifies the lower right coordinate. </li>
</ul>
</blockquote>
<!-- End of entry for RECTANGLE-FROM-EDGES -->
<!-- Entry for RECTANGLE-FROM-EDGES-* -->
<p><br>[Function]<br><a class=none name='rectangle-from-edges-*'><b>rectangle-from-edges-*</b> <i>x1 y1 x2 y2 <tt>&optional</tt> rectangle</i> => <i>result</i></a>
<blockquote><br>
<p>Returns a new <code>RECTANGLE</code> using the bounds specified by the <code>INTEGERS</code><code>X1</code>, <code>X2</code>, <code>Y1</code> and <code>Y2</code>. The coordinates of the rectangle are X = X1, Y = Y1, WIDTH = (- X2 X1), HEIGHT = (- Y2 Y1) </p><h5>Parameters </h5>
<ul><li><code>X1</code>, <code>Y1</code> specify the top left coordinate as <code>INTEGERS</code>. </li>
<li><code>X2</code>, <code>Y2</code> specify the bottom right coordinate as <code>INTEGERS</code>. </li>
<li><code>RECTANGLE</code> if unset will force the creation of a new <code>RECTANGLE</code> object. <code>RECTANGLE</code> if set will be modified with the coordinates. </li>
</ul>
</blockquote>
<!-- End of entry for RECTANGLE-FROM-EDGES-* -->
<!-- Entry for RECTANGLE-FROM-MIDPOINT-* -->
<p><br>[Function]<br><a class=none name='rectangle-from-midpoint-*'><b>rectangle-from-midpoint-*</b> <i>x y w h <tt>&optional</tt> rectangle</i> => <i>result</i></a>
<blockquote><br>
<p>Returns a <code>RECTANGLE</code> of width <code>W</code> and height <code>H</code> with the rectangle mid-point at coordinates <code>X</code> and <code>Y</code>. <code>RECTANGLE</code> if unset will force the creation of a new <code>RECTANGLE</code> object. <code>RECTANGLE</code> if set will be modified with the coordinates. </p>
</blockquote>
<!-- End of entry for RECTANGLE-FROM-MIDPOINT-* -->
<!-- Entry for RENDER-STRING-SHADED -->
<p><br>[Function]<br><a class=none name='render-string-shaded'><b>render-string-shaded</b> <i>string fg-color bg-color <tt>&key</tt> font free cache</i> => <i>result</i></a>
<blockquote><br>
<p>Render the string <code>STRING</code> using font <code>FONT</code> with text color <code>FG-COLOR</code> and background color <code>BG-COLOR</code> to a new <code>SURFACE</code>. The dimensions of the new surface are height == <code>FONT</code> height, and width == <code>FONT</code> width * <code>STRING</code> length. The surface background is filled with <code>BG-COLOR</code> so the surface cannot be keyed over other surfaces. Use <code>:CACHE T</code> to cache the new surface in the <code>FONT</code> object. When <code>:FREE T</code> any exisiting cached surface in <code>FONT</code> is automatically freed. When <code>:FREE NIL</code> the caller is responsible for freeing any existing cached surface in <code>FONT</code>. </p><h5>Parameters </h5>
<ul><li><code>STRING</code> is the text to render. </li>
<li><code>FONT</code> is the font face used to render the <code>STRING</code>. Of type <code>FONT</code>. Bound to <code>*DEFAULT-FONT*</code> if unspecified. </li>
<li><code>FG-COLOR</code> color is the text color, of type <code>SDL-COLOR</code></li>
<li><code>BG-COLOR</code> color is the background color used to fill the surface, of type <code>SDL-COLOR</code></li>
<li><code>FREE</code> when <code>T</code> will free any exisiting cached surface in <code>FONT</code>. </li>
<li><code>CACHE</code> when <code>T</code> will cache the newly created SURFACE in <code>FONT</code>. Any cached surface can be accessed using <a href="#cached-surface">CACHED-SURFACE</a> and can be blitted to a target surface using <a href="#draw-font">DRAW-FONT</a>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns a new cached surface <code>SDL-SURFACE</code>. </li>
</ul><h5>Example </h5>
<pre><code>(RENDER-STRING-SHADED &quot;Hello World!&quot; F-COLOR B-COLOR)
</code></pre>
</blockquote>
<!-- End of entry for RENDER-STRING-SHADED -->
<!-- Entry for RENDER-STRING-SOLID -->
<p><br>[Function]<br><a class=none name='render-string-solid'><b>render-string-solid</b> <i>string <tt>&key</tt> font color free cache</i> => <i>result</i></a>
<blockquote><br>
<p>Render the string <code>STRING</code> using font <code>FONT</code> with text color <code>COLOR</code> to a new <code>SURFACE</code>. The dimensions of the new surface are height == <code>FONT</code> height, and width == <code>FONT</code> width * <code>STRING</code> length. The surface background is transparent and therefore can be keyed over other surfaces. Use <code>:CACHE T</code> to cache the new surface in the <code>FONT</code> object. When <code>:FREE T</code> any exisiting cached surface in <code>FONT</code> is automatically freed. When <code>:FREE NIL</code> the caller is responsible for freeing any existing cached surface in <code>FONT</code>. </p><h5>Parameters </h5>
<ul><li><code>STRING</code> is the text to render. </li>
<li><code>FONT</code> is the font face used to render the <code>STRING</code>. Of type <code>FONT</code>. Bound to <code>*DEFAULT-FONT*</code> if unspecified. </li>
<li><code>COLOR</code> color is the text color, of type <code>SDL-COLOR</code>. </li>
<li><code>FREE</code> when <code>T</code> will free any exisitng cached surface in <code>FONT</code>. </li>
<li><code>CACHE</code> when <code>T</code> will cache the newly created SURFACE in <code>FONT</code>. Any cached surface can be accessed using <a href="#cached-surface">CACHED-SURFACE</a> and can be blitted to a target surface using <a href="#draw-font">DRAW-FONT</a>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns a new cached surface <code>SDL-SURFACE</code>. </li>
</ul><h5>Example </h5>
<pre><code>(DRAW-STRING-SOLID &quot;Hello World!&quot; :COLOR A-COLOR)
</code></pre>
</blockquote>
<!-- End of entry for RENDER-STRING-SOLID -->
<!-- Entry for RETURN-SUB-SYSTEMS-OF-STATUS -->
<p><br>[Function]<br><a class=none name='return-sub-systems-of-status'><b>return-sub-systems-of-status</b> <i>flags status</i> => <i>result</i></a>
<blockquote><br>
<p>Returns the status <code>STATUS</code> of the the specified SDL subsystems in <code>FLAGS</code> as an INTEGER bitmask. </p><h5>Parameters </h5>
<ul><li><code>FLAGS</code> may contain a logior of zero or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code>, <code>SDL-INIT-NOPARACHUTE</code>. </li>
<li><code>STATUS</code> when <code>T</code> determines the status of initialised subsystems. <code>STATUS</code> when <code>NIL</code>, determines the status of uninitialised subsystems. </li>
</ul><h5>Returns </h5>
<ul><li>Returns an INTEGER bitmask of the SDL subsystems in <code>FLAGS</code> that are initialised when <code>STATUS</code> is <code>T</code> or uninitialised when <code>STATUS</code> is <code>NIL</code>. </li>
</ul>
</blockquote>
<!-- End of entry for RETURN-SUB-SYSTEMS-OF-STATUS -->
<!-- Entry for ROTATE-SURFACE -->
<p><br>[Function]<br><a class=none name='rotate-surface'><b>rotate-surface</b> <i>degrees <tt>&key</tt> surface free-p key-color alpha-value</i> => <i>result</i></a>
<blockquote><br>
<p>Returns a new <code>SURFACE</code> rotated <code>0</code>, <code>90</code>, <code>180</code>, or <code>270</code> degrees. </p><h5>Parameters </h5>
<ul><li><code>DEGREES</code> is the number of degrees to rotate the surface. Must be one of <code>0</code>, <code>90</code>, <code>180</code>, or <code>270</code> degrees. </li>
<li><code>SURFACE</code> is the surface to rotate, of type <code>SDL-SURFACE</code>. Bound to <code>*DEFAULT-SURFACE*</code> if unspecified. </li>
<li><code>FREE-P</code> when not 'NIL' will free the surface <code>SURFACE</code>. </li>
<li><code>KEY-COLOR</code> when not <code>NIL</code> is the color to be used as the transpart pixel. <code>When </code>KEY-COLOR<code> is </code>NIL`, the surface is created without a key color. See <a href="#set-color-key">SET-COLOR-KEY</a> for more detailed information. </li>
<li><code>ALPHA</code> when between <code>0</code> and <code>255</code> will set the level of alpha transparency for the new surface. When <code>ALPHA</code> is <code>NIL</code>, the new surface is created without alpha transparency. See <a href="#set-alpha">SET-ALPHA</a> for more detailed information. </li>
</ul>
</blockquote>
<!-- End of entry for ROTATE-SURFACE -->
<!-- Entry for RWOPS -->
<p><br>[Standard class]<br><a class=none name='rwops'><b>rwops</b></a>
<blockquote><br>
<p>A wrapper around a foreign SDL_RWops object. </p>
</blockquote>
<!-- End of entry for RWOPS -->
<!-- Entry for SAVE-IMAGE -->
<p><br>[Function]<br><a class=none name='save-image'><b>save-image</b> <i>surface filename</i> => <i>result</i></a>
<blockquote><br>
<p>Saves the surface <code>SURFACE</code> as a BMP image to a file at location <code>FILENAME</code>. </p>
</blockquote>
<!-- End of entry for SAVE-IMAGE -->
<!-- Entry for SDL-ANY-FORMAT -->
<p><br>[Constant]<br><a class=none name='sdl-any-format'><b>sdl-any-format</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; Causes SDL to return a <a href="#display-surface">DISPLAY-SURFACE</a> of any pixel depth if the requested pixel depth is unavailable. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates that the surface was created with <code>SDL-ANY-FORMAT</code>. </li>
</ul><p>Normally, if a <a href="#display-surface">DISPLAY-SURFACE</a> of the requested bits-per-pixel (bpp) is not available, SDL will emulate one with a shadow surface. Passing <code>SDL-ANY-FORMAT</code> prevents this and causes SDL to use the <a href="#display-surface">DISPLAY-SURFACE</a> surface, regardless of its pixel depth. </p>
</blockquote>
<!-- End of entry for SDL-ANY-FORMAT -->
<!-- Entry for SDL-ASYNC-BLIT -->
<p><br>[Constant]<br><a class=none name='sdl-async-blit'><b>sdl-async-blit</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; Enables the use of asynchronous updates of the <a href="#display-surface">DISPLAY-SURFACE</a>. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a> or <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates if the surface uses asynchronous blits when possible. </li>
</ul><p>Asynchronous blits usually slows down blitting on single CPU machines, but may provide a speed increase on SMP systems. </p>
</blockquote>
<!-- End of entry for SDL-ASYNC-BLIT -->
<!-- Entry for SDL-COLOR -->
<p><br>[Standard class]<br><a class=none name='sdl-color'><b>sdl-color</b></a>
<blockquote><br>
<p>Root class defining an SDL color. All colors in SDL must inherit from this class. </p>
</blockquote>
<!-- End of entry for SDL-COLOR -->
<!-- Entry for SDL-DOUBLEBUF -->
<p><br>[Constant]<br><a class=none name='sdl-doublebuf'><b>sdl-doublebuf</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; Enable hardware double buffering; only valid with <a href="#sdl-hw-surface">SDL-HW-SURFACE</a>. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#display-surface">DISPLAY-SURFACE</a>; Indicages that the surface is double buffered. </li>
</ul><p>Calling <a href="#sdl-flip">SDL-FLIP</a> will flip the buffers and update the screen. All drawing will take place on the surface that is not displayed at the moment. If double buffering could not be enabled then <a href="#sdl-flip">SDL-FLIP</a> will just perform a <a href="#sdl-update-rect">SDL-UPDATE-RECT</a> on the entire screen. </p>
</blockquote>
<!-- End of entry for SDL-DOUBLEBUF -->
<!-- Entry for SDL-FULLSCREEN -->
<p><br>[Constant]<br><a class=none name='sdl-fullscreen'><b>sdl-fullscreen</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; SDL will attempt to use a fullscreen mode. If a hardware resolution change is not possible (for whatever reason), the next higher resolution will be used and the display window centered on a black background. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates that the surface is full-screen. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-FULLSCREEN -->
<!-- Entry for SDL-GET-TICKS -->
<p><br>[Function]<br><a class=none name='sdl-get-ticks'><b>sdl-get-ticks</b> <i></i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-GET-TICKS -->
<!-- Entry for SDL-HW-ACCEL -->
<p><br>[Constant]<br><a class=none name='sdl-hw-accel'><b>sdl-hw-accel</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a> and <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a> and <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates that surface blitting will use hardware acceloration. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-HW-ACCEL -->
<!-- Entry for SDL-HW-PALETTE -->
<p><br>[Constant]<br><a class=none name='sdl-hw-palette'><b>sdl-hw-palette</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a> and <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; Gives SDL exclusive palette access to <a href="#display-surface">DISPLAY-SURFACE</a>. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a> or <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates that the surface has an exclusive palette. </li>
</ul><p>Without this flag you may not always get the the colors you request with <a href="#sdl-set-colors">SDL-SET-COLORS</a> or <a href="#sdl-set-palette">SDL-SET-PALETTE</a>. </p>
</blockquote>
<!-- End of entry for SDL-HW-PALETTE -->
<!-- Entry for SDL-HW-SURFACE -->
<p><br>[Constant]<br><a class=none name='sdl-hw-surface'><b>sdl-hw-surface</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a> and <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a> or <a href="#create-surface">CREATE-SURFACE</a>; Create the <a href="#surface">SURFACE</a> or <a href="#display-surface">DISPLAY-SURFACE</a> in video memory. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a> or <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates if the surface is stored in video memory. </li>
</ul><p>This will allow SDL to take advantage of Video->Video blits (which are often accelerated). </p>
</blockquote>
<!-- End of entry for SDL-HW-SURFACE -->
<!-- Entry for SDL-INIT-AUDIO -->
<p><br>[Constant]<br><a class=none name='sdl-init-audio'><b>sdl-init-audio</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-AUDIO -->
<!-- Entry for SDL-INIT-CDROM -->
<p><br>[Constant]<br><a class=none name='sdl-init-cdrom'><b>sdl-init-cdrom</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-CDROM -->
<!-- Entry for SDL-INIT-EVENTTHREAD -->
<p><br>[Constant]<br><a class=none name='sdl-init-eventthread'><b>sdl-init-eventthread</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-EVENTTHREAD -->
<!-- Entry for SDL-INIT-EVERYTHING -->
<p><br>[Constant]<br><a class=none name='sdl-init-everything'><b>sdl-init-everything</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-EVERYTHING -->
<!-- Entry for SDL-INIT-JOYSTICK -->
<p><br>[Constant]<br><a class=none name='sdl-init-joystick'><b>sdl-init-joystick</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-JOYSTICK -->
<!-- Entry for SDL-INIT-NOPARACHUTE -->
<p><br>[Constant]<br><a class=none name='sdl-init-noparachute'><b>sdl-init-noparachute</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-NOPARACHUTE -->
<!-- Entry for SDL-INIT-ON-STARTUP -->
<p><br>[Function]<br><a class=none name='sdl-init-on-startup'><b>sdl-init-on-startup</b> <i></i> => <i>result</i></a>
<blockquote><br>
<p>Returns <code>T</code> if the SDL library must be initialised in <a href="#init-sdl">INIT-SDL</a>, or <a href="#with-init">WITH-INIT</a>. Returns <code>NIL</code> otherwise. </p>
</blockquote>
<!-- End of entry for SDL-INIT-ON-STARTUP -->
<!-- Entry for SDL-INIT-TIMER -->
<p><br>[Constant]<br><a class=none name='sdl-init-timer'><b>sdl-init-timer</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-TIMER -->
<!-- Entry for SDL-INIT-VIDEO -->
<p><br>[Constant]<br><a class=none name='sdl-init-video'><b>sdl-init-video</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-INIT-VIDEO -->
<!-- Entry for SDL-IYUV-OVERLAY -->
<p><br>[Constant]<br><a class=none name='sdl-iyuv-overlay'><b>sdl-iyuv-overlay</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-IYUV-OVERLAY -->
<!-- Entry for SDL-NO-FRAME -->
<p><br>[Constant]<br><a class=none name='sdl-no-frame'><b>sdl-no-frame</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; If possible, <code>SDL-NO-FRAME</code> causes SDL to create a window with no title bar or frame decoration. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#display-surface">DISPLAY-SURFACE</a>; <STRONG></STRONG>Note: Per the SDL documentation, this is not stored in <code>FLAGS</code>. </li>
</ul><p>Fullscreen modes automatically have this flag set. </p>
</blockquote>
<!-- End of entry for SDL-NO-FRAME -->
<!-- Entry for SDL-OPENGL -->
<p><br>[Constant]<br><a class=none name='sdl-opengl'><b>sdl-opengl</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; Create an OpenGL rendering context. You should have previously set OpenGL video attributes with <a href="#sdl-gl-set-attribute">SDL-GL-SET-ATTRIBUTE</a>. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates that the surface has an OpenGL rendering context. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-OPENGL -->
<!-- Entry for SDL-PRE-ALLOC -->
<p><br>[Constant]<br><a class=none name='sdl-pre-alloc'><b>sdl-pre-alloc</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a>. <ul><li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a>; Indicates that surface uses preallocated memory. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-PRE-ALLOC -->
<!-- Entry for SDL-QUIT-ON-EXIT -->
<p><br>[Function]<br><a class=none name='sdl-quit-on-exit'><b>sdl-quit-on-exit</b> <i></i> => <i>result</i></a>
<blockquote><br>
<p>Returns <code>T</code> if the SDL library must be uninitialised in <a href="#quit-sdl">QUIT-SDL</a>, or <a href="#with-init">WITH-INIT</a>. Returns <code>NIL</code> otherwise. </p>
</blockquote>
<!-- End of entry for SDL-QUIT-ON-EXIT -->
<!-- Entry for SDL-RESIZABLE -->
<p><br>[Constant]<br><a class=none name='sdl-resizable'><b>sdl-resizable</b></a>
<blockquote><br>
Applies to <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a>; Create a resizable window. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates that the surface is resizable. </li>
</ul><p>When the window is resized by the user a :VIDEO-RESIZE-EVENT event is generated and <a href="#window">WINDOW</a> can be called again with the new size. </p>
</blockquote>
<!-- End of entry for SDL-RESIZABLE -->
<!-- Entry for SDL-RLE-ACCEL -->
<p><br>[Constant]<br><a class=none name='sdl-rle-accel'><b>sdl-rle-accel</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a><ul><li>When passed as a <code>FLAG</code> to <a href="#set-color-key">SET-COLOR-KEY</a>; The surface will be drawn using RLE acceleration when drawn with <a href="#blit-surface">BLIT-SURFACE</a>, and <a href="#draw-surface">DRAW-SURFACE</a>. The surface will actually be encoded for RLE acceleration the first time <a href="#blit-surface">BLIT-SURFACE</a>, <a href="#draw-surface">DRAW-SURFACE</a> or <a href="#convert-surface">CONVERT-SURFACE</a> is called on the surface. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a>; Indicates that colorkey blitting is accelerated with RLE. </li>
</ul><p>RLE acceleration can substantially speed up blitting of images with large horizontal runs of transparent pixels (i.e., pixels that match the key color). The key must be of the same pixel format as the surface, <a href="#map-color">MAP-COLOR</a> is often useful for obtaining an acceptable value. </p>
</blockquote>
<!-- End of entry for SDL-RLE-ACCEL -->
<!-- Entry for SDL-RLE-ACCEL-OK -->
<p><br>[Constant]<br><a class=none name='sdl-rle-accel-ok'><b>sdl-rle-accel-ok</b></a>
<blockquote><br>
<p>Applies to <a href="#surface">SURFACE</a>. </p>
</blockquote>
<!-- End of entry for SDL-RLE-ACCEL-OK -->
<!-- Entry for SDL-SRC-ALPHA -->
<p><br>[Constant]<br><a class=none name='sdl-src-alpha'><b>sdl-src-alpha</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#create-surface">CREATE-SURFACE</a> and <a href="#set-alpha">SET-ALPHA</a>; Turns on alpha-blending for blits from this surface. If <a href="#sdl-hw-surface">SDL-HW-SURFACE</a> is also specified and alpha-blending blits are hardware-accelerated, then the surface will be placed in video memory if possible. If the screen is a hardware surface and alpha-blending blits are hardware-accelerated then the <a href="#sdl-hw-surface">SDL-HW-SURFACE</a> flag will be set. Use <a href="#set-alpha">SET-ALPHA</a> to set or clear this flag after surface creation. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a>; Indicates that surface blitting uses alpha blending. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-SRC-ALPHA -->
<!-- Entry for SDL-SRC-COLOR-KEY -->
<p><br>[Constant]<br><a class=none name='sdl-src-color-key'><b>sdl-src-color-key</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#create-surface">CREATE-SURFACE</a> and <a href="#set-color-key">SET-COLOR-KEY</a>; Turns on color keying for blits from this surface. If <a href="#sdl-hw-surface">SDL-HW-SURFACE</a> is also specified and color keyed blits are hardware-accelerated, then SDL will attempt to place the surface in video memory. If the screen is a hardware surface and color keyed blits are hardware-accelerated then the <a href="#sdl-hw-surface">SDL-HW-SURFACE</a> flag will be set. Use <a href="#set-color-key">SET-COLOR-KEY</a> to set or clear this flag after surface creation. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a>; Indicates that the surface uses colorkey blitting. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-SRC-COLOR-KEY -->
<!-- Entry for SDL-SURFACE -->
<p><br>[Standard class]<br><a class=none name='sdl-surface'><b>sdl-surface</b></a>
<blockquote><br>
A wrapper for a foreign object of type SDL_Surface. A <code>SDL-SURFACE</code> object contains: <ul><li>a foreign SDL_Surface, </li>
<li>a foreign SDL_Rect used to position the surface for blitting operations, and </li>
<li>an SDL_Rect that defines the bounds of the surface to use when blitting. </li>
</ul>
</blockquote>
<!-- End of entry for SDL-SURFACE -->
<!-- Entry for SDL-SW-SURFACE -->
<p><br>[Constant]<br><a class=none name='sdl-sw-surface'><b>sdl-sw-surface</b></a>
<blockquote><br>
Applies to <a href="#surface">SURFACE</a> and <a href="#display-surface">DISPLAY-SURFACE</a>. <ul><li>When passed as a <code>FLAG</code> to <a href="#window">WINDOW</a> or <a href="#create-surface">CREATE-SURFACE</a>; Create the <a href="#surface">SURFACE</a> or <a href="#display-surface">DISPLAY-SURFACE</a> in system memory. </li>
<li>When read from the <code>FLAGS</code> field in <a href="#surface">SURFACE</a> or <a href="#display-surface">DISPLAY-SURFACE</a>; Indicates if the surface is stored in system memory. </li>
</ul><p>This improves the performance of pixel level access, however you may not be able to take advantage of some types of hardware blitting. </p>
</blockquote>
<!-- End of entry for SDL-SW-SURFACE -->
<!-- Entry for SDL-UYVY-OVERLAY -->
<p><br>[Constant]<br><a class=none name='sdl-uyvy-overlay'><b>sdl-uyvy-overlay</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-UYVY-OVERLAY -->
<!-- Entry for SDL-YUY2-OVERLAY -->
<p><br>[Constant]<br><a class=none name='sdl-yuy2-overlay'><b>sdl-yuy2-overlay</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-YUY2-OVERLAY -->
<!-- Entry for SDL-YV12-OVERLAY -->
<p><br>[Constant]<br><a class=none name='sdl-yv12-overlay'><b>sdl-yv12-overlay</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-YV12-OVERLAY -->
<!-- Entry for SDL-YVYU-OVERLAY -->
<p><br>[Constant]<br><a class=none name='sdl-yvyu-overlay'><b>sdl-yvyu-overlay</b></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SDL-YVYU-OVERLAY -->
<!-- Entry for SET-ALPHA -->
<p><br>[Function]<br><a class=none name='set-alpha'><b>set-alpha</b> <i>alpha <tt>&key</tt> surface rle-accel</i> => <i>result</i></a>
<blockquote><br>
<p>Adjust the alpha <code>ALPHA</code> properties of a surface <code>SURFACE</code>. Also enables or disables alpha blending. </p><h5>Parameters </h5>
<ul><li><code>ALPHA</code> when <code>NIL</code> will ignore all alpha information when blitting the surface. <code>ALPHA</code> when not <code>NIL</code> is an <code>INTEGER</code> value between <code>0</code> and <code>255</code> with <code>0</code> being transparent and <code>255</code> being opaque. <EM>Note</EM>: The per-surface alpha value of 128 is considered a special case and is optimised, so it's much faster than other per-surface values. </li>
<li><code>RLE-ACCEL</code> when <code>T</code> wil use RLE information when blitting. See <a href="#rle-accel">RLE-ACCEL</a>. </li>
</ul><h5>Alpha effects </h5>
<p>Alpha has the following effect on surface blitting: </p><ul><li><STRONG>RGBA to RGB</STRONG> with <a href="#sdl-src-alpha">SDL-SRC-ALPHA</a>: The source is alpha-blended with the destination, using the alpha channel. <a href="#SDL-SRC-COLOR-KEY">SDL-SRC-COLOR-KEY</a> and the per-surface alpha are ignored. </li>
<li><STRONG>RGBA to RGB</STRONG> without <a href="#sdl-src-alpha">SDL-SRC-ALPHA</a>: The RGB data is copied from the source. The source alpha channel and the per-surface alpha value are ignored. If <a href="#SDL-SRC-COLOR-KEY">SDL-SRC-COLOR-KEY</a> is set, only the pixels not matching the colorkey value are copied. </li>
<li><STRONG>RGB to RGBA</STRONG> with <a href="#sdl-src-alpha">SDL-SRC-ALPHA</a>: The source is alpha-blended with the destination using the per-surface alpha value. If <a href="#SDL-SRC-COLOR-KEY">SDL-SRC-COLOR-KEY</a> is set, only the pixels not matching the colorkey value are copied. The alpha channel of the copied pixels is set to opaque. </li>
<li><STRONG>RGB to RGBA</STRONG> without <a href="#sdl-src-alpha">SDL-SRC-ALPHA</a>: The RGB data is copied from the source and the alpha value of the copied pixels is set to opaque. If <a href="#SDL-SRC-COLOR-KEY">SDL-SRC-COLOR-KEY</a> is set, only the pixels not matching the colorkey value are copied. </li>
<li><STRONG>RGBA to RGBA</STRONG> with <a href="#sdl-src-alpha">SDL-SRC-ALPHA</a>: The source is alpha-blended with the destination using the source alpha channel. The alpha channel in the destination surface is left untouched. <a href="#SDL-SRC-COLOR-KEY">SDL-SRC-COLOR-KEY</a> is ignored. </li>
<li><STRONG>RGBA to RGBA</STRONG> without <a href="#sdl-src-alpha">SDL-SRC-ALPHA</a>: The RGBA data is copied to the destination surface. If <a href="#SDL-SRC-COLOR-KEY">SDL-SRC-COLOR-KEY</a> is set, only the pixels not matching the colorkey value are copied. </li>
<li><STRONG>RGB to RGB</STRONG> with <a href="#sdl-src-alpha">SDL-SRC-ALPHA</a>: The source is alpha-blended with the destination using the per-surface alpha value. If <a href="#SDL-SRC-COLOR-KEY">SDL-SRC-COLOR-KEY</a> is set, only the pixels not matching the colorkey value are copied. </li>
<li><STRONG>RGB to RGB</STRONG> without <a href="#sdl-src-alpha">SDL-SRC-ALPHA</a>: The RGB data is copied from the source. If <a href="#SDL-SRC-COLOR-KEY">SDL-SRC-COLOR-KEY</a> is set, only the pixels not matching the colorkey value are copied. </li>
</ul><p><EM>Note</EM>: When blitting, the presence or absence of <a href="#sdl-src-alpha">SDL-SRC-ALPHA</a> is relevant only on the source surface, not the destination. </p><p><EM>Note</EM>: Note that <STRONG>RGBA to RGBA</STRONG> blits (with <a href="#sdl-src-alpha">SDL-SRC-ALPHA</a> set) keep the alpha of the destination surface. This means that you cannot compose two arbitrary <STRONG>RGBA</STRONG> surfaces this way and get the result you would expect from "overlaying" them; the destination alpha will work as a mask. </p><p><EM>Note</EM>: Also note that per-pixel and per-surface alpha cannot be combined; the per-pixel alpha is always used if available. </p>
</blockquote>
<!-- End of entry for SET-ALPHA -->
<!-- Entry for SET-CELL -->
<p><br>[Function]<br><a class=none name='set-cell'><b>set-cell</b> <i>rectangle <tt>&key</tt> surface</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SET-CELL -->
<!-- Entry for SET-CELL-* -->
<p><br>[Function]<br><a class=none name='set-cell-*'><b>set-cell-*</b> <i>x y w h <tt>&key</tt> surface</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SET-CELL-* -->
<!-- Entry for SET-CLIP-RECT -->
<p><br>[Function]<br><a class=none name='set-clip-rect'><b>set-clip-rect</b> <i>rectangle <tt>&key</tt> surface</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SET-CLIP-RECT -->
<!-- Entry for SET-COLOR -->
<p><br>[Generic function]<br><a class=none name='set-color'><b>set-color</b> <i>dst src</i> => <i>result</i></a>
<blockquote><br>
<p>Copies the RGB/A color components to teh destination color <code>DST</code> from the source color <code>SRC</code>. </p>
</blockquote>
<!-- End of entry for SET-COLOR -->
<!-- Entry for SET-COLOR -->
<p><br>[Method]<br><a class=none><b>set-color</b> <i>(dst sdl-color) (src sdl-color)</i> => <i>result</i></a>
<blockquote><br>
<p>Copies the color components from the source color <code>SRC</code> to the destination color <code>DST</code>. </p>
</blockquote>
<!-- End of entry for SET-COLOR -->
<!-- Entry for SET-COLOR-* -->
<p><br>[Generic function]<br><a class=none name='set-color-*'><b>set-color-*</b> <i>color <tt>&key</tt> r g b a</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the red <code>R</code>, green <code>G</code>, blue <code>B</code> and alpha <code>A</code> components of the color <code>COLOR</code>. <code>R</code>, <code>G</code>, <code>B</code> and <code>A</code> are <code>KEY</code>word parameters having default values of <code>0</code> if unspecified. </p>
</blockquote>
<!-- End of entry for SET-COLOR-* -->
<!-- Entry for SET-COLOR-* -->
<p><br>[Method]<br><a class=none><b>set-color-*</b> <i>(color sdl-color) <tt>&key</tt> r g b a</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the components of the color <code>COLOR</code> to the red <code>R</code>, green <code>G</code>, blue <code>BLUE</code> or alpha <code>A</code> color components. </p>
</blockquote>
<!-- End of entry for SET-COLOR-* -->
<!-- Entry for SET-COLOR-KEY -->
<p><br>[Function]<br><a class=none name='set-color-key'><b>set-color-key</b> <i>color <tt>&key</tt> surface rle-accel</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the color key (transparent pixel) <code>COLOR</code> in a blittable surface <code>SURFACE</code>. </p><h5>Paremeters </h5>
<ul><li><code>COLOR</code> the color to be used as the transparent pixel of the surface when blitting, of type <a href="#color">COLOR</a>, or <a href="#color-a">COLOR-A</a>. When 'NIL' will disable color keying. </li>
<li><code>RLE-ACCEL</code> when <code>T</code> will use RLE information when blitting. See <a href="#rle-accel">RLE-CCEL</a>. </li>
</ul>
</blockquote>
<!-- End of entry for SET-COLOR-KEY -->
<!-- Entry for SET-FRAME-RATE -->
<p><br>[Function]<br><a class=none name='set-frame-rate'><b>set-frame-rate</b> <i>rate</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for SET-FRAME-RATE -->
<!-- Entry for SET-POINT -->
<p><br>[Generic function]<br><a class=none name='set-point'><b>set-point</b> <i>dst src</i> => <i>result</i></a>
<blockquote><br>
<p>Copies the <code>X</code> and <code>Y</code> coordinates to the destination <code>DST</code> from the source <code>SRC</code>. </p>
</blockquote>
<!-- End of entry for SET-POINT -->
<!-- Entry for SET-POINT -->
<p><br>[Method]<br><a class=none><b>set-point</b> <i>(dst sdl-surface) (src vector)</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the <code>X</code> and <code>Y</code> position coordinates of the surface <code>SURFACE</code>. <code>POSITION</code> is a <code>POINT</code>. </p>
</blockquote>
<!-- End of entry for SET-POINT -->
<!-- Entry for SET-POINT -->
<p><br>[Method]<br><a class=none><b>set-point</b> <i>(dst rectangle) (src vector)</i> => <i>result</i></a>
<blockquote><br>
<p>Copies the <code>X</code> and <code>Y</code> coordinates to the destination rectangle <code>RECTANGLE</code> from the source point <code>POSITION</code>. </p>
</blockquote>
<!-- End of entry for SET-POINT -->
<!-- Entry for SET-POINT -->
<p><br>[Method]<br><a class=none><b>set-point</b> <i>(dst vector) (src vector)</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the <code>X</code> and <code>Y</code> coordinates of the destination point <code>DST</code> to the coordinates in the source point <code>SRC</code>. Returns the destination point <code>DST</code>. </p>
</blockquote>
<!-- End of entry for SET-POINT -->
<!-- Entry for SET-POINT-* -->
<p><br>[Generic function]<br><a class=none name='set-point-*'><b>set-point-*</b> <i>obj <tt>&key</tt> x y</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the <code>X</code> and <code>Y</code> coordinates of the object <code>OBJ</code>. <code>X</code> and <code>Y</code> are <code>KEY</code>word parameters. </p>
</blockquote>
<!-- End of entry for SET-POINT-* -->
<!-- Entry for SET-POINT-* -->
<p><br>[Method]<br><a class=none><b>set-point-*</b> <i>(obj sdl-surface) <tt>&key</tt> x y</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the <code>X</code> and <code>Y</code> position coordinates of the surface <code>SURFACE</code>. <code>X</code> and <code>Y</code> are <code>INTEGERS</code>. </p>
</blockquote>
<!-- End of entry for SET-POINT-* -->
<!-- Entry for SET-POINT-* -->
<p><br>[Method]<br><a class=none><b>set-point-*</b> <i>(obj rectangle) <tt>&key</tt> x y</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the <code>X</code> and <code>Y</code> coordinates of the rectangle <code>RECTANGLE</code>. <code>X</code> and <code>Y</code> are <code>KEY</code>word parameters. </p>
</blockquote>
<!-- End of entry for SET-POINT-* -->
<!-- Entry for SET-POINT-* -->
<p><br>[Method]<br><a class=none><b>set-point-*</b> <i>(obj vector) <tt>&key</tt> x y</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the <code>X</code> and <code>Y</code> coordinates of the point <code>POINT</code> to <code>X</code> and <code>Y</code>. </p>
</blockquote>
<!-- End of entry for SET-POINT-* -->
<!-- Entry for SET-POSITION -->
<p><br>[Generic function]<br><a class=none name='set-position'><b>set-position</b> <i>dst src</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#set-point">SET-POINT</a></p>
</blockquote>
<!-- End of entry for SET-POSITION -->
<!-- Entry for SET-POSITION -->
<p><br>[Method]<br><a class=none><b>set-position</b> <i>(dst sdl-surface) (src vector)</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#set-point">SET-POINT</a>. </p>
</blockquote>
<!-- End of entry for SET-POSITION -->
<!-- Entry for SET-POSITION -->
<p><br>[Method]<br><a class=none><b>set-position</b> <i>(dst rectangle) (src vector)</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the <code>X</code> and <code>Y</code> coordinates of the rectangle <code>RECTANGLE</code> from the point <code>POSITION</code>. </p>
</blockquote>
<!-- End of entry for SET-POSITION -->
<!-- Entry for SET-POSITION -->
<p><br>[Method]<br><a class=none><b>set-position</b> <i>(dst vector) (src vector)</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#set-point">SET-POINT</a>. </p>
</blockquote>
<!-- End of entry for SET-POSITION -->
<!-- Entry for SET-POSITION-* -->
<p><br>[Generic function]<br><a class=none name='set-position-*'><b>set-position-*</b> <i>obj <tt>&key</tt> x y</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#set-point-*">SET-POINT-*</a></p>
</blockquote>
<!-- End of entry for SET-POSITION-* -->
<!-- Entry for SET-POSITION-* -->
<p><br>[Method]<br><a class=none><b>set-position-*</b> <i>(obj sdl-surface) <tt>&key</tt> x y</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#set-point-*">SET-POINT-*</a>. </p>
</blockquote>
<!-- End of entry for SET-POSITION-* -->
<!-- Entry for SET-POSITION-* -->
<p><br>[Method]<br><a class=none><b>set-position-*</b> <i>(obj rectangle) <tt>&key</tt> x y</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the <code>X</code> and <code>Y</code> coordinates of the rectangle <code>RECTANGLE</code>. <code>X</code> and <code>Y</code> are <code>KEY</code>word parameters. </p>
</blockquote>
<!-- End of entry for SET-POSITION-* -->
<!-- Entry for SET-POSITION-* -->
<p><br>[Method]<br><a class=none><b>set-position-*</b> <i>(obj vector) <tt>&key</tt> x y</i> => <i>result</i></a>
<blockquote><br>
<p>See <a href="#set-point-*">SET-POINT-*</a>. </p>
</blockquote>
<!-- End of entry for SET-POSITION-* -->
<!-- Entry for SET-RECTANGLE -->
<p><br>[Generic function]<br><a class=none name='set-rectangle'><b>set-rectangle</b> <i>dst src</i> => <i>result</i></a>
<blockquote><br>
<p>Copies the <code>X</code>, <code>Y</code>, <code>WIDTH</code> and <code>HEIGHT</code> coordinates to the destination rectangle <code>DST</code> from the source rectangle <code>SRC</code>. </p>
</blockquote>
<!-- End of entry for SET-RECTANGLE -->
<!-- Entry for SET-RECTANGLE -->
<p><br>[Method]<br><a class=none><b>set-rectangle</b> <i>(dst rectangle) (src rectangle)</i> => <i>result</i></a>
<blockquote><br>
<p>Copies the <code>X</code>, <code>Y</code>, <code>WIDTH</code> and <code>HEIGHT</code> coordinates to the destination rectangle <code>DST</code> from the source rectangle <code>SRC</code>. </p>
</blockquote>
<!-- End of entry for SET-RECTANGLE -->
<!-- Entry for SET-RECTANGLE-* -->
<p><br>[Generic function]<br><a class=none name='set-rectangle-*'><b>set-rectangle-*</b> <i>rectangle <tt>&key</tt> x y w h</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the <code>X</code>, <code>Y</code>, <code>WIDTH</code> and <code>HEIGHT</code> coordinates of the rectangle <code>RECTANGLE</code>. <code>X</code>, <code>Y</code>, <code>WIDTH</code> and <code>HEIGHT</code> are <code>KEY</code>word parameters having default values of <code>0</code> if unspecified. </p>
</blockquote>
<!-- End of entry for SET-RECTANGLE-* -->
<!-- Entry for SET-RECTANGLE-* -->
<p><br>[Method]<br><a class=none><b>set-rectangle-*</b> <i>(rectangle rectangle) <tt>&key</tt> x y w h</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the coordinates of the rectangle <code>RECTANGLE</code> to the specified <code>X</code>, <code>Y</code> , width <code>W</code> and height <code>HEIGHT</code> coordinates. <code>X</code>, <code>Y</code>, <code>W</code> and <code>H</code> are <code>KEY</code>word parameters of type <code>INTEGER</code>. Returns the rectangle <code>RECTANGLE</code> as RESULT. </p>
</blockquote>
<!-- End of entry for SET-RECTANGLE-* -->
<!-- Entry for SET-SURFACE -->
<p><br>[Generic function]<br><a class=none name='set-surface'><b>set-surface</b> <i>surface position</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the coordinates of the surface SURFACE to <code>POSITION</code>, where position is of type <code>POINT</code>. </p>
</blockquote>
<!-- End of entry for SET-SURFACE -->
<!-- Entry for SET-SURFACE -->
<p><br>[Method]<br><a class=none><b>set-surface</b> <i>(surface sdl-surface) (position vector)</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the coordinates of the surface <code>SURFACE</code> to <code>POSITION</code>, where position is of type <code>POINT</code>. </p>
</blockquote>
<!-- End of entry for SET-SURFACE -->
<!-- Entry for SET-SURFACE-* -->
<p><br>[Generic function]<br><a class=none name='set-surface-*'><b>set-surface-*</b> <i>surface <tt>&key</tt> x y</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the coordinates of the surface <code>SURFACE</code>. <code>X</code> and <code>Y</code> are <code>KEY</code>word parameters having default values of <code>0</code> if unspecified. </p>
</blockquote>
<!-- End of entry for SET-SURFACE-* -->
<!-- Entry for SET-SURFACE-* -->
<p><br>[Method]<br><a class=none><b>set-surface-*</b> <i>(surface sdl-surface) <tt>&key</tt> x y</i> => <i>result</i></a>
<blockquote><br>
<p>Sets the coordinates of the surface <code>SURFACE</code> to the spead <code>X</code> and <code>Y</code><code>INTEGER</code> coordinates. <code>X</code> and <code>Y</code> are <code>KEY</code>word parameters having default values of <code>0</code> if unspecified. </p>
</blockquote>
<!-- End of entry for SET-SURFACE-* -->
<!-- Entry for SHOW-CURSOR -->
<p><br>[Function]<br><a class=none name='show-cursor'><b>show-cursor</b> <i>state</i> => <i>result</i></a>
<blockquote><br>
<p>Disables the cursor when state is <code>NIL</code>, otherwise enables the cursor. </p>
</blockquote>
<!-- End of entry for SHOW-CURSOR -->
<!-- Entry for SURFACE -->
<p><br>[Standard class]<br><a class=none name='surface'><b>surface</b></a>
<blockquote><br>
<p>A subclass of 'SDL-SURFACE' that holds a standard SDL_Surface object. This object will be garbage collected and the surface freed when out of scope. </p>
</blockquote>
<!-- End of entry for SURFACE -->
<!-- Entry for SURFACE -->
<p><br>[Function]<br><a class=none name='surface'><b>surface</b> <i>surface-fp <tt>&optional</tt> display</i> => <i>result</i></a>
<blockquote><br>
<p>Creates a new <code>SURFACE</code> or a new <code>DISPLAY-SURFACE</code> when <code>DISPLAY</code> is <code>T</code>. <code>SURFACE-FP</code> must be a pointer to a valid SDL_Surface foreign object. </p>
</blockquote>
<!-- End of entry for SURFACE -->
<!-- Entry for SURFACE-INFO -->
<p><br>[Function]<br><a class=none name='surface-info'><b>surface-info</b> <i>surface <tt>&optional</tt> info</i> => <i>result</i></a>
<blockquote><br>
<p>Returns information about the SDL surface <code>SURFACE</code>. </p><h5>Parameters </h5>
<ul><li><code>SURFACE</code> is an SDL surface of type <a href="#sdl-surface">SDL-SURFACE</a>. </li>
<li><code>INFO</code> must be one of <code>NIL</code>, <a href="#sdl-sw-surface">SDL-SW-SURFACE</a>, <a href="#sdl-hw-surface">SDL-HW-SURFACE</a>, <a href="#sdl-async-blit">SDL-ASYNC-BLIT</a>, <a href="#sdl-any-format">SDL-ANY-FORMAT</a>, <a href="#sdl-hw-palette">SDL-HW-PALETTE</a>, <a href="#sdl-doublebuf">SDL-DOUBLEBUF</a>, <a href="#sdl-fullscreen">SDL-FULLSCREEN</a>, <a href="#sdl-opengl">SDL-OPENGL</a>, <a href="#sdl-resizable">SDL-RESIZABLE</a><a href="#sdl-hw-accel">SDL-HW-ACCEL</a>, <a href="#sdl-src-color-key">SDL-SRC-COLOR-KEY</a>, <a href="#sdl-rle-accel">SDL-RLE-ACCEL</a>, <a href="#sdl-src-alpha">SDL-SRC-ALPHA</a> or <a href="#sdl-pre-alloc">SDL-PRE-ALLOC</a>. </li>
</ul><h5>Returns </h5>
<p><code>INFO</code> when <code>NIL</code> will return a list of all enabled surface flags. Otherwise will return the status of <code>INFO</code> as <code>T</code> or <code>NIL</code> if supported by the surface. </p><h5>Example </h5>
<pre><code>(SURFACE-INFO A-SURFACE &#039;(SDL-HW-SURFACE SDL-HW-PALETTE SDL-HW-ACCELL))
</code></pre>
</blockquote>
<!-- End of entry for SURFACE-INFO -->
<!-- Entry for TO-DEGREE -->
<p><br>[Function]<br><a class=none name='to-degree'><b>to-degree</b> <i>radian</i> => <i>result</i></a>
<blockquote><br>
<p>Converts radians to degrees. </p>
</blockquote>
<!-- End of entry for TO-DEGREE -->
<!-- Entry for TO-RADIAN -->
<p><br>[Function]<br><a class=none name='to-radian'><b>to-radian</b> <i>degree</i> => <i>result</i></a>
<blockquote><br>
<p>Converts degrees to radians. </p>
</blockquote>
<!-- End of entry for TO-RADIAN -->
<!-- Entry for UPDATE-DISPLAY -->
<p><br>[Function]<br><a class=none name='update-display'><b>update-display</b> <i><tt>&optional</tt> surface</i> => <i>result</i></a>
<blockquote><br>
<p>When <a href="#opengl-context">OPENGL-CONTEXT</a> is <code>NIL</code>; <code>UPDATE-DISPLAY</code> will flip the SDL video buffers and update the screen <code>SURFACE</code> if <code>SDL-HW-SURFACE</code> is set in <a href="#window">WINDOW</a>. If double buffering is not enabled then SDL will perform an <a href="#sdl-update-rect">SDL-UPDATE-RECT</a> on the entire screen. </p><p>When <a href="#opengl-context">OPENGL-CONTEXT</a> is <code>T</code>; <code>UPDATE-DISPLAY</code> will call <a href="#sdl-gl-swap-buffers">SDL-GL-SWAP-BUFFERS</a> to update the OpenGL display context. </p><p><code>SURFACE</code> is bound to <code>*DEFAULT-DISPLAY*</code> if unspecified. </p>
</blockquote>
<!-- End of entry for UPDATE-DISPLAY -->
<!-- Entry for UPDATE-SURFACE -->
<p><br>[Function]<br><a class=none name='update-surface'><b>update-surface</b> <i>surface <tt>&optional</tt> template</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for UPDATE-SURFACE -->
<!-- Entry for UPDATE-SURFACE-* -->
<p><br>[Function]<br><a class=none name='update-surface-*'><b>update-surface-*</b> <i>surface x y w h</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for UPDATE-SURFACE-* -->
<!-- Entry for VIDEO-DRIVER-NAME -->
<p><br>[Function]<br><a class=none name='video-driver-name'><b>video-driver-name</b> <i></i> => <i>result</i></a>
<blockquote><br>
<p>Returns the driver name of the initialised video driver. The driver name is a <code>STRING</code> containing a one-word identifier like "x11" or "windib". Returns 'NIL' if the video driver is not already initialised with <a href="#init-sdl">INIT-SDL</a> or <a href="#with-init">WITH-INIT</a>. </p><h5>Example </h5>
<pre><code>(sdl:with-init ()
(sdl:video-driver-name))
&gt;&gt; &quot;windib&quot;
</code></pre>
</blockquote>
<!-- End of entry for VIDEO-DRIVER-NAME -->
<!-- Entry for VIDEO-INFO -->
<p><br>[Function]<br><a class=none name='video-info'><b>video-info</b> <i>info</i> => <i>result</i></a>
<blockquote><br>
<p>Returns information about the video hardware. <code>GET-VIDEO-INFO</code> must be called after SDL is initialised using <a href="#init-sdl">INIT-SDL</a> or <a href="#with-init">WITH-INIT</a>. If <code>GET-VIDEO-INFO</code> is called before <a href="#window">WINDOW</a>, the information returned is of the <EM>best</EM> video mode. If <code>GET-VIDEO-INFO</code> is called after <a href="#window">WINDOW</a>, the information returned is of the <EM>current</EM> video mode. </p><h5>Parameters </h5>
<ul><li><code>INFO</code> must be one of <code>:HW-AVAILABLE</code>, <code>:WM-AVAILABLE</code>, <code>:BLIT-HW</code>, <code>:BLIT-HW-CC</code>, <code>:BLIT-HW-A</code>, <code>:BLIT-SW</code>, <code>:BLIT-SW-CC</code>, <code>:BLIT-SW-A</code>, <code>:BLIT-FILL</code>, <code>:VIDEO-MEM</code>, <code>:PIXEL-FORMAT</code>, <code>:CURRENT-W</code> or <code>:CURRENT-H</code>. </li>
</ul><h5>Example </h5>
<pre><code>(video-info :video-mem)
</code></pre>
</blockquote>
<!-- End of entry for VIDEO-INFO -->
<!-- Entry for WIDTH -->
<p><br>[Generic accessor]<br><a class=none name='width'><b>width</b> <i>obj</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>width</b> <i>obj</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the width of the object. </p>
</blockquote>
<!-- End of entry for WIDTH -->
<!-- Entry for WIDTH -->
<p><br>[Specialized accessor]<br><a class=none><b>width</b> <i>(obj sdl-font)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>width</b> <i>(obj sdl-font)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the <code>INTEGER</code> width of the cached surface <code>SURFACE</code> in <code>FONT</code>. </p>
</blockquote>
<!-- End of entry for WIDTH -->
<!-- Entry for WIDTH -->
<p><br>[Specialized accessor]<br><a class=none><b>width</b> <i>(obj sdl-surface)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>width</b> <i>(obj sdl-surface)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the width of the surface <code>SURFACE</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for WIDTH -->
<!-- Entry for WIDTH -->
<p><br>[Specialized accessor]<br><a class=none><b>width</b> <i>(obj rectangle)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>width</b> <i>(obj rectangle)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the <code>INTEGER</code> width of the rectangle <code>RECTANGLE</code>. </p>
</blockquote>
<!-- End of entry for WIDTH -->
<!-- Entry for WINDOW -->
<p><br>[Function]<br><a class=none name='window'><b>window</b> <i>width height <tt>&key</tt> bpp flags title-caption icon-caption</i> => <i>result</i></a>
<blockquote><br>
<p>Creates a new SDL window of pixel width <code>WIDTH</code> and height <code>HEIGHT</code> using SDL_SetVideoMode. </p><p>Use <code>SDL-SW-SURFACE</code> if you plan on doing per-pixel manipulations, or blit surfaces with alpha channels, and require a high framerate. When you use hardware surfaces like <code>SDL-HW-SURFACE</code>, SDL copies the surfaces from video memory to system memory when you lock them, and back when you unlock them. This can cause a major performance hit. (Be aware that you may request a hardware surface, but receive a software surface. Many platforms can only provide a hardware surface when using <code>SDL-FULL-SCREEN.) </code>SDL-HW-SURFACE` is best used when the surfaces you'll be blitting can also be stored in video memory. </p><p><EM>Note:</EM> To control the position on the screen when creating a windowed surface, set the environment variables <code>SDL_VIDEO_CENTERED=center</code> or <code>SDL_VIDEO_WINDOW_POS=x,y</code>. These may be set using <a href="#sdl-put-env">SDL-PUT-ENV</a>. </p><h5>Parameters </h5>
<ul><li><code>WIDTH</code> the pixel width of the window, of type <code>INTEGER</code>. </li>
<li><code>HEIGHT</code> the pixel height of the window, of type <code>INTEGER</code>. If <code>WIDTH</code> and <code>HEIGHT</code> are both <code>0</code>, then the width and height of the current video mode is used (or the desktop mode, if no mode has been set). </li>
<li><code>BPP</code> the number of bits per pixel. Defaults to <code>0</code> which is the current display bits per pixel. <EM>Note:</EM> A <code>BPP</code> of <code>24</code> uses the packed representation of 3 bytes/pixel. For the more common 4 bytes/pixel mode, use a <code>BPP</code> of 32. </li>
<li><code>FLAGS</code> is a bitmasked logior of one or more of the following; <a href="#sdl-sw-surface">SDL-SW-SURFACE</a>, <a href="#sdl-hw-surface">SDL-HW-SURFACE</a>, <a href="#sdl-async-blit">SDL-ASYNC-BLIT</a>, <a href="#sdl-any-format">SDL-ANY-FORMAT</a>, <a href="#sdl-hw-palette">SDL-HW-PALETTE</a>, <a href="#sdl-doublebuf">SDL-DOUBLEBUF</a>, <a href="#sdl-fullscreen">SDL-FULLSCREEN</a>, <a href="#sdl-opengl">SDL-OPENGL</a>, <a href="#sdl-resizable">SDL-RESIZABLE</a> and <a href="#SDL-NO-FRAME">SDL-NO-FRAME</a>. </li>
<li><code>TITLE-CAPTION</code> is the title that appears in the Window title bar, of type <code>STRING</code>. </li>
<li><code>ICON-CAPTION</code> is the title that appears when the Window is minimized, of type <code>STRING</code>. </li>
</ul><h5>Returns </h5>
<ul><li>Returns a new <code>DISPLAY-SURFACE</code> if successful, <code>NIL</code> if unsuccessful. Whatever flags SDL_SetVideoMode could satisfy are set in the flags member of <code>SURFACE</code>. The <code>SURFACE</code> returned is freed by SDL and should never be freed by the caller. This rule includes consecutive calls to <code>WINDOW</code> (i.e. upon resize or resolution change) - any existing surface will be released automatically by SDL. </li>
</ul><h5>Example </h5>
<pre><code>(WINDOW 320 240 :TITLE-CAPTION &quot;Random-Rects&quot; :ICON-CAPTION &quot;Random-Rects&quot;
:FLAGS &#039;(SDL-DOUBLEBUF SDL-FULLSCREEN))
</code></pre>
</blockquote>
<!-- End of entry for WINDOW -->
<!-- Entry for WITH-BEZIER -->
<p><br>[Macro]<br><a class=none name='with-bezier'><b>with-bezier</b> <i>(shape-type <tt>&optional</tt> segments) declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
<p>Draw a bezier curve of color <code>*DEFAULT-COLOR*</code> to the surface <code>*DEFAULT-SURFACE*</code>. The shape of the Bezier curve is defined by control points. A control point is a vertex containing an X and Y coordinate pair. </p><p>The number of segments <code>SEGENTS</code> used to draw the Bezier curve defaults to 10. The greater the number of segments, the smoother the Bezier curve. </p><h5>Local Methods </h5>
<p>A vertex may be added using: </p><ul><li><code>ADD-VERTEX</code> which accepts an <code>POINT</code>, or </li>
<li><code>ADD-VERTEX-*</code> which is the x/y spread version </li>
</ul><p><code>ADD-VERTEX</code> and <code>ADD-VERTEX-*</code> are valid only within the scop of <code>WITH-BEZIER</code>. </p><h5>Parameters </h5>
<ul><li><code>SHAPE-TYPE</code> is one of <code>:LINE-STRIP</code>, <code>:LINES</code>, or <code>:POINTS</code>. When <code>SHAPE-TYPE</code> is <code>:LINE-STRIP</code>, a single continuous line is drawn through the specified waypoints. When <code>SHAPE-TYPE</code> is <code>:LINES</code>, a line is drawn to alternate waypoint pairs. When <code>SHAPE-TYPE</code> is <code>:POINTS</code>, a single point is drawn at each waypoint. </li>
<li><code>SEGMENTS</code> is the number of segments used to draw the Bezier curve. Default is 10 segments if unspecified. The greater the number of segments, the smoother the curve. </li>
</ul><h5>Example </h5>
<pre><code>(SDL:WITH-COLOR (COL (SDL:COLOR))
(WITH-BEZIER (30)
(ADD-VERTEX-* 60 40)
(ADD-VERTEX-* 160 10)
(ADD-VERTEX-* 170 150)
(ADD-VERTEX-* 60 150)))
</code></pre>
</blockquote>
<!-- End of entry for WITH-BEZIER -->
<!-- Entry for WITH-COLOR -->
<p><br>[Macro]<br><a class=none name='with-color'><b>with-color</b> <i>(var <tt>&optional</tt> color free-p) declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
<p>A convience macro that binds <code>*DEFAULT-COLOR*</code> to <code>VAR</code> within the scope of <code>WITH-COLOR</code>. <code>VAR</code> is set to <code>COLOR</code> when <code>COLOR</code> is not <code>NIL</code>.<code>VAR</code> must be of type <code>SDL-COLOR</code>. <code>VAR</code> is freed using <a href="#free-color">FREE-COLOR</a> when <code>FREE-P</code> is not <code>NIL</code>. </p>
</blockquote>
<!-- End of entry for WITH-COLOR -->
<!-- Entry for WITH-CURVE -->
<p><br>[Macro]<br><a class=none name='with-curve'><b>with-curve</b> <i>(shape-type <tt>&optional</tt> segments) declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
<p>Draw a Cattmul-Rom spline of color <code>*DEFAULT-COLOR*</code> to the surface <code>*DEFAULT-SURFACE*</code>. The shape of the curve is defined by waypoints. A waypoint is a vertex containing an X and Y coordinate pair. </p><h5>Local Methods </h5>
<p>A vertex may be added using: </p><ul><li><code>ADD-VERTEX</code> which accepts an <code>SDL:POINT</code>, or </li>
<li><code>ADD-VERTEX-*</code> which is the x/y spread version </li>
</ul><p><code>ADD-VERTEX</code> and <code>ADD-VERTEX-*</code> are valid only within the scope of <code>WITH-CURVE</code>. </p><h5>Parameters </h5>
<ul><li><code>SHAPE-TYPE</code> describes the line style used to draw the curve and may be one of <code>:LINE-STRIP</code>, <code>:LINES</code>, or <code>:POINTS</code>. Use <code>:LINE-STRIP</code> to draw a single continuous line through the specified waypoints. Use <code>:LINES</code> to draw a line between alternate waypoint pairs. Use <code>:POINTS</code> to draw a single pixel at each waypoint. </li>
<li><code>SEGMENTS</code> is the number of segments used to draw the Catmull-Rom spline. Default is 10 segments if unspecified. The greater the number of segments, the smoother the spline. </li>
</ul><h5>Example </h5>
<pre><code>(SDL:WITH-COLOR (COL (SDL:COLOR))
(WITH-CURVE (:LINE-STRIP 30)
(ADD-VERTEX-* 60 40)
(ADD-VERTEX-* 160 10)
(ADD-VERTEX-* 170 150)
(ADD-VERTEX-* 60 150)))
</code></pre>
</blockquote>
<!-- End of entry for WITH-CURVE -->
<!-- Entry for WITH-DEFAULT-FONT -->
<p><br>[Macro]<br><a class=none name='with-default-font'><b>with-default-font</b> <i>(font) declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
<p>Sets <code>*DEFAULT-FONT*</code> to the bitmap font in <code>FONT</code> within the scope of <code>WITH-DEFAULT-FONT</code>. </p><h5>Example </h5>
<pre><code>(WITH-DEFAULT-FONT (new-font)
(DRAW-CHARACTER-SHADED-* &quot;Hello World!&quot; 0 0 F-COLOR B-COLOR))
</code></pre>
</blockquote>
<!-- End of entry for WITH-DEFAULT-FONT -->
<!-- Entry for WITH-EVENTS -->
<p><br>[Macro]<br><a class=none name='with-events'><b>with-events</b> <i>(<tt>&optional</tt> type) declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
<p><code>WITH-EVENTS</code> is a convenience macro for managing the main game loop. It processes incoming SDL events and limits the game loop to the specified number of frames per second. </p><p>Both the <a href="#sdl-poll-event">SDL-POLL-EVENT</a> and <a href="#sdl-wait-event">SDL-WAIT-EVENT</a> event mechanisms are supported by specifying the <code>TYPE</code> as <code>:POLL</code> or <code>:WAIT</code> respectively. </p><p><EM>NOTE:</EM><code>WITH-EVENTS</code> must be called in the same thread used to set the video mode. </p><h5>Example </h5>
<pre><code>(SDL:WITH-EVENTS (:POLL)
(:QUIT-EVENT () T)
(:KEY-DOWN-EVENT (:KEY KEY)
(WHEN (SDL:KEY= KEY :SDL-KEY-ESCAPE)
(SDL:PUSH-QUIT-EVENT)))
(:VIDEO-EXPOSE-EVENT () (SDL:UPDATE-DISPLAY))))))
</code></pre><h5>Frame Rate Limiting </h5>
<p>The frame rate is specified using <a href="#frame-rate">FRAME-RATE</a>. For example to set the frame rate to 60 frames per second: </p><pre><code>(SETF (SDL:FRAME-RATE) 60)
</code></pre><h5>Event Syntax </h5>
<p>Events are specified using the format <code>(:EVENT-TYPE (&amp;KEYS KEYS))</code></p><ul><li><code>EVENT-TYPE</code> must be one of the following <code>KEY</code>words; <code>:ACTIVE-EVENT, :KEY-DOWN-EVENT, :KEY-UP-EVENT, :MOUSE-MOTION-EVENT, :MOUSE-BUTTON-DOWN-EVENT, :MOUSE-BUTTON-UP-EVENT, :JOY-AXIS-MOTION-EVENT, :JOY-BUTTON-DOWN-EVENT, :JOY-BUTTON-UP-EVENT, :JOY-HAT-MOTION-EVENT, :JOY-BALL-MOTION-EVENT, :VIDEO-RESIZE-EVENT, :VIDEO-EXPOSE-EVENT, :SYS-WM-EVENT, :QUIT-EVENT, :USER-EVENT</code> or <code>:IDLE</code>. </li>
<li><code>KEYS</code> specify the members of the event to return and are specific to each event type. These are discussed in detail below. </li>
</ul><p><EM>NOTE:</EM><code>:QUIT-EVENT</code> must return <code>T</code> to exit the <code>WITH-EVENT</code> macro. </p><p><EM>NOTE:</EM><code>:IDLE</code> is ignored when <code>TYPE</code> is <code>:WAIT</code>. </p><h5>Polling for Events </h5>
<p>When <code>TYPE</code> is <code>:POLL</code>, <code>WITH-EVENTS</code> will continually poll for currently pending events. If no events are available then the game loop is run and the forms in <code>:IDLE</code> are executed. </p><h5>Waiting for Events </h5>
<p>When <code>TYPE</code> is <code>:WAIT</code>, <code>WITH-EVENTS</code> will sleep indefinitely for the next available event. If no events are available then the game loop is paused. </p><h5>The :IDLE Event </h5>
<pre><code> (:IDLE ()
&amp;BODY BODY)
</code></pre><p>The <code>:IDLE</code> event is special in that it is not generated by SDL. Rather the forms in <code>:IDLE</code> are executed once each game loop after event queue is emptied. <code>:IDLE</code> is ignored when the event mechanism specified by <code>TYPE</code> is <code>:WAIT</code>. </p><h5>Active Event </h5>
<pre><code>(:ACTIVE-EVENT (:GAIN GAIN :STATE STATE)
&amp;BODY BODY)
</code></pre><p>When the mouse leaves or enters the window area an <code>SDL-APP-MOUSE-FOCUS</code> type activation event is generated. If the mouse has entered the window then <code>GAIN</code> will be <code>1</code>, otherwise <code>GAIN</code> will be <code>0</code>. An <code>SDL-APP-INPUT-FOCUS</code> type activation event occurs when the application loses or gains keyboard focus, usually when a different application is made active. Finally, an <code>SDL-APP-ACTIVE</code> type event occurs when the application is either minimised/iconified, <code>GAIN</code> is <code>0</code>, or restored. A single event can have multiple values set in <code>STATE</code>. <EM>Note:</EM> This event does not occur when an application window is first created. </p><ul><li><code>GAIN</code> is <code>0</code> if the event is a loss or <code>1</code> if it is a gain. </li>
<li><code>STATE</code> a bitmask of the following values: <code>SDL-APP-MOUSE-FOCUS</code> if mouse focus was gained or lost, <code>SDL-APP-INPUT-FOCUS</code> if input focus was gained or lost, and <code>SDL-APP-ACTIVE</code> if the application was iconified, <code>GAIN</code> is <code>0</code>, or restored <code>GAIN</code> is <code>1</code>. </li>
</ul><h5>Keyboard Events </h5>
<pre><code>(:KEY-DOWN-EVENT (:STATE STATE :SCANCODE SCANCODE :KEY KEY :MOD MOD :UNICODE UNICODE)
&amp;BODY BODY)
(:KEY-UP-EVENT (:STATE STATE :SCANCODE SCANCODE :KEY KEY :MOD MOD :UNICODE UNICODE)
&amp;BODY BODY)
</code></pre><p>A keyboard event generally occurs when a key is released or when a key is pressed. The information on the key that generated the event is stored in <code>KEY</code> and <code>MOD</code>. </p><p>The <code>SDL-CAPS-LOCK</code> and <code>SDL-NUM-LOCK</code> keys are special cases and report an <code>SDL-KEY-DOWN</code> when first pressed, then an <code>SDL-RELEASED</code> when released and pressed again. These keys KEYUP and KEYDOWN events are therefore analogous to the state of the caps lock and num lock LEDs rather than the keys themselves. These special cases are required for compatibility with Sun workstations. </p><p><EM>Note:</EM> Repeating <code>SDL-KEY-DOWN</code> events will occur if key repeat is enabled using <a href="#sdl-enable-key-repeat">SDL-ENABLE-KEY-REPEAT</a>. </p><ul><li><code>STATE</code> is <code>SDL-PRESSED</code> or <code>SDL-RELEASED</code> if the key is pressed or released respectively. </li>
<li><code>SCANCODE</code> is the hardware-dependent scancode returned by the keyboard. </li>
<li><code>KEY</code> is is the SDL-defined value of the key that generated the event. The SDL-defined value for <code>KEY</code> generally takes the following format: <code>:SDL-KEY-0</code> to <code>:SDL-KEY-1</code> for numeric keys. <code>SDL-KEY-a</code> to <code>SDL-KEY-z</code> for alpha keys in the range a-z. Other keys are generally spelled out, for example <code>SDL-KEY-PAGEDOWN</code>, <code>SDL-KEY-F1</code> or <code>SDL-KEY-NUMLOCK</code> . </li>
<li><code>MOD</code> is current state of the keyboard modifiers as explained in SDL_GetModState. One or more of <code>:SDL-KEY-MOD-NONE, :SDL-KEY-MOD-LSHIFT, :SDL-KEY-MOD-RSHIFT, :SDL-KEY-MOD-LCTRL, :SDL-KEY-MOD-RCTRL, :SDL-KEY-MOD-LALT, :SDL-KEY-MOD-RALT, :SDL-KEY-MOD-LMETA, :SDL-KEY-MOD-RMETA, :SDL-KEY-MOD-NUM, :SDL-KEY-MOD-CAPS, :SDL-KEY-MOD-MODE or :SDL-KEY-MOD-RESERVED</code>. </li>
<li><code>UNICODE</code> is the translated character. The unicode field is only used when UNICODE translation is enabled with SDL_EnableUNICODE. If unicode is non-zero then this is the UNICODE character corresponding to the keypress. If the high 9 bits of the character are 0, then this maps to the equivalent ASCII character. </li>
</ul><h5>Mouse Motion Event </h5>
<pre><code>(:MOUSE-MOTION-EVENT (:STATE STATE :X X :Y Y :X-REL X-REL :Y-REL Y-REL)
&amp;BODY BODY)
</code></pre><p>A <code>MOUSE-MOTION-EVENT</code> event occurs when the mouse moves within the application window or when <a href="#SDL-WARP-MOUSE">SDL-WARP-MOUSE</a> is called. Both the absolute <code>X</code> and <code>Y</code> and relative <code>X-REL</code> and <code>Y-REL</code> coordinates are reported along with the current button state <code>STATE</code>. The button state can be interpreted using <a href="#sdl-button">SDL-BUTTON</a>, see <a href="#sdl-get-mouse-state">SDL-GET-MOUSE-STATE</a>. </p><p>If the cursor is hidden using <a href="#sdl-show-cursor">SDL-SHOW-CURSOR</a> and the input is grabbed using <a href="#sdl-wm-grab-input">SDL-WM-GRAB-INPUT</a>, then the mouse will give relative motion events even when the cursor reaches the edge of the screen. This is currently only implemented on Windows and Linux/Unix-alikes. </p><ul><li><code>STATE</code> is the current button state. </li>
<li><code>X</code> is the <code>X</code> coordinates of the mouse </li>
<li><code>Y</code> is the <code>Y</code> coordinates of the mouse </li>
<li><code>X-REL</code> is the relative motion in the <code>X</code> direction </li>
<li><code>Y-REL</code> is the relative motion in the <code>Y</code> direction </li>
</ul><h5>Mouse Button Events </h5>
<pre><code> (:MOUSE-BUTTON-DOWN-EVENT (:BUTTON BUTTON :STATE STATE :X X :Y Y)
&amp;BODY BODY)
(:MOUSE-BUTTON-UP-EVENT (:BUTTON BUTTON :STATE STATE :X X :Y Y)
&amp;BODY BODY)
</code></pre><p>When a mouse button press or release is detected the number of the button pressed (from 1 to 255, with 1 usually being the left button and 2 the right) is placed into <code>BUTTON</code>, the position of the mouse when this event occured is stored in the <code>X</code> and the <code>Y</code> fields. </p><p>Mouse wheel events are reported as buttons 4 (up) and 5 (down). Two events are generated i.e. a <code>SDL-MOUSE-BUTTON-DOWN</code> followed by a <code>SDL-MOUSE-BUTTON-UP</code> event. </p><ul><li><code>BUTTON</code> is the mouse button index which is one of <code>SDL-BUTTON-LEFT</code>, <code>SDL-BUTTON-MIDDLE</code>, <code>SDL-BUTTON-RIGHT</code>, <code>SDL-BUTTON-WHEELUP</code> or <code>SDL-BUTTON-WHEELDOWN</code>. </li>
<li><code>STATE</code> is the state of the button which is <code>SDL-PRESSED</code> or <code>SDL-RELEASED</code>. </li>
<li><code>X</code> is the <code>X</code> coordinates of the mouse at press/release time. </li>
<li><code>Y</code> is the <code>Y</code> coordinates of the mouse at press/release time. </li>
</ul><h5>Joystick Motion Event </h5>
<pre><code>(:JOY-AXIS-MOTION-EVENT (:WHICH WHICH :AXIS AXIS :VALUE VALUE)
&amp;BODY BODY)
</code></pre><p>A JOY-AXIS-MOTION-EVENT event occurs whenever a user moves an axis on the joystick. </p><ul><li><code>WHICH</code> is the joystick device index. The index of the joystick that reported the event. </li>
<li><code>AXIS</code> is the joystick axis index </li>
<li><code>VALUE</code> is the current position of the axis (range: -32768 to 32767) </li>
</ul><h5>Joystick Button Events </h5>
<pre><code>(:JOY-BUTTON-DOWN-EVENT (:WHICH WHICH :BUTTON BUTTON :STATE STATE)
&amp;BODY BODY)
(:JOY-BUTTON-UP-EVENT (:WHICH WHICH :BUTTON BUTTON :STATE STATE)
&amp;BODY BODY)
</code></pre><p>A <code>JOY-BUTTON-DOWN-EVENT</code> or <code>JOY-BUTTON-DOWN-EVENT</code> event occurs whenever a user presses or releases a button on a joystick. </p><ul><li><code>WHICH</code> is the index of the joystick that reported the event. </li>
<li><code>BUTTON</code> is the button pressed that caused the event. </li>
<li><code>STATE</code> is the current state of the button and is either <code>SDL-PRESSED</code> or <code>SDL-RELEASED</code>. </li>
</ul><h5>Joystick Hat Motion Event </h5>
<pre><code> (:JOY-HAT-MOTION-EVENT (:WHICH WHICH :HAT HAT :VALUE VALUE)
&amp;BODY BODY)
</code></pre><p>A <code>JOY-HAT-MOTION-EVENT</code> event occurs when ever a user moves a hat on the joystick. </p><ul><li><code>WHICH</code> is the index of the joystick that reported the event. </li>
<li><code>HAT</code> is the index of the hat that generated the event. </li>
<li><code>VALUE</code> is the current position of the hat, a bitwise OR'd combination of the following values <code>SDL-HAT-CENTERED</code>, <code>SDL-HAT-UP</code>, <code>SDL-HAT-RIGHT</code>, <code>SDL-HAT-DOWN</code>, <code>SDL-HAT-LEFT</code>, <code>SDL-HAT-RIGHT-UP</code>, <code>SDL-HAT-RIGHT-DOWN</code>, <code>SDL-HAT-LEFT-UP</code> and <code>SDL-HAT-LEFT-DOWN</code>. </li>
</ul><h5>Joystick Ball Motion Event </h5>
<pre><code>(:JOY-BALL-MOTION-EVENT (:WHICH WHICH :BALL BALL :X-REL X-REL :Y-REL Y-REL)
&amp;BODY BODY)
</code></pre><p>A <code>JOY-BALL-MOTION-EVENT</code> event occurs when a user moves a trackball on the joystick. Trackballs only return relative motion. </p><ul><li><code>WHICH</code> is the index of the joystick that reported the event. </li>
<li><code>BALL</code> is the index of the trackball that generated the event. </li>
<li><code>X-REL</code> is the change in <code>X</code> position of the ball since it was last polled (last cycle of the event loop). </li>
<li><code>Y-REL</code> is the change in <code>Y</code> position of the ball since it was last polled (last cycle of the event loop). </li>
</ul><h5>Quit Event </h5>
<pre><code>(:QUIT-EVENT ()
&amp;BODY BODY)
</code></pre><p>If <code>QUIT-EVENT</code> is filtered or ignored then it is impossible for the user to close the window. If <code>QUIT-EVENT</code> is accepted and returns <code>T</code> then the application window will be closed. <EM>Note:</EM> Screen updates will continue to report success even though the application is no longer visible. If <code>QUIT-EVENT</code> is accepted and returns <code>NIL</code> then the application window will <STRONG>not</STRONG> be closed. <a href="#sdl_quit-requested">SDL_QUIT-REQUESTED</a> will return non-zero if a <code>QUIT-EVENT</code> event is pending. </p><h5>SDL Window Resize Event </h5>
<pre><code>(:VIDEO-RESIZE-EVENT (:W W :H H)
...)
</code></pre><p>When <code>SDL-RESIZABLE</code> is passed as a flag to <a href="#window">WINDOW</a>, the user is allowed to resize the application window. When the window is resized a <code>VIDEO-RESIZE-EVENT</code> event is reported, with the new window width and height values stored in <code>W</code> and <code>H</code> respectively. When an <code>VIDEO-RESIZE-EVENT</code> event is recieved the window should be resized to the new dimensions using <a href="#window">WINDOW</a>. </p><ul><li><code>W</code> is the window width as an <code>INTEGER</code>. </li>
<li><code>H</code> is the window height as an INTERGER`. </li>
</ul><h5>SDL Window Expose Event </h5>
<pre><code>(:VIDEO-EXPOSE-EVENT ()
...)
</code></pre><p><code>VIDEO-EXPOSE-EVENT</code> is triggered when the screen has been modified outside of the application, usually by the window manager, and needs to be redrawn. </p><h5>System Window Events </h5>
<pre><code>(:SYS-WM-EVENT ()
...)
</code></pre><p>The system window manager event contains a pointer to system-specific information about unknown window manager events. If this event is enabled using <a href="#sdl-event-state">SDL-EVENT-STATE</a>, it will be generated whenever unhandled events are received from the window manager. This can be used, for example, to implement cut-and-paste in your application. If you want to obtain system-specific information about the window manager, you can fill in the version member of a <code>SDL-SYS-WM-INFO</code> structure using <a href="#sdl-version">SDL-VERSION</a>, and pass it to the function: <a href="#sdl-get-wm-info">SDL-GET-WM-INFO</a></p><h5>User </h5>
<pre><code>(:USER-EVENT (:TYPE TYPE :CODE CODE :DATA1 DATA1 :DATA2 DATA2)
...)
</code></pre><p><code>USER-EVENT</code> is unique in that it is created by the user not SDL. <code>USER-EVENT</code> can be pushed onto the event queue using <a href="#push-user-event">PUSH-USER-EVENT</a>. The contents of the event are completely up to the programmer. </p><ul><li><code>TYPE</code> is a value from <code>SDL-USER-EVENT to </code>(- SDL-NUM-EVENTS 1)` inclusive. </li>
<li><code>CODE</code> is a user defined event code </li>
<li><code>DATA1</code> is a user defined data pointer </li>
<li><code>DATA2</code> is a user defined data pointer </li>
</ul><h5>Syntax </h5>
<pre><code>(WITH-EVENTS (TYPE)
(:ACTIVE-EVENT (:GAIN GAIN :STATE STATE)
... )
(:KEY-DOWN-EVENT (:STATE STATE :SCANCODE SCANCODE :KEY KEY :MOD MOD :UNICODE UNICODE)
... )
(:KEY-UP-EVENT (:STATE STATE :SCANCODE SCANCODE :KEY KEY :MOD MOD :UNICODE UNICODE)
...)
(:MOUSE-MOTION-EVENT (:STATE STATE :X X :Y Y :X-REL X-REL :Y-REL Y-REL)
...)
(:MOUSE-BUTTON-DOWN-EVENT (:BUTTON BUTTON :STATE STATE :X X :Y Y)
...)
(:MOUSE-BUTTON-UP-EVENT (:BUTTON BUTTON :STATE STATE :X X :Y Y)
...)
(:JOY-AXIS-MOTION-EVENT (:WHICH WHICH :AXIS AXIS :VALUE VALUE)
...)
(:JOY-BUTTON-DOWN-EVENT (:WHICH WHICH :BUTTON BUTTON :STATE STATE)
...)
(:JOY-BUTTON-UP-EVENT (:WHICH WHICH :BUTTON BUTTON :STATE STATE)
...)
(:JOY-HAT-MOTION-EVENT (:WHICH WHICH :HAT HAT :VALUE VALUE)
...)
(:JOY-BALL-MOTION-EVENT (:WHICH WHICH :BALL BALL :X-REL X-REL :Y-REL Y-REL)
...)
(:VIDEO-RESIZE-EVENT (:W W :H H)
...)
(:VIDEO-EXPOSE-EVENT ()
...)
(:SYS-WM-EVENT ()
...)
(:USER-EVENT (:TYPE TYPE :CODE CODE :DATA1 DATA1 :DATA2 DATA2)
...)
(:QUIT-EVENT ()
...
T)
(:IDLE ()
... ))
</code></pre>
</blockquote>
<!-- End of entry for WITH-EVENTS -->
<!-- Entry for WITH-FONT -->
<p><br>[Macro]<br><a class=none name='with-font'><b>with-font</b> <i>(font font-definition) declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
<p>Creates a new bitmap font <code>BITMAP-FONT</code> and sets <code>*DEFAULT-FONT*</code> to the bitmap font in <code>FONT</code> within the scope of <code>WITH-FONT</code>. Frees the bitmap font when <code>WITH-FONT</code> goes out of scope. </p><h5>Example </h5>
<pre><code>(WITH-FONT (new-font *font-8x8*)
(DRAW-CHARACTER-SHADED-* &quot;Hello World!&quot; 0 0 F-COLOR B-COLOR))
</code></pre>
</blockquote>
<!-- End of entry for WITH-FONT -->
<!-- Entry for WITH-INIT -->
<p><br>[Macro]<br><a class=none name='with-init'><b>with-init</b> <i>flags declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
<p><code>WITH-INIT</code> is a convenience macro that will attempt to initialise the SDL library and SDL subsystems prior to executing the forms in <code>BODY</code>. Upon exit <code>WITH-INIT</code> will uninitialize the SDL library and SDL subsystems. </p><p>The lispbuilder-sdl initialization routines are somewhat complicated by the fact that a Lisp development environment will load a foreign library once but then initialise and uninitialise the library multiple times. A C/C++ development environment will open and then close a library after each execution, freeing all resources left hanging by incomplete or buggy uninitialise functions. C libraries may therefore frequently core dump in a Lisp environment when resources are not feed properly prior to the library being reinitialized. </p><p>LISPBUILDER-SDL provides functionality affording the programmer a finer granularity of control of the initialisation/uninitialisation of foreign libraries. The fuctions that provide these capabilities are as follows: </p><ul><li><a href="#initialize-on-startup">INITIALIZE-ON-STARTUP</a></li>
<li><a href="#quit-on-exit">QUIT-ON-EXIT</a></li>
<li><a href="#list-sub-systems">LIST-SUB-SYSTEMS</a></li>
<li><a href="#return-sub-systems-of-status">RETURN-SUB-SYSTEMS-OF-STATUS</a></li>
<li><a href="#init-sub-systems">INIT-SUB-SYSTEMS</a></li>
<li><a href="#quit-sub-systems">QUIT-SUB-SYSTEMS</a></li>
<li><a href="#init-sdl">INIT-SDL</a></li>
<li><a href="#quit-sdl">QUIT-SDL</a></li>
</ul><h5>Defaults </h5>
<ul><li>By default <code>WITH-INIT</code> will only initialise the <code>SDL-INIT-VIDEO</code> SDL subsystem. Additional SDL subsystems can be initialized by calling <a href="#initialize-on-startup">INITIALIZE-ON-STARTUP</a>. </li>
<li>By default <code>WITH-INIT</code> will only uninitialise the <code>SDL-INIT-VIDEO</code> SDL subsystem. Additional SDL subsystems can be uninitialized by calling <a href="#quit-on-exit">QUIT-ON-EXIT</a>. </li>
</ul><h6>Initialisation/Uninitialisation of the SDL library </h6>
<p>The SDL library is initialised only: </p><ul><li>If the library is not yet already initialized, or </li>
<li><a href="#sdl-init-on-startup">SDL-INIT-ON-STARTUP</a> is <code>T</code>. </li>
</ul><p>The SDL library is uninitialised only: </p><ul><li>When <a href="#sdl-quit-on-exit">SDL-QUIT-ON-EXIT</a> is <code>T</code>. </li>
</ul><h6>Initialisation/Uninitialisation of external libraries </h6>
<p>Hooks are provided to allow external libraries to be initialized or uninitialised automatically following the initialisation or uninitialisation of the SDL library. </p><p>To initialise an external library, push a function that initialises the external library onto <code>*EXTERNAL-INIT-ON-STARTUP*</code>. The function must take no arguments. For example: </p><pre><code>(defun init-ttf ()
(if (is-init)
t
(sdl-ttf-cffi::ttf-init)))
(pushnew &#039;init-ttf sdl:*external-init-on-startup*)
</code></pre><p>To uninitialise an external library, push a function that uninitialises the external library onto <code>*EXTERNAL-QUIT-ON-EXIT*</code>. The function must take no arguments. For example: </p><pre><code>(defun quit-ttf ()
(if (is-init)
(sdl-ttf-cffi::ttf-quit)))
(pushnew &#039;quit-ttf sdl:*external-quit-on-exit*)
</code></pre><h5>Parameters </h5>
<ul><li><code>FLAGS</code> may be one or more of: <code>SDL-INIT-EVERYTHING</code>, <code>SDL-INIT-VIDEO</code>, <code>SDL-INIT-CDROM</code>, <code>SDL-INIT-AUDIO</code>, <code>SDL-INIT-TIMER</code>, <code>SDL-INIT-JOYSTICK</code>, <code>SDL-INIT-EVENTTHREAD</code> and <code>SDL-INIT-NOPARACHUTE</code>. <EM>Note</EM>: When <code>FLAGS</code> is set by <code>WITH-INIT</code>, subsequent calls to <a href="#initialize-on-startup">INITIALIZE-ON-STARTUP</a> and <a href="#quit-on-exit">QUIT-ON-EXIT</a> are ignored. <code>WITH-INIT</code> will only initialize and uninitialize the subsytems specified in <code>FLAGS</code>. </li>
</ul><h5>Example </h5>
<pre><code>(with-init (SDL-INIT-VIDEO SDL-INIT-CDROM SDL-INIT-AUDIO)
....)
(with-init ()
(INITIALIZE-ON-STARTUP SDL-INIT-VIDEO SDL-INIT-CDROM SDL-INIT-AUDIO)
(QUIT-ON-EXIT SDL-INIT-VIDEO SDL-INIT-CDROM SDL-INIT-AUDIO)
....)
</code></pre>
</blockquote>
<!-- End of entry for WITH-INIT -->
<!-- Entry for WITH-LOCKED-SURFACE -->
<p><br>[Macro]<br><a class=none name='with-locked-surface'><b>with-locked-surface</b> <i>(var <tt>&optional</tt> surface) declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for WITH-LOCKED-SURFACE -->
<!-- Entry for WITH-LOCKED-SURFACES -->
<p><br>[Macro]<br><a class=none name='with-locked-surfaces'><b>with-locked-surfaces</b> <i>bindings <tt>&rest</tt> body</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for WITH-LOCKED-SURFACES -->
<!-- Entry for WITH-POINT -->
<p><br>[Macro]<br><a class=none name='with-point'><b>with-point</b> <i>(var <tt>&optional</tt> point) declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
<p>A convenience macro that binds <code>*DEFAULT-POINT*</code> to <code>VAR</code> within the scope of <code>WITH-POINT</code>. <code>VAR</code> must be of type <code>POINT</code>. If <code>POINT</code> is not <code>NIL</code>, then <code>VAR is set to </code>POINT`. </p>
</blockquote>
<!-- End of entry for WITH-POINT -->
<!-- Entry for WITH-RECTANGLE -->
<p><br>[Macro]<br><a class=none name='with-rectangle'><b>with-rectangle</b> <i>(var <tt>&optional</tt> rectangle free-p) declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
<p>A convenience macro that binds <code>*DEFAULT-RECTANGLE*</code> to <code>VAR</code> within the scope of <code>WITH-RECTANGLE</code>. <code>VAR</code> must be of type <code>RECTANGLE</code>. <code>VAR</code> is set to <code>RECTANGLE</code> when <code>RECTANGLE</code> is not <code>NIL</code>. <code>VAR</code> is freed when <code>FREE-P</code> is <code>T</code>. </p><h5>Example </h5>
<pre><code>(WITH-RECTANGLE (a-rect (RECTANGLE :x 0 :y 0 :w 100 :h 100))
...)
</code></pre>
</blockquote>
<!-- End of entry for WITH-RECTANGLE -->
<!-- Entry for WITH-RECTANGLES -->
<p><br>[Macro]<br><a class=none name='with-rectangles'><b>with-rectangles</b> <i>bindings declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
<p>A convenience macro that binds multiple rectangles as per <a href="#with-rectangle">WITH-RECTANGLE</a>. </p><h5>Example </h5>
<pre><code>(WITH-RECTANGLES ((a-rect (RECTANGLE :x 0 :y 0 :w 100 :h 100))
((b-rect (RECTANGLE :x 0 :y 100 :w 100 :h 100))
((c-rect (RECTANGLE :x 0 :y 200 :w 100 :h 100)))
...)
</code></pre>
</blockquote>
<!-- End of entry for WITH-RECTANGLES -->
<!-- Entry for WITH-SHAPE -->
<p><br>[Macro]<br><a class=none name='with-shape'><b>with-shape</b> <i>(shape-type) declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
<p>Draw a polygon of color <code>*DEFAULT-COLOR*</code> to the surface <code>*DEFAULT-SURFACE*</code>. </p><h5>Local Methods </h5>
<p>A vertex may be added using: </p><ul><li><code>ADD-VERTEX</code> which accepts an <code>SDL:POINT</code>, or </li>
<li><code>ADD-VERTEX-*</code> which is the x/y spread version </li>
</ul><p>ADD-VERTEX and ADD-VERTEX-* are valid only within the scop of WITH-SHAPE. </p><h5>Parameters </h5>
<ul><li><code>SHAPE-TYPE</code> describes the line style used to draw the shape and may be one of <code>:LINE-STRIP</code>, <code>:LINES</code>, or <code>:POINTS</code>. Use <code>:LINE-STRIP</code> to draw a single continuous line through the specified waypoints. Use <code>:LINES</code> to draw a line between alternate waypoint pairs. Use <code>:POINTS</code> to draw a single pixel at each waypoint. </li>
</ul><h5>Example </h5>
<pre><code>(SDL:WITH-COLOR (COL (SDL:COLOR))
(WITH-SHAPE (:POINTS)
(ADD-VERTEX-* 60 40)
(ADD-VERTEX-* 160 10)
(ADD-VERTEX-* 170 150)
(ADD-VERTEX-* 60 150)))
</code></pre>
</blockquote>
<!-- End of entry for WITH-SHAPE -->
<!-- Entry for WITH-SURFACE -->
<p><br>[Macro]<br><a class=none name='with-surface'><b>with-surface</b> <i>(var <tt>&optional</tt> surface free-p) declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for WITH-SURFACE -->
<!-- Entry for WITH-SURFACE-SLOTS -->
<p><br>[Macro]<br><a class=none name='with-surface-slots'><b>with-surface-slots</b> <i>(var <tt>&optional</tt> surface) declaration* statement*</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for WITH-SURFACE-SLOTS -->
<!-- Entry for WITH-SURFACES -->
<p><br>[Macro]<br><a class=none name='with-surfaces'><b>with-surfaces</b> <i>bindings <tt>&rest</tt> body</i> => <i>result</i></a>
<blockquote><br>
</blockquote>
<!-- End of entry for WITH-SURFACES -->
<!-- Entry for WITHIN-RANGE -->
<p><br>[Function]<br><a class=none name='within-range'><b>within-range</b> <i>p1 p2 distance</i> => <i>result</i></a>
<blockquote><br>
<p>Returns true <code>T</code>, if the distance between the <code>POINT</code>s <code>P1</code><code>P2</code> is <= the distance <code>DISTANCE</code>. </p>
</blockquote>
<!-- End of entry for WITHIN-RANGE -->
<!-- Entry for WITHIN-RANGE-* -->
<p><br>[Function]<br><a class=none name='within-range-*'><b>within-range-*</b> <i>x1 y1 x2 y2 distance</i> => <i>result</i></a>
<blockquote><br>
<p>Returns true <code>T</code>, if the distance between the coordinates <code>X1</code>, <code>Y1</code> and <code>X2</code>, <code>Y2</code> is <= the distance <code>DISTANCE</code>. </p>
</blockquote>
<!-- End of entry for WITHIN-RANGE-* -->
<!-- Entry for X -->
<p><br>[Generic accessor]<br><a class=none name='x'><b>x</b> <i>obj</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>x</b> <i>obj</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the x coordinate of the object. </p>
</blockquote>
<!-- End of entry for X -->
<!-- Entry for X -->
<p><br>[Specialized accessor]<br><a class=none><b>x</b> <i>(obj sdl-font)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>x</b> <i>(obj sdl-font)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the <code>X</code> position of the cached surface <code>SURFACE</code> in <code>FONT</code>. </p>
</blockquote>
<!-- End of entry for X -->
<!-- Entry for X -->
<p><br>[Specialized accessor]<br><a class=none><b>x</b> <i>(obj sdl-surface)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>x</b> <i>(obj sdl-surface)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the x position coordinate of the surface <code>SURFACE</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for X -->
<!-- Entry for X -->
<p><br>[Specialized accessor]<br><a class=none><b>x</b> <i>(obj rectangle)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>x</b> <i>(obj rectangle)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the <code>X</code> position coordinate of the rectangle <code>RECTANGLE</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for X -->
<!-- Entry for X -->
<p><br>[Specialized accessor]<br><a class=none><b>x</b> <i>(obj vector)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>x</b> <i>(obj vector)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the <code>X</code> coordindate of the point <code>POINT</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for X -->
<!-- Entry for X2 -->
<p><br>[Generic accessor]<br><a class=none name='x2'><b>x2</b> <i>obj</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>x2</b> <i>obj</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns <code>(+ X WIDTH)</code> of the object. </p>
</blockquote>
<!-- End of entry for X2 -->
<!-- Entry for X2 -->
<p><br>[Specialized accessor]<br><a class=none><b>x2</b> <i>(obj rectangle)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>x2</b> <i>(obj rectangle)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Sets the WIDTH of the rectangle <code>RECTANGLE</code> to <code>(- X2 X)</code></p>
</blockquote>
<!-- End of entry for X2 -->
<!-- Entry for Y -->
<p><br>[Generic accessor]<br><a class=none name='y'><b>y</b> <i>obj</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>y</b> <i>obj</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the y coordinate of the object. </p>
</blockquote>
<!-- End of entry for Y -->
<!-- Entry for Y -->
<p><br>[Specialized accessor]<br><a class=none><b>y</b> <i>(obj sdl-font)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>y</b> <i>(obj sdl-font)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the <code>Y</code> position of the cached surface <code>SURFACE</code> in <code>FONT</code>. </p>
</blockquote>
<!-- End of entry for Y -->
<!-- Entry for Y -->
<p><br>[Specialized accessor]<br><a class=none><b>y</b> <i>(obj sdl-surface)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>y</b> <i>(obj sdl-surface)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the y position coordinate of the surface <code>SURFACE</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for Y -->
<!-- Entry for Y -->
<p><br>[Specialized accessor]<br><a class=none><b>y</b> <i>(obj rectangle)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>y</b> <i>(obj rectangle)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the <code>Y</code> position coordinate of the rectangle <code>RECTANGLE</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for Y -->
<!-- Entry for Y -->
<p><br>[Specialized accessor]<br><a class=none><b>y</b> <i>(obj vector)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>y</b> <i>(obj vector)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns the <code>Y</code> coordindate of the point <code>POINT</code> as an <code>INTEGER</code>. </p>
</blockquote>
<!-- End of entry for Y -->
<!-- Entry for Y2 -->
<p><br>[Generic accessor]<br><a class=none name='y2'><b>y2</b> <i>obj</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>y2</b> <i>obj</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns <code>(+ Y HEIGHT)</code> of the object. </p>
</blockquote>
<!-- End of entry for Y2 -->
<!-- Entry for Y2 -->
<p><br>[Specialized accessor]<br><a class=none><b>y2</b> <i>(obj rectangle)</i> => <i>result</i></a>
<br><a class=none><tt>(setf (</tt><b>y2</b> <i>(obj rectangle)</i><tt>)</tt> <i>value</i><tt>)</tt></a>
<blockquote><br>
<p>Returns <code>(+ Y HEIGHT)</code> of the rectangle <code>RECTANGLE</code>. </p>
</blockquote>
<!-- End of entry for Y2 -->
<br> <br><h3><a class=none name="ack">Acknowledgements</a></h3>
<ul>
<li>
Documentation prepared using:
</li>
<ul>
<li>
Edi Weitz's
<a href="http://weitz.de/documentation-template/">DOCUMENTATION-TEMPLATE</a>.
</li>
<li>
Gary King's
<a href="http://common-lisp.net/project/cl-markdown/">CL-MARKDOWN</a>.
</li>
</ul>
</ul>
<p>
<a href="index.html">BACK</a>
</p>
</body>
</html>