CL-TCOD

Table of Contents

1 Internal Package: tcod

1.1 Introduction

Welcome to CL-TCOD, an interface between Common Lisp and the Doryen Library, AKA `libtcod', a portable truecolour console library intended for use with roguelike games.

CL-TCOD consists of the following files:

  1. tcod.lisp, a lisp file which creates lisp bindings for C functions in the compiled libtcod library, using the CFFI lisp foreign function interface.
  2. tcod.asd, which allows TCOD to be easily loaded and used as a library by other common lisp programs, via the ASDF library-loading facility.
  3. tcod-colours.lisp, a lisp file containing definitions for all the colours named in /etc/X11/rgb.txt; autogenerated using 'parse-rgb' (see below)
  4. parse-rgb.lisp, a lisp file containing code for parsing /etc/X11/rgb.txt and generating tcod-colours.lisp
  5. parse-rgb.asd, ASDF system definition file for parse-rgb.lisp

CL-TCOD has been tested with SBCL 1.0.36 on Linux and Windows, Clozure 1.5 on Linux and Windows, and CLISP on Windows.

**Note** that it has not been used on a Mac; if you do this you may need to tell CFFI the name of the compiled libtcod library under MacOS. To do this, open tcod.lisp in an editor, find the ='(define-foreign-library…'= clause, uncomment the ='(:macintosh…)'= line and change the string on that line to the name of the libtcod library file.

1.2 License

The CL-TCOD package is placed in the Public Domain by its author.

1.3 Dependencies

1.4 Hints on installation

You need to know your way around your chosen common lisp and how to install and load lisp libraries before proceeding. You also need to have a version of libtcod newer than 1.4.1rc2, which is the first version that includes the ='wrappers.c'= and ='wrappers.h'= source files that allow CL-TCOD to interface with libtcod.

  1. Ensure you have a working common lisp installation.
  2. Ensure the ASDF lisp library is installed.
  3. If CFFI or DEFSTAR are not installed, download and install them somewhere ASDF can find them. CFFI requires several third-party lisp libraries – see the CFFI documentation for more details.
  4. Put the CL-TCOD files in a directory where ASDF can find them.
  5. Make sure libtcod is installed and compiled. Make sure the libtcod dynamically linked library (.DLL or .SO file) is somewhere your lisp system can find it. It probably is, but if CFFI complains about being unable to find the library, you can either copy it to an appropriate directory or add its directory to the list variable cffi:*foreign-library-directories* e.g. by typing the following in the lisp interpreter:
(push #P"/my/libtcod/directory/" cffi:*foreign-library-directories*)

On windows, DLL files should be put in one of the directories listed in the PATH environment variable. You will need to put SDL.dll in the same place if you don't already have SDL installed.

On Linux, you can usually put .SO files in /usr/local/lib/. Use your package installer to install libSDL. Try running the libtcod demo programs to check everything works.

  1. Start lisp. Load ASDF, then CL-TCOD:
(load "/path/to/asdf/asdf.lisp")
(asdf:oos 'asdf:load-op :tcod)
  1. Type something like the following commands at the lisp prompt to start using TCOD from within Lisp. Alternatively you can type (tcod:hello-world), which is a function containing the code below.
(tcod:console-set-custom-font "terminal.png" '(:font-layout-ascii-in-row) 16 16)
(tcod:console-init-root 80 25 "Test" nil)
(tcod:console-clear tcod:*root*)
(tcod:console-print-left tcod:*root* 1 1 :set "Hello, world!~%")
(tcod:console-wait-for-keypress t)

1.5 Differences between CL-TCOD and libtcod

1.5.1 Naming conventions

The C function TCOD_foobar corresponds to the lisp function foobar, which is in the tcod package (and so requires a prefix of tcod: to access in most situations). Underscores become hyphens. So:

 TCOD_foobar_function(a, b)     <===>    (tcod:foobar-function a b)

`Predicate functions' are functions whose main job is to return a boolean value, true (non NIL) or false (NIL), that answers a question. These have a terminal '?' added to their name:

 TCOD_console_is_fullscreen()   <===>    (tcod:console-is-fullscreen?)

C enums have generally more succinct names. As they are lisp keywords, their names all begin with =':'=. THey are named according to the following pattern:

 TCODK_BACKSPACE (etc)         <===>  :backspace
 TCOD_CHAR_HLINE  (etc)        <===>  :char-hline
 TCOD_COLCTRL_1  (etc)         <===>  :colctrl-1
 TCOD_BKGND_SET (etc)          <===>  :set
 TCOD_FONT_LAYOUT_ASCII_INCOL  <===>  :font-layout-ascii-in-col 
 FOV_SHADOW                    <===>  :fov-shadow
 TCOD_KEY_PRESSED              <===>  :key-pressed
 CENTER                        <===>  :center

In general, most functions exist in both U.S. and non-U.S. spellings, This is mainly relevant to those functions with colour/color or centre/center in their names.

1.5.2 Colournums

In libtcod, colours are represented as structures containing three integer values: red, green and blue (each 0-255). The name of the structure type is TCOD_color_t.

In CL-TCOD, these colour structs are converted into 3-byte integers using the C functions int_to_color(int) and color_to_int(TCOD_color_t), both defined in wrappers.c. The 3 bytes are red, green and blue in order (blue is 1's). ie:

   /* C */                              ;; lisp ;;
  struct TCOD_color_t {r, g, b}  <==>   #x00RRGGBB

So, for example, one way to use the function TCOD_color_multiply_scalar from lisp is:

(tcod:color-multiply-scalar (tcod:compose-colour 218 165 32) 0.5)

All C functions that take or return TCOD_color_t structs, are wrapped by lisp functions that take or return integers as described above.

1.5.3 Colours by keyword

A lisp keyword is any symbol beginning with ':'. In lisp, keywords (like all symbols) are first-class values and can be passed around just like any other value. CL-TCOD uses keywords to refer to particular colours, for example the keyword :cyan refers to the colour #x0056A3CD (or 5678029 in decimal notation).

You can use keywords instead of colournums as arguments to lisp functions, by using the function colour to return the colournum associated with a keyword:

(tcod:colour :cyan)    ; returns 5678029

You can also define your own colour names, like so:

(tcod:make-colour :my-goldenrod 218 165 32)
(tcod:color-multiply-scalar (tcod:colour :my-goldenrod) 0.5)

CL-TCOD knows all the colour names defined in the 'rgb.txt' file under Xwindows, eg :navajo-white, :honeydew, :mint-cream, and so on. There is nothing special about the fact that rgb.txt comes from Xwindows – the colours are just named R,G,B values and can be used anywhere that CL-TCOD can be used. Look in the source file ='tcod-colours.lisp'= to see the available colour names. If you are using GNU Emacs, the king of lisp IDEs, do M-x list-colors-display to see a list of all colours.

1.5.4 Lisp format versus C printf

The TCOD functions that accept printf-like string-formatting arguments, have been modified to instead accept arguments to Common Lisp's format function.' For example:

TCOD_console_print_left (con, x, y, TCOD_BKGND_SET,
    "Printing at %d, %dn", x, y);

becomes:

(tcod:console-print-left con x y :set "Printing at ~D, ~D~%" x y)

1.5.5 Miscellaneous extra functions

(tcod:console-print-double-frame CONSOLE X Y W H EMPTY? STRING...)

1.6 Resources

1.6.1 Specific to CL-TCOD and libtcod

The latest version of CL-TCOD is available at:

http://bitbucket.org/eeeickythump/cl-tcod/

Forum for discussion of CL-TCOD and use of lisp in roguelike games:

Roguecentral Lisp forum

The latest version of libtcod is available at:

http://doryen.eptalys.net/libtcod/

This Common Lisp package depends on CFFI, the Common Foreign Function Interface:

http://common-lisp.net/project/cffi/

1.6.2 Learning Common Lisp

Recently written book, 'Practical Common Lisp'. buy hard copy or download free. Recommended, especially if coming from non-lisp languages.

*"Lisp in a Box"* – aims to make it easy to start using Common Lisp by providing a single download with everything set up in advance:

Lisp editors and IDEs:

  • GNU Emacs (the best; see below)
    • SLIME is the Emacs interface to Common Lisp.
  • Cusp, a common lisp plugin for Eclipse.
  • The Allegro and LispWorks lisp implementations each have a builtin IDE.
  • If you are on a Mac, the free, high-quality Clozure CL has a builtin IDE called Cocoa.
  • Some editors with good lisp syntax highlighting include jEdit and Notepad++

1.6.3 A note on editors and IDEs

Emacs is a very powerful program. It is mainly used as a programmers' text and source code editor, but it can do – and plugins exist to make it do – just about anything you can imagine. It is mostly written in a dialect of lisp, and this is also its extension language. When combined with SLIME, a plugin (mode) that allows it to communicate directly with a running common lisp compiler/interpreter, Emacs is not only the best IDE for common lisp, but one of the best and most advanced IDEs available for any programming language.

The downside: because Emacs + SLIME is so good, common lisp programmers have put very little effort into getting other popular programming editors/IDEs to support common lisp, at least beyond simple syntax highlighting. Emacs is an idiosyncratic program (it is about 34 years old) and despite good efforts to modernise/regularise its interface it still has a steeper learning curve than many other IDEs, especially when you are also struggling to set up SLIME and get it to communicate with your lisp…

My advice is that while all roads lead to Emacs, you don't have to hurry to get there. Initially you should concentrate on getting common lisp set up and starting to learn the language. Think about using the trial version of one of the big commercial implementations (Allegro or LispWorks), as they have built-in IDEs. Once you are ready to move on from them, install Emacs and SLIME.

1.6.4 Commercial Common Lisp implementations

These are both high quality, but painfully expensive. Luckily they have 'limited' versions that can be downloaded for free, and which I recommend you use when beginning to learn common lisp.

  • Allegro – starts at $599 USD
  • LispWorks – starts at $900 USD for a noncommercial license. The trial version quits automatically after 5 hours.

1.6.5 Full-featured, free Common Lisp implementations

Move on to one of these if and when you outgrow Allegro or LispWorks.

  • http://www.sbcl.org (compiles to machine code, great on Linux/Mac, still 'experimental' on Windows)
  • GNU CLISP (bytecode compiler, but runs pretty much everywhere)
  • Clozure CL (compiles to machine code; native to Mac but runs well on Linux and Windows; it has displaced SBCL to become my implementation of choice)
  • Embeddable Common Lisp Promising, compiles to C and then passes code to your C compiler. Does this 'on the fly' when running as an interpreter. Also designed to be easily embeddable as a scripting language.

Help & advice with lisp:

http://www.lispforum.com

1.7 External Symbols

1.7.1 External Structures


1.7.1.1 External Structure: key
1.7.1.1.1 Description

The structure used by CL-TCOD to represent key-press events. Corresponds

to the structure used by libtcod.

1.7.1.1.2 Slots

1.7.1.1.2.1 Internal Slot: vk
  • Value type: keyword
  • Initial value: :NONE
  • Initargs: none
  • Allocation: instance

1.7.1.1.2.2 Internal Slot: c
  • Value type: character
  • Initial value: #\Nul
  • Initargs: none
  • Allocation: instance

1.7.1.1.2.3 Internal Slot: pressed
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

1.7.1.1.2.4 Internal Slot: lalt
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

1.7.1.1.2.5 Internal Slot: lctrl
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

1.7.1.1.2.6 Internal Slot: ralt
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

1.7.1.1.2.7 Internal Slot: rctrl
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

1.7.1.1.2.8 Internal Slot: shift
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

1.7.1.2 External Structure: mouse
1.7.1.2.1 Description

Structure used by CL-TCOD to represent mouse status.

1.7.1.2.2 Slots

1.7.1.2.2.1 Internal Slot: x
  • Value type: uint16
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.2 Internal Slot: y
  • Value type: uint16
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.3 Internal Slot: dx
  • Value type: uint16
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.4 Internal Slot: dy
  • Value type: uint16
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.5 Internal Slot: cx
  • Value type: uint16
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.6 Internal Slot: cy
  • Value type: uint16
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.7 Internal Slot: dcx
  • Value type: uint16
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.8 Internal Slot: dcy
  • Value type: uint16
  • Initial value: 0
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.9 Internal Slot: lbutton
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.10 Internal Slot: rbutton
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.11 Internal Slot: mbutton
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.12 Internal Slot: lbutton-pressed
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.13 Internal Slot: rbutton-pressed
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

1.7.1.2.2.14 Internal Slot: mbutton-pressed
  • Value type: boolean
  • Initial value: NIL
  • Initargs: none
  • Allocation: instance

1.7.2 External Types


1.7.2.1 External Type: a*-path

Not documented.


1.7.2.2 External Type: background-flag

Not documented.


1.7.2.3 External Type: colctrl

Not documented.


1.7.2.4 External Type: console

Not documented.


1.7.2.5 External Type: dijkstra-path

Not documented.


1.7.2.6 External Type: drawing-character

Not documented.


1.7.2.7 External Type: fov-algorithm

Not documented.


1.7.2.8 External Type: heightmap

Not documented.


1.7.2.9 External Type: key-state

Not documented.


1.7.2.10 External Type: keycode

Not documented.


1.7.2.11 External Type: mapptr

Not documented.

1.7.3 External Global Variables


1.7.3.1 External Variable: *root*
1.7.3.1.1 Value
#.(SB-SYS:INT-SAP #X00000000)

Type: system-area-pointer

1.7.3.1.2 Description

The root console.


1.7.3.2 External Variable: +null+
1.7.3.2.1 Value
#.(SB-SYS:INT-SAP #X00000000)

Type: system-area-pointer

1.7.3.2.2 Description

The null pointer.

1.7.4 External Macros


1.7.4.1 External Macro: legal-console-coordinates?
1.7.4.1.1 Syntax
(legal-console-coordinates? con x y)
1.7.4.1.2 Description

Are the relative coordinates X,Y within the bounds of console CON?

1.7.5 External Functions


1.7.5.1 External Function: background-add-alpha
1.7.5.1.1 Syntax
(background-add-alpha alpha)
1.7.5.1.2 Description

Not documented.


1.7.5.2 External Function: background-alpha
1.7.5.2.1 Syntax
(background-alpha alpha)
1.7.5.2.2 Description

Not documented.


1.7.5.3 External Function: colctrl->char
1.7.5.3.1 Syntax
(colctrl->char ctrl)
1.7.5.3.2 Description

Not documented.


1.7.5.4 External Function: color
1.7.5.4.1 Syntax
(color keywd)
1.7.5.4.2 Description

Not documented.


1.7.5.5 External Function: color->grayscale
1.7.5.5.1 Syntax
(color->grayscale col)
1.7.5.5.2 Description

Not documented.


1.7.5.6 External Function: color-add
1.7.5.6.1 Syntax
(color-add c1 c2)
1.7.5.6.2 Description

Not documented.


1.7.5.7 External Function: color-equals?
1.7.5.7.1 Syntax
(color-equals? c1 c2)
1.7.5.7.2 Description

Not documented.


1.7.5.8 External Function: color-get-hsv
1.7.5.8.1 Syntax
(color-get-hsv colour)
1.7.5.8.2 Description

Not documented.


1.7.5.9 External Function: color-get-hue
1.7.5.9.1 Syntax
(color-get-hue colour)
1.7.5.9.2 Description

Not documented.


1.7.5.10 External Function: color-get-saturation
1.7.5.10.1 Syntax
(color-get-saturation colour)
1.7.5.10.2 Description

Not documented.


1.7.5.11 External Function: color-get-value
1.7.5.11.1 Syntax
(color-get-value colour)
1.7.5.11.2 Description

Not documented.


1.7.5.12 External Function: color-lerp
1.7.5.12.1 Syntax
(color-lerp c1 c2 coef)
1.7.5.12.2 Description

Not documented.


1.7.5.13 External Function: color-multiply
1.7.5.13.1 Syntax
(color-multiply c1 c2)
1.7.5.13.2 Description

Not documented.


1.7.5.14 External Function: color-multiply-scalar
1.7.5.14.1 Syntax
(color-multiply-scalar c1 value)
1.7.5.14.2 Description

Not documented.


1.7.5.15 External Function: color-set-hsv
1.7.5.15.1 Syntax
(color-set-hsv con hue sat v)
1.7.5.15.2 Description

Not documented.


1.7.5.16 External Function: colour
1.7.5.16.1 Syntax
(colour keywd)
1.7.5.16.2 Description

Given a colour keyword such as :GREY, return its corresponding RGB

value (#xRRGGBB).


1.7.5.17 External Function: colour->grayscale
1.7.5.17.1 Syntax
(colour->grayscale col)
1.7.5.17.2 Description

Not documented.


1.7.5.18 External Function: colour-add
1.7.5.18.1 Syntax
(colour-add c1 c2)
1.7.5.18.2 Description

Not documented.


1.7.5.19 External Function: colour-equals?
1.7.5.19.1 Syntax
(colour-equals? c1 c2)
1.7.5.19.2 Description

Not documented.


1.7.5.20 External Function: colour-get-hsv
1.7.5.20.1 Syntax
(colour-get-hsv c)
1.7.5.20.2 Description

Not documented.


1.7.5.21 External Function: colour-get-hue
1.7.5.21.1 Syntax
(colour-get-hue c)
1.7.5.21.2 Description

Not documented.


1.7.5.22 External Function: colour-get-saturation
1.7.5.22.1 Syntax
(colour-get-saturation c)
1.7.5.22.2 Description

Not documented.


1.7.5.23 External Function: colour-get-value
1.7.5.23.1 Syntax
(colour-get-value c)
1.7.5.23.2 Description

Not documented.


1.7.5.24 External Function: colour-lerp
1.7.5.24.1 Syntax
(colour-lerp c1 c2 coef)
1.7.5.24.2 Description

Not documented.


1.7.5.25 External Function: colour-multiply
1.7.5.25.1 Syntax
(colour-multiply c1 c2)
1.7.5.25.2 Description

Not documented.


1.7.5.26 External Function: colour-multiply-scalar
1.7.5.26.1 Syntax
(colour-multiply-scalar c1 value)
1.7.5.26.2 Description

Not documented.


1.7.5.27 External Function: colour-set-hsv
1.7.5.27.1 Syntax
(colour-set-hsv con hue sat v)
1.7.5.27.2 Description

Not documented.


1.7.5.28 External Function: compose-color
1.7.5.28.1 Syntax
(compose-color r g b)
1.7.5.28.2 Description

Not documented.


1.7.5.29 External Function: compose-colour
1.7.5.29.1 Syntax
(compose-colour r g b)
1.7.5.29.2 Description

Given three integer values R, G and B, representing the red, green and

blue components of a colour, return a 3 byte integer whose value is #xRRGGBB.


1.7.5.30 External Function: console-blit
1.7.5.30.1 Syntax
(console-blit src xsrc ysrc wsrc hsrc dest xdest ydest foreground-alpha
              background-alpha)
1.7.5.30.2 Description

Not documented.


1.7.5.31 External Function: console-check-for-keypress
1.7.5.31.1 Syntax
(console-check-for-keypress flags)
1.7.5.31.2 Description

Not documented.


1.7.5.32 External Function: console-clear
1.7.5.32.1 Syntax
(console-clear con)
1.7.5.32.2 Description

Not documented.


1.7.5.33 External Function: console-credits
1.7.5.33.1 Syntax
(console-credits)
1.7.5.33.2 Description

Not documented.


1.7.5.34 External Function: console-credits-render
1.7.5.34.1 Syntax
(console-credits-render x y alpha)
1.7.5.34.2 Description

Not documented.


1.7.5.35 External Function: console-credits-reset
1.7.5.35.1 Syntax
(console-credits-reset)
1.7.5.35.2 Description

Not documented.


1.7.5.36 External Function: console-delete
1.7.5.36.1 Syntax
(console-delete con)
1.7.5.36.2 Description

Not documented.


1.7.5.37 External Function: console-disable-keyboard-repeat
1.7.5.37.1 Syntax
(console-disable-keyboard-repeat)
1.7.5.37.2 Description

Not documented.


1.7.5.38 External Function: console-fill-char
1.7.5.38.1 Syntax
(console-fill-char con ch fx fy fw fh)
1.7.5.38.2 Description

Fill a rectangular area with the character CH.


1.7.5.39 External Function: console-flush
1.7.5.39.1 Syntax
(console-flush)
1.7.5.39.2 Description

Not documented.


1.7.5.40 External Function: console-get-back
1.7.5.40.1 Syntax
(console-get-back con x y)
1.7.5.40.2 Description

Not documented.


1.7.5.41 External Function: console-get-background-color
1.7.5.41.1 Syntax
(console-get-background-color con)
1.7.5.41.2 Description

Not documented.


1.7.5.42 External Function: console-get-background-colour
1.7.5.42.1 Syntax
(console-get-background-colour con)
1.7.5.42.2 Description

Not documented.


1.7.5.43 External Function: console-get-char
1.7.5.43.1 Syntax
(console-get-char con x y)
1.7.5.43.2 Description

Not documented.


1.7.5.44 External Function: console-get-fade
1.7.5.44.1 Syntax
(console-get-fade)
1.7.5.44.2 Description

Not documented.


1.7.5.45 External Function: console-get-fading-color
1.7.5.45.1 Syntax
(console-get-fading-color)
1.7.5.45.2 Description

Not documented.


1.7.5.46 External Function: console-get-fading-colour
1.7.5.46.1 Syntax
(console-get-fading-colour)
1.7.5.46.2 Description

Not documented.


1.7.5.47 External Function: console-get-fore
1.7.5.47.1 Syntax
(console-get-fore con x y)
1.7.5.47.2 Description

Not documented.


1.7.5.48 External Function: console-get-foreground-color
1.7.5.48.1 Syntax
(console-get-foreground-color con)
1.7.5.48.2 Description

Not documented.


1.7.5.49 External Function: console-get-foreground-colour
1.7.5.49.1 Syntax
(console-get-foreground-colour con)
1.7.5.49.2 Description

Not documented.


1.7.5.50 External Function: console-get-height
1.7.5.50.1 Syntax
(console-get-height con)
1.7.5.50.2 Description

Not documented.


1.7.5.51 External Function: console-get-width
1.7.5.51.1 Syntax
(console-get-width con)
1.7.5.51.2 Description

Not documented.


1.7.5.52 External Function: console-height-center-rect
1.7.5.52.1 Syntax
(console-height-center-rect con x y w h fmt &rest args)
1.7.5.52.2 Description

Not documented.


1.7.5.53 External Function: console-height-centre-rect
1.7.5.53.1 Syntax
(console-height-centre-rect con x y w h fmt &rest args)
1.7.5.53.2 Description

Not documented.


1.7.5.54 External Function: console-height-left-rect
1.7.5.54.1 Syntax
(console-height-left-rect con x y w h fmt &rest args)
1.7.5.54.2 Description

Not documented.


1.7.5.55 External Function: console-height-right-rect
1.7.5.55.1 Syntax
(console-height-right-rect con x y w h fmt &rest args)
1.7.5.55.2 Description

Not documented.


1.7.5.56 External Function: console-hline
1.7.5.56.1 Syntax
(console-hline con x y len flag)
1.7.5.56.2 Description

Not documented.


1.7.5.57 External Function: console-init-root
1.7.5.57.1 Syntax
(console-init-root width height title fullscreen? renderer)
1.7.5.57.2 Description

Not documented.


1.7.5.58 External Function: console-is-fullscreen?
1.7.5.58.1 Syntax
(console-is-fullscreen?)
1.7.5.58.2 Description

Not documented.


1.7.5.59 External Function: console-is-window-closed?
1.7.5.59.1 Syntax
(console-is-window-closed?)
1.7.5.59.2 Description

Not documented.


1.7.5.60 External Function: console-map-ascii-code-to-font
1.7.5.60.1 Syntax
(console-map-ascii-code-to-font asciicode fontchar-x fontchar-y)
1.7.5.60.2 Description

Not documented.


1.7.5.61 External Function: console-map-ascii-codes-to-font
1.7.5.61.1 Syntax
(console-map-ascii-codes-to-font asciicode num-codes fontchar-x fontchar-y)
1.7.5.61.2 Description

Not documented.


1.7.5.62 External Function: console-map-string-to-font
1.7.5.62.1 Syntax
(console-map-string-to-font str fontchar-x fontchar-y)
1.7.5.62.2 Description

Not documented.


1.7.5.63 External Function: console-new
1.7.5.63.1 Syntax
(console-new width height)
1.7.5.63.2 Description

Not documented.


1.7.5.64 External Function: console-print-center
1.7.5.64.1 Syntax
(console-print-center con x y flag fmt &rest args)
1.7.5.64.2 Description

Not documented.


1.7.5.65 External Function: console-print-center-rect
1.7.5.65.1 Syntax
(console-print-center-rect con x y w h flag fmt &rest args)
1.7.5.65.2 Description

Not documented.


1.7.5.66 External Function: console-print-centre
1.7.5.66.1 Syntax
(console-print-centre con x y flag fmt &rest args)
1.7.5.66.2 Description

Not documented.


1.7.5.67 External Function: console-print-centre-rect
1.7.5.67.1 Syntax
(console-print-centre-rect con x y w h flag fmt &rest args)
1.7.5.67.2 Description

Not documented.


1.7.5.68 External Function: console-print-double-frame
1.7.5.68.1 Syntax
(console-print-double-frame con x y width height empty? flag fmt &rest args)
1.7.5.68.2 Description

Not documented.


1.7.5.69 External Function: console-print-frame
1.7.5.69.1 Syntax
(console-print-frame con x y width height empty? flag fmt &rest args)
1.7.5.69.2 Description

Not documented.


1.7.5.70 External Function: console-print-left
1.7.5.70.1 Syntax
(console-print-left con x y flag fmt &rest args)
1.7.5.70.2 Description

Not documented.


1.7.5.71 External Function: console-print-left-rect
1.7.5.71.1 Syntax
(console-print-left-rect con x y w h flag fmt &rest args)
1.7.5.71.2 Description

Not documented.


1.7.5.72 External Function: console-print-right
1.7.5.72.1 Syntax
(console-print-right con x y flag fmt &rest args)
1.7.5.72.2 Description

Not documented.


1.7.5.73 External Function: console-print-right-rect
1.7.5.73.1 Syntax
(console-print-right-rect con x y w h flag fmt &rest args)
1.7.5.73.2 Description

Not documented.


1.7.5.74 External Function: console-put-char
1.7.5.74.1 Syntax
(console-put-char con x y ch flag)
1.7.5.74.2 Description

Not documented.


1.7.5.75 External Function: console-put-char-ex
1.7.5.75.1 Syntax
(console-put-char-ex con x y ch fg bg)
1.7.5.75.2 Description

Not documented.


1.7.5.76 External Function: console-rect
1.7.5.76.1 Syntax
(console-rect con x y width height clear? flag)
1.7.5.76.2 Description

Not documented.


1.7.5.77 External Function: console-set-back
1.7.5.77.1 Syntax
(console-set-back con x y col flag)
1.7.5.77.2 Description

Not documented.


1.7.5.78 External Function: console-set-background-color
1.7.5.78.1 Syntax
(console-set-background-color con col)
1.7.5.78.2 Description

Not documented.


1.7.5.79 External Function: console-set-background-colour
1.7.5.79.1 Syntax
(console-set-background-colour con col)
1.7.5.79.2 Description

Not documented.


1.7.5.80 External Function: console-set-char
1.7.5.80.1 Syntax
(console-set-char con x y ch)
1.7.5.80.2 Description

Not documented.


1.7.5.81 External Function: console-set-color-control
1.7.5.81.1 Syntax
(console-set-color-control control-num fore back)
1.7.5.81.2 Description

Not documented.


1.7.5.82 External Function: console-set-colour-control
1.7.5.82.1 Syntax
(console-set-colour-control control-num fore back)
1.7.5.82.2 Description

Not documented.


1.7.5.83 External Function: console-set-custom-font
1.7.5.83.1 Syntax
(console-set-custom-font fontfile flags chars-horizontal chars-vertical)
1.7.5.83.2 Description

Not documented.


1.7.5.84 External Function: console-set-dirty
1.7.5.84.1 Syntax
(console-set-dirty rootx rooty width height)
1.7.5.84.2 Description

Declares an area of the *root* console to be 'dirty'.


1.7.5.85 External Function: console-set-fade
1.7.5.85.1 Syntax
(console-set-fade val fade)
1.7.5.85.2 Description

Not documented.


1.7.5.86 External Function: console-set-fore
1.7.5.86.1 Syntax
(console-set-fore con x y col)
1.7.5.86.2 Description

Not documented.


1.7.5.87 External Function: console-set-foreground-color
1.7.5.87.1 Syntax
(console-set-foreground-color con col)
1.7.5.87.2 Description

Not documented.


1.7.5.88 External Function: console-set-foreground-colour
1.7.5.88.1 Syntax
(console-set-foreground-colour con col)
1.7.5.88.2 Description

Not documented.


1.7.5.89 External Function: console-set-fullscreen
1.7.5.89.1 Syntax
(console-set-fullscreen full?)
1.7.5.89.2 Description

Not documented.


1.7.5.90 External Function: console-set-keyboard-repeat
1.7.5.90.1 Syntax
(console-set-keyboard-repeat initial-delay interval)
1.7.5.90.2 Description

Not documented.


1.7.5.91 External Function: console-set-window-title
1.7.5.91.1 Syntax
(console-set-window-title title)
1.7.5.91.2 Description

Not documented.


1.7.5.92 External Function: console-vline
1.7.5.92.1 Syntax
(console-vline con x y len flag)
1.7.5.92.2 Description

Not documented.


1.7.5.93 External Function: console-wait-for-keypress
1.7.5.93.1 Syntax
(console-wait-for-keypress flush?)
1.7.5.93.2 Description

Not documented.


1.7.5.94 External Function: decompose-color
1.7.5.94.1 Syntax
(decompose-color num)
1.7.5.94.2 Description

Not documented.


1.7.5.95 External Function: decompose-colour
1.7.5.95.1 Syntax
(decompose-colour num)
1.7.5.95.2 Description

Given a colournum #xRRGGBB, return R, G and B integer values

as 3 separate return values.


1.7.5.96 External Function: dijkstra-compute
1.7.5.96.1 Syntax
(dijkstra-compute dijkstra-path rootx rooty)
1.7.5.96.2 Description

Compute paths leading to the point at (ROOTX, ROOTY), using the

Dijkstra algorithm.


1.7.5.97 External Function: dijkstra-delete
1.7.5.97.1 Syntax
(dijkstra-delete dijkstra-path)
1.7.5.97.2 Description

Delete a Dijkstra path object.


1.7.5.98 External Function: dijkstra-get
1.7.5.98.1 Syntax
(dijkstra-get dijkstra-path index)
1.7.5.98.2 Description

Return the INDEXth step in the path from its current origin to its current

destination.


1.7.5.99 External Function: dijkstra-get-distance
1.7.5.99.1 Syntax
(dijkstra-get-distance dijkstra-path to-x to-y)
1.7.5.99.2 Description

Return the number of steps on the path leading from the root node to

the point at (TO-X, TO-Y).


1.7.5.100 External Function: dijkstra-is-empty?
1.7.5.100.1 Syntax
(dijkstra-is-empty? dijkstra-path)
1.7.5.100.2 Description

Return true if the path object is empty (has zero steps).


1.7.5.101 External Function: dijkstra-new
1.7.5.101.1 Syntax
(dijkstra-new map diagonal-cost)
1.7.5.101.2 Description

Return a new Dijkstra path object which uses MAP.


1.7.5.102 External Function: dijkstra-new-using-function
1.7.5.102.1 Syntax
(dijkstra-new-using-function xdim ydim callback user-data diagonal-cost)
1.7.5.102.2 Description

Return a new Dijkstra path object which calls the function CALLBACK to

calculate movement costs.


1.7.5.103 External Function: dijkstra-path-set
1.7.5.103.1 Syntax
(dijkstra-path-set dijkstra-path to-x to-y)
1.7.5.103.2 Description

Return true if a path can be found leading from the root node to the

point at (TO-X, TO-Y).


1.7.5.104 External Function: dijkstra-path-walk
1.7.5.104.1 Syntax
(dijkstra-path-walk dijkstra-path)
1.7.5.104.2 Description

Move one step along PATH. The path becomes one step shorter. Returns

the coordinates of the new location.


1.7.5.105 External Function: dijkstra-size
1.7.5.105.1 Syntax
(dijkstra-size dijkstra-path)
1.7.5.105.2 Description

Return the number of steps in the path.


1.7.5.106 External Function: heightmap-add
1.7.5.106.1 Syntax
(heightmap-add heightmap value)
1.7.5.106.2 Description

Add VALUE to all heights in the heightmap.


1.7.5.107 External Function: heightmap-add-fbm
1.7.5.107.1 Syntax
(heightmap-add-fbm heightmap noise mulx muly addx addy octaves delta scale)
1.7.5.107.2 Description

Add values from the random noise object NOISE to all heights in

equivalent positions in HEIGHTMAP.


1.7.5.108 External Function: heightmap-add-hm
1.7.5.108.1 Syntax
(heightmap-add-hm hm1 hm2 result)
1.7.5.108.2 Description

Add the heights in HM1 to heights in equivalent positions in

HM2, and store the results in the heightmap RESULT.


1.7.5.109 External Function: heightmap-clamp
1.7.5.109.1 Syntax
(heightmap-clamp heightmap min max)
1.7.5.109.2 Description

If any height in HEIGHTMAP is below MIN or above MAX, set it

equal to MIN or MAX respectively.


1.7.5.110 External Function: heightmap-clear
1.7.5.110.1 Syntax
(heightmap-clear heightmap)
1.7.5.110.2 Description

Set all the heights in the heightmap to zero.


1.7.5.111 External Function: heightmap-copy
1.7.5.111.1 Syntax
(heightmap-copy source dest)
1.7.5.111.2 Description

Copy the heightmap SOURCE into the heightmap object DEST.


1.7.5.112 External Function: heightmap-count-cells
1.7.5.112.1 Syntax
(heightmap-count-cells heightmap min max)
1.7.5.112.2 Description

Return the number of cells in HEIGHTMAP which contain heights between

MIN and MAX.


1.7.5.113 External Function: heightmap-delete
1.7.5.113.1 Syntax
(heightmap-delete heightmap)
1.7.5.113.2 Description

Destroy the heightmap object HEIGHTMAP.


1.7.5.114 External Function: heightmap-dig-bezier
1.7.5.114.1 Syntax
(heightmap-dig-bezier heightmap coords start-radius start-depth end-radius
                      end-depth)
1.7.5.114.2 Description

Carve a path through HEIGHTMAP using a cubic Bezier curve.


1.7.5.115 External Function: heightmap-dig-line
1.7.5.115.1 Syntax
(heightmap-dig-line heightmap x1 y1 x2 y2 radius depth)
1.7.5.115.2 Description

Not documented.


1.7.5.116 External Function: heightmap-get-interpolated-value
1.7.5.116.1 Syntax
(heightmap-get-interpolated-value heightmap x y)
1.7.5.116.2 Description

Calculate the height at position (X, Y) in the heightmap, where the

coordinates might not be integers.


1.7.5.117 External Function: heightmap-get-max
1.7.5.117.1 Syntax
(heightmap-get-max heightmap)
1.7.5.117.2 Description

Return the highest height in HEIGHTMAP.


1.7.5.118 External Function: heightmap-get-min
1.7.5.118.1 Syntax
(heightmap-get-min heightmap)
1.7.5.118.2 Description

Return the lowest height in HEIGHTMAP.


1.7.5.119 External Function: heightmap-get-slope
1.7.5.119.1 Syntax
(heightmap-get-slope heightmap x y)
1.7.5.119.2 Description

Return the slope at position (X, Y) in the heightmap. The value returned

will be between 0 and pi/2.


1.7.5.120 External Function: heightmap-get-value
1.7.5.120.1 Syntax
(heightmap-get-value heightmap x y)
1.7.5.120.2 Description

Return the height at position (X, Y) in the heightmap.


1.7.5.121 External Function: heightmap-has-land-on-border?
1.7.5.121.1 Syntax
(heightmap-has-land-on-border? heightmap waterlevel)
1.7.5.121.2 Description

Return true if any of the border cells of HEIGHTMAP have heights greater

than WATERLEVEL.


1.7.5.122 External Function: heightmap-lerp
1.7.5.122.1 Syntax
(heightmap-lerp hm1 hm2 result coef)
1.7.5.122.2 Description

Fill the heightmap RESULT with the results of a lerp operation between

the two heightmaps HM1 and HM2.


1.7.5.123 External Function: heightmap-multiply-hm
1.7.5.123.1 Syntax
(heightmap-multiply-hm hm1 hm2 result)
1.7.5.123.2 Description

Multiply the heights in HM1 by the heights in equivalent positions in

HM2, and store the results in the heightmap RESULT.


1.7.5.124 External Function: heightmap-new
1.7.5.124.1 Syntax
(heightmap-new width height)
1.7.5.124.2 Description

Return a new heightmap with the given dimensions.


1.7.5.125 External Function: heightmap-normalise
1.7.5.125.1 Syntax
(heightmap-normalise heightmap min max)
1.7.5.125.2 Description

Not documented.


1.7.5.126 External Function: heightmap-normalize
1.7.5.126.1 Syntax
(heightmap-normalize heightmap min max)
1.7.5.126.2 Description

Scale all the heights in HEIGHTMAP so that the lowest is equal to

MIN and the highest is equal to MAX.


1.7.5.127 External Function: heightmap-rain-erosion
1.7.5.127.1 Syntax
(heightmap-rain-erosion heightmap num-drops erosion-coef sedimentation-coef
                        &optional (rng +null+))
1.7.5.127.2 Description

'Erode' the heightmap HEIGHTMAP by dropping NUM-DROPS 'raindrops' in

random locations.


1.7.5.128 External Function: heightmap-scale
1.7.5.128.1 Syntax
(heightmap-scale heightmap factor)
1.7.5.128.2 Description

Multiply all the heights in the heightmap by SCALE.


1.7.5.129 External Function: heightmap-set-value
1.7.5.129.1 Syntax
(heightmap-set-value heightmap x y value)
1.7.5.129.2 Description

Set the height at position (X, Y) in the heightmap to VALUE.


1.7.5.130 External Function: image-blit
1.7.5.130.1 Syntax
(image-blit image con x y flag scalex scaley angle)
1.7.5.130.2 Description

Not documented.


1.7.5.131 External Function: image-blit-rect
1.7.5.131.1 Syntax
(image-blit-rect image con x y width height flag)
1.7.5.131.2 Description

Not documented.


1.7.5.132 External Function: image-clear
1.7.5.132.1 Syntax
(image-clear image colour)
1.7.5.132.2 Description

Fill the image IMAGE with the colour COLOUR.


1.7.5.133 External Function: image-from-console
1.7.5.133.1 Syntax
(image-from-console con)
1.7.5.133.2 Description

Return a new image whose contents are a 'screenshot' of the

console CON.


1.7.5.134 External Function: image-get-mipmap-pixel
1.7.5.134.1 Syntax
(image-get-mipmap-pixel image x0 y0 x1 y1)
1.7.5.134.2 Description

Calculate the interpolated colour of the pixel at (PIXEL-X, PIXEL-Y) in =IMAGE=.


1.7.5.135 External Function: image-get-pixel
1.7.5.135.1 Syntax
(image-get-pixel image pixel-x pixel-y)
1.7.5.135.2 Description

Return the colour of the pixel at (PIXEL-X, PIXEL-Y) in IMAGE.


1.7.5.136 External Function: image-load
1.7.5.136.1 Syntax
(image-load filename)
1.7.5.136.2 Description

Read an image from a file and return it.


1.7.5.137 External Function: image-new
1.7.5.137.1 Syntax
(image-new width height)
1.7.5.137.2 Description

Return a new image, filled with black.


1.7.5.138 External Function: image-put-pixel
1.7.5.138.1 Syntax
(image-put-pixel image pixel-x pixel-y colour)
1.7.5.138.2 Description

Set the colour of the pixel at (PIXEL-X, PIXEL-Y) in IMAGE to COLOUR.


1.7.5.139 External Function: image-save
1.7.5.139.1 Syntax
(image-save image filename)
1.7.5.139.2 Description

Write the image IMAGE to a file. The filename must end in .BMP or =.PNG=.


1.7.5.140 External Function: image-set-key-color
1.7.5.140.1 Syntax
(image-set-key-color image key-color)
1.7.5.140.2 Description

Not documented.


1.7.5.141 External Function: image-set-key-colour
1.7.5.141.1 Syntax
(image-set-key-colour image key-colour)
1.7.5.141.2 Description

Not documented.


1.7.5.142 External Function: invert-color
1.7.5.142.1 Syntax
(invert-color num)
1.7.5.142.2 Description

Not documented.


1.7.5.143 External Function: invert-colour
1.7.5.143.1 Syntax
(invert-colour num)
1.7.5.143.2 Description

Not documented.


1.7.5.144 External Function: is-key-pressed?
1.7.5.144.1 Syntax
(is-key-pressed? code)
1.7.5.144.2 Description

Not documented.


1.7.5.145 External Function: key-c
1.7.5.145.1 Syntax
(key-c instance)
1.7.5.145.2 Description

A place for clients to stash things.


1.7.5.146 External Function: key-lalt
1.7.5.146.1 Syntax
(key-lalt instance)
1.7.5.146.2 Description

A place for clients to stash things.


1.7.5.147 External Function: key-lctrl
1.7.5.147.1 Syntax
(key-lctrl instance)
1.7.5.147.2 Description

A place for clients to stash things.


1.7.5.148 External Function: key-p
1.7.5.148.1 Syntax
(key-p object)
1.7.5.148.2 Description

T if OBJECT is a PROCESS, NIL otherwise.


1.7.5.149 External Function: key-pressed
1.7.5.149.1 Syntax
(key-pressed instance)
1.7.5.149.2 Description

A place for clients to stash things.


1.7.5.150 External Function: key-ralt
1.7.5.150.1 Syntax
(key-ralt instance)
1.7.5.150.2 Description

A place for clients to stash things.


1.7.5.151 External Function: key-rctrl
1.7.5.151.1 Syntax
(key-rctrl instance)
1.7.5.151.2 Description

A place for clients to stash things.


1.7.5.152 External Function: key-shift
1.7.5.152.1 Syntax
(key-shift instance)
1.7.5.152.2 Description

A place for clients to stash things.


1.7.5.153 External Function: key-vk
1.7.5.153.1 Syntax
(key-vk instance)
1.7.5.153.2 Description

A place for clients to stash things.


1.7.5.154 External Function: make-color
1.7.5.154.1 Syntax
(make-color kwd r g b)
1.7.5.154.2 Description

Not documented.


1.7.5.155 External Function: make-colour
1.7.5.155.1 Syntax
(make-colour kwd r g b)
1.7.5.155.2 Description

Not documented.


1.7.5.156 External Function: make-key
1.7.5.156.1 Syntax

(make-key &key ((vk dum172) none) ((c dum173) ) ((pressed dum174) nil) ((lalt dum175) nil) ((lctrl dum176) nil) ((ralt dum177) nil) ((rctrl dum178) nil) ((shift dum179) nil))

1.7.5.156.2 Description

Not documented.


1.7.5.157 External Function: make-mouse
1.7.5.157.1 Syntax
(make-mouse &key ((x dum370) 0) ((y dum371) 0) ((dx dum372) 0) ((dy dum373) 0)
            ((cx dum374) 0) ((cy dum375) 0) ((dcx dum376) 0) ((dcy dum377) 0)
            ((lbutton dum378) nil) ((rbutton dum379) nil)
            ((mbutton dum380) nil) ((lbutton-pressed dum381) nil)
            ((rbutton-pressed dum382) nil) ((mbutton-pressed dum383) nil))
1.7.5.157.2 Description

Not documented.


1.7.5.158 External Function: make-simple-key
1.7.5.158.1 Syntax
(make-simple-key ch)
1.7.5.158.2 Description

Not documented.


1.7.5.159 External Function: map-clear
1.7.5.159.1 Syntax
(map-clear map)
1.7.5.159.2 Description

Set all cells in MAP to be neither walkable nor transparent.


1.7.5.160 External Function: map-compute-fov
1.7.5.160.1 Syntax
(map-compute-fov map player-x player-y max-radius light-walls? algorithm)
1.7.5.160.2 Description

Compute field of view information for MAP, assuming the player is at

(PLAYER-X, PLAYER-Y), and using the field of view algorithm ALGORITHM.


1.7.5.161 External Function: map-copy
1.7.5.161.1 Syntax
(map-copy map-src map-dest)
1.7.5.161.2 Description

Copy the map object SRC into the new map object DEST.


1.7.5.162 External Function: map-delete
1.7.5.162.1 Syntax
(map-delete map)
1.7.5.162.2 Description

Destroy the map object MAP.


1.7.5.163 External Function: map-is-in-fov?
1.7.5.163.1 Syntax
(map-is-in-fov? map x y)
1.7.5.163.2 Description

Return true if position (X, Y) on the map is visible.


1.7.5.164 External Function: map-is-transparent?
1.7.5.164.1 Syntax
(map-is-transparent? map x y)
1.7.5.164.2 Description

Return true if position (X, Y) on the map is set to be transparent.


1.7.5.165 External Function: map-is-walkable?
1.7.5.165.1 Syntax
(map-is-walkable? map x y)
1.7.5.165.2 Description

Return true if position (X, Y) on the map is set to be walkable.


1.7.5.166 External Function: map-new
1.7.5.166.1 Syntax
(map-new width height)
1.7.5.166.2 Description

Return a new map object of the given dimensions.


1.7.5.167 External Function: map-set-properties
1.7.5.167.1 Syntax
(map-set-properties map x y transparent? walkable?)
1.7.5.167.2 Description

Set the properties of the map cell at (X, Y). It is walkable if

walkable? is true, and transparent if transparent? is true.


1.7.5.168 External Function: mouse-cx
1.7.5.168.1 Syntax
(mouse-cx instance)
1.7.5.168.2 Description

A place for clients to stash things.


1.7.5.169 External Function: mouse-cy
1.7.5.169.1 Syntax
(mouse-cy instance)
1.7.5.169.2 Description

A place for clients to stash things.


1.7.5.170 External Function: mouse-dx
1.7.5.170.1 Syntax
(mouse-dx instance)
1.7.5.170.2 Description

A place for clients to stash things.


1.7.5.171 External Function: mouse-dy
1.7.5.171.1 Syntax
(mouse-dy instance)
1.7.5.171.2 Description

A place for clients to stash things.


1.7.5.172 External Function: mouse-get-cx
1.7.5.172.1 Syntax
(mouse-get-cx)
1.7.5.172.2 Description

Not documented.


1.7.5.173 External Function: mouse-get-cy
1.7.5.173.1 Syntax
(mouse-get-cy)
1.7.5.173.2 Description

Not documented.


1.7.5.174 External Function: mouse-get-dcx
1.7.5.174.1 Syntax
(mouse-get-dcx)
1.7.5.174.2 Description

Not documented.


1.7.5.175 External Function: mouse-get-dcy
1.7.5.175.1 Syntax
(mouse-get-dcy)
1.7.5.175.2 Description

Not documented.


1.7.5.176 External Function: mouse-get-dx
1.7.5.176.1 Syntax
(mouse-get-dx)
1.7.5.176.2 Description

Not documented.


1.7.5.177 External Function: mouse-get-dy
1.7.5.177.1 Syntax
(mouse-get-dy)
1.7.5.177.2 Description

Not documented.


1.7.5.178 External Function: mouse-get-lbutton
1.7.5.178.1 Syntax
(mouse-get-lbutton)
1.7.5.178.2 Description

Not documented.


1.7.5.179 External Function: mouse-get-lbutton-pressed
1.7.5.179.1 Syntax
(mouse-get-lbutton-pressed)
1.7.5.179.2 Description

Not documented.


1.7.5.180 External Function: mouse-get-mbutton
1.7.5.180.1 Syntax
(mouse-get-mbutton)
1.7.5.180.2 Description

Not documented.


1.7.5.181 External Function: mouse-get-mbutton-pressed
1.7.5.181.1 Syntax
(mouse-get-mbutton-pressed)
1.7.5.181.2 Description

Not documented.


1.7.5.182 External Function: mouse-get-rbutton
1.7.5.182.1 Syntax
(mouse-get-rbutton)
1.7.5.182.2 Description

Not documented.


1.7.5.183 External Function: mouse-get-rbutton-pressed
1.7.5.183.1 Syntax
(mouse-get-rbutton-pressed)
1.7.5.183.2 Description

Not documented.


1.7.5.184 External Function: mouse-get-status
1.7.5.184.1 Syntax
(mouse-get-status)
1.7.5.184.2 Description

Not documented.


1.7.5.185 External Function: mouse-get-x
1.7.5.185.1 Syntax
(mouse-get-x)
1.7.5.185.2 Description

Not documented.


1.7.5.186 External Function: mouse-get-y
1.7.5.186.1 Syntax
(mouse-get-y)
1.7.5.186.2 Description

Not documented.


1.7.5.187 External Function: mouse-lbutton
1.7.5.187.1 Syntax
(mouse-lbutton instance)
1.7.5.187.2 Description

A place for clients to stash things.


1.7.5.188 External Function: mouse-lbutton-pressed
1.7.5.188.1 Syntax
(mouse-lbutton-pressed instance)
1.7.5.188.2 Description

A place for clients to stash things.


1.7.5.189 External Function: mouse-mbutton
1.7.5.189.1 Syntax
(mouse-mbutton instance)
1.7.5.189.2 Description

A place for clients to stash things.


1.7.5.190 External Function: mouse-mbutton-pressed
1.7.5.190.1 Syntax
(mouse-mbutton-pressed instance)
1.7.5.190.2 Description

A place for clients to stash things.


1.7.5.191 External Function: mouse-move
1.7.5.191.1 Syntax
(mouse-move pixel-x pixel-y)
1.7.5.191.2 Description

Not documented.


1.7.5.192 External Function: mouse-rbutton
1.7.5.192.1 Syntax
(mouse-rbutton instance)
1.7.5.192.2 Description

A place for clients to stash things.


1.7.5.193 External Function: mouse-rbutton-pressed
1.7.5.193.1 Syntax
(mouse-rbutton-pressed instance)
1.7.5.193.2 Description

A place for clients to stash things.


1.7.5.194 External Function: mouse-x
1.7.5.194.1 Syntax
(mouse-x instance)
1.7.5.194.2 Description

A place for clients to stash things.


1.7.5.195 External Function: mouse-y
1.7.5.195.1 Syntax
(mouse-y instance)
1.7.5.195.2 Description

A place for clients to stash things.


1.7.5.196 External Function: noise-delete
1.7.5.196.1 Syntax
(noise-delete noise)
1.7.5.196.2 Description

Destroy a noise object.


1.7.5.197 External Function: noise-fbm-perlin
1.7.5.197.1 Syntax
(noise-fbm-perlin noise octaves &rest nums)
1.7.5.197.2 Description

Returns the value of the fractal Brownian motion noise function at the given

coordinates, using the Hurst and lacunarity values given when the noise

object was created.


1.7.5.198 External Function: noise-new
1.7.5.198.1 Syntax
(noise-new dimensions &key (hurst +noise-default-hurst+)
           (lacunarity +noise-default-lacunarity+) (rng +null+))
1.7.5.198.2 Description

Return a new noise object with the given characteristics.


1.7.5.199 External Function: noise-perlin
1.7.5.199.1 Syntax
(noise-perlin noise &rest nums)
1.7.5.199.2 Description

Returns the value of the Perlin noise function at the given coordinates.


1.7.5.200 External Function: noise-simplex
1.7.5.200.1 Syntax
(noise-simplex noise &rest nums)
1.7.5.200.2 Description

Returns the value of the simplex noise function at the given coordinates.


1.7.5.201 External Function: noise-turbulence-perlin
1.7.5.201.1 Syntax
(noise-turbulence-perlin noise octaves &rest nums)
1.7.5.201.2 Description

Returns the value of the turbulence noise function at the given coordinates.


1.7.5.202 External Function: path-compute
1.7.5.202.1 Syntax
(path-compute a*-path ox oy dx dy)
1.7.5.202.2 Description

Compute the path between the two points (OX,OY) and (DX,DY), using the

A* algorithm.


1.7.5.203 External Function: path-delete
1.7.5.203.1 Syntax
(path-delete a*-path)
1.7.5.203.2 Description

Delete an A* path object.


1.7.5.204 External Function: path-get
1.7.5.204.1 Syntax
(path-get a*-path index)
1.7.5.204.2 Description

Return the INDEXth step in the path from its current origin to its current

destination.


1.7.5.205 External Function: path-get-destination
1.7.5.205.1 Syntax
(path-get-destination a*-path)
1.7.5.205.2 Description

Return the coordinates of the current destination of the A* path PATH.


1.7.5.206 External Function: path-get-origin
1.7.5.206.1 Syntax
(path-get-origin a*-path)
1.7.5.206.2 Description

Return the coordinates of the current origin of the A* path PATH.


1.7.5.207 External Function: path-is-empty?
1.7.5.207.1 Syntax
(path-is-empty? a*-path)
1.7.5.207.2 Description

Return true if the path object is empty (has zero steps).


1.7.5.208 External Function: path-new-using-function
1.7.5.208.1 Syntax
(path-new-using-function xdim ydim callback user-data diagonal-cost)
1.7.5.208.2 Description

Return a new A* path object, which will call the function CALLBACK to

calculate movement costs.


1.7.5.209 External Function: path-new-using-map
1.7.5.209.1 Syntax
(path-new-using-map map diagonal-cost)
1.7.5.209.2 Description

Return a new A* path object, using the map MAP.


1.7.5.210 External Function: path-size
1.7.5.210.1 Syntax
(path-size a*-path)
1.7.5.210.2 Description

Return the number of steps in the path.


1.7.5.211 External Function: path-walk
1.7.5.211.1 Syntax
(path-walk a*-path recalc-when-needed?)
1.7.5.211.2 Description

Move one step along PATH. The path becomes one step shorter. Returns

the coordinates of the new location.


1.7.5.212 External Function: random-delete
1.7.5.212.1 Syntax
(random-delete rng)
1.7.5.212.2 Description

Not documented.


1.7.5.213 External Function: random-get-float
1.7.5.213.1 Syntax
(random-get-float rng min max)
1.7.5.213.2 Description

Not documented.


1.7.5.214 External Function: random-get-instance
1.7.5.214.1 Syntax
(random-get-instance)
1.7.5.214.2 Description

Not documented.


1.7.5.215 External Function: random-get-int
1.7.5.215.1 Syntax
(random-get-int rng min max)
1.7.5.215.2 Description

Not documented.


1.7.5.216 External Function: random-new
1.7.5.216.1 Syntax
(random-new algorithm)
1.7.5.216.2 Description

Not documented.


1.7.5.217 External Function: same-keys?
1.7.5.217.1 Syntax
(same-keys? key1 key2)
1.7.5.217.2 Description

Not documented.


1.7.5.218 External Function: start-colors
1.7.5.218.1 Syntax
(start-colors)
1.7.5.218.2 Description

Not documented.


1.7.5.219 External Function: start-colours
1.7.5.219.1 Syntax
(start-colours)
1.7.5.219.2 Description

Not documented.


1.7.5.220 External Function: sys-get-current-resolution
1.7.5.220.1 Syntax
(sys-get-current-resolution)
1.7.5.220.2 Description

Not documented.


1.7.5.221 External Function: sys-get-fps
1.7.5.221.1 Syntax
(sys-get-fps)
1.7.5.221.2 Description

Not documented.


1.7.5.222 External Function: sys-save-screenshot
1.7.5.222.1 Syntax
(sys-save-screenshot &optional (filename (null-pointer)))
1.7.5.222.2 Description

Not documented.


1.7.5.223 External Function: sys-set-fps
1.7.5.223.1 Syntax
(sys-set-fps val)
1.7.5.223.2 Description

Not documented.


1.7.5.224 External Function: sys-sleep-milli
1.7.5.224.1 Syntax
(sys-sleep-milli val)
1.7.5.224.2 Description

Not documented.

1.8 Index

1.8.1 Nonalphabetic

1.8.2 A

1.8.3 B

1.8.4 C

1.8.5 D

1.8.6 F

1.8.8 I

1.8.9 K

1.8.10 L

1.8.11 M

1.8.12 N

1.8.13 P

1.8.14 R

1.8.15 S

2 Colophon

This documentation was generated from Common Lisp source code using CLOD, version 1.0. The latest version of CLOD is available here.

Author: Paul Sexton <eeeickythump@gmail.com>

Date: 2010-03-19 20:55:54 NZDT

HTML generated by org-mode 6.34trans in emacs 23