Next: Introduction, Previous: (dir), Up: (dir) [Contents][Index]
This is the cl-liballegro Reference Manual, version 0.2.15, generated automatically by Declt version 4.0 beta 2 "William Riker" on Wed Jun 15 03:49:28 2022 GMT+0.
Next: Systems, Previous: The cl-liballegro Reference Manual, Up: The cl-liballegro Reference Manual [Contents][Index]
[[http://liballeg.org/images/logo.png]] * cl-liballegro Interface and bindings to the [[https://liballeg.org/][Allegro 5 game programming library]] Check out how the [[https://github.com/resttime/cl-liballegro/tree/master/src][bindings' source code]] is organized and compare it to the [[https://liballeg.org/a5docs/trunk/][API reference]]. * Requires [[https://sourceware.org/libffi/][libffi]] * Usage 1. ~al_*~ becomes ~al:*~ 2. ~(al:rest secs)~ is ~(al:rest-time secs)~ because of symbol interference with #'cl:rest. 3. Enums/constants are shortened, check [[https://github.com/resttime/cl-liballegro/tree/master/src/constants][constants]] if you need help finding them. 4. Type names have changed too, check [[https://github.com/resttime/cl-liballegro/tree/master/src/types][types]] if you need help finding them. 5. To access slots from a C struct, you can use CFFI:MEM-REF create a plist #+BEGIN_SRC lisp (defcstruct display-mode (width :int) (height :int) (format :int) (refresh-rate :int)) (with-foreign-object (test '(:struct display-mode)) (let ((plist (mem-ref test '(:struct display-mode)))) (print plist) (print (getf plist 'width)))) #+END_SRC 6. I've got a neat *OPTIONAL* lispy interface [[https://github.com/resttime/cl-liballegro/tree/master/src/interface/interface.lisp][here]] which provides an entire fixed timestep game loop 7. Everything else is pretty much 1-to-1 8. If you're getting crashes on MacOS, put all your code into [[https://common-lisp.net/project/cffi/manual/html_node/defcallback.html][callback]] and pass it to [[https://www.allegro.cc/manual/5/al_run_main][al:run-main]]. 9. Examples exist if you get lost *Feel free to raise an issue to request a feature or for me to work on something* * Functionality Pretty much complete except: *I won't work on the following sections because Common Lisp has more suitable implementations unless there's a usecase or I'm bored.* * Memory * Threads * FAQ ** (More found under gh-pages branch) https://resttime.github.io/cl-liballegro/ ** Why can't my program find the DLL in Windows? There are path problems in Windows because the DLL files (which contain all the functions the CFFI calls upon) doesn't have a default location unlike in Unix environments. When the library loads in Windows, *it will look for the DLL in the current folder of the FILE.LISP that evaluates (ql:quickload "cl-liballegro")* This means you must have a copy of the DLL file in the directory of FILE.LISP, not in the cl-liballegro directory unless the FILE.LISP is in there. SLIME however, likes to change the default search folder to the one Emacs is in when it starts. *** With SBCL #+BEGIN_SRC ;; Open command prompt in the folder that contains both the DLL and game.lisp` > sbcl > (load "game.lisp") ; File contains (ql:quickload "cl-liballegro") #+END_SRC *** With Emacs + SLIME /game.lisp contains (ql:quickload :cl-liballegro)/ #+BEGIN_SRC ;; Looks for the DLL at /path/to/Desktop/allegro.dll C-x C-f /path/to/Desktop/file9.lisp M-x slime C-x C-f /path/to/Desktop/game/game.lisp C-c C-l #+END_SRC #+BEGIN_SRC ;; Looks for the DLL at /path/to/Desktop/game/allegro.dll C-x C-f /path/to/Desktop/file9.lisp C-x C-f /path/to/Desktop/game/game.lisp M-x slime C-c C-l #+END_SRC #+BEGIN_SRC ;; Looks for the DLL at /whatever/default/emacs/directory/allegro.dll M-x slime C-x C-f /path/to/Desktop/game/game.lisp C-c C-l #+END_SRC * Projects Various projects I've found using cl-liballegro. Feel free to add items onto the list! ** GUI / UI - [[https://github.com/lockie/cl-liballegro-nuklear][cl-liballegro-nuklear]] - Bindings to the [[https://github.com/Immediate-Mode-UI/Nuklear][nuklear]] immediate mode GUI library ** Games - [[https://awkravchuk.itch.io/darkness-looming-the-dawn][Darkness Looming: The Dawn]] - Old school hack n' slash - [[https://github.com/xFA25E/simple-asteroids][simple-asteroids]] - Simple asteroids - [[https://github.com/VyacheslavMik/tanks][tanks]] - Tanks ** Engine - [[https://github.com/lockie/d2clone-kit][d2clone-kit]] - Diablo 2 game engine * License Project under zlib license
Next: Modules, Previous: Introduction, Up: The cl-liballegro Reference Manual [Contents][Index]
The main system appears first, followed by any subsystem dependency.
Allegro 5 game programming library bindings for Common Lisp
resttime
zlib
0.2.15
src (module).
Next: Files, Previous: Systems, Up: The cl-liballegro Reference Manual [Contents][Index]
Modules are listed depth-first from the system components tree.
Next: cl-liballegro/src/constants, Previous: Modules, Up: Modules [Contents][Index]
cl-liballegro (system).
Next: cl-liballegro/src/constants/addons, Previous: cl-liballegro/src, Up: Modules [Contents][Index]
src (module).
Next: cl-liballegro/src/types, Previous: cl-liballegro/src/constants, Up: Modules [Contents][Index]
constants (module).
Next: cl-liballegro/src/types/addons, Previous: cl-liballegro/src/constants/addons, Up: Modules [Contents][Index]
src (module).
Next: cl-liballegro/src/ffi-functions, Previous: cl-liballegro/src/types, Up: Modules [Contents][Index]
types (module).
Next: cl-liballegro/src/ffi-functions/addons, Previous: cl-liballegro/src/types/addons, Up: Modules [Contents][Index]
src (module).
Next: cl-liballegro/src/interface, Previous: cl-liballegro/src/ffi-functions, Up: Modules [Contents][Index]
ffi-functions (module).
Previous: cl-liballegro/src/ffi-functions/addons, Up: Modules [Contents][Index]
src (module).
interface.lisp (file).
Next: Packages, Previous: Modules, Up: The cl-liballegro Reference Manual [Contents][Index]
Files are sorted by type and then listed depth-first from the systems components trees.
Next: cl-liballegro/src/package.lisp, Previous: Lisp, Up: Lisp [Contents][Index]
cl-liballegro (system).
Next: cl-liballegro/src/library.lisp, Previous: cl-liballegro/cl-liballegro.asd, Up: Lisp [Contents][Index]
src (module).
Next: cl-liballegro/src/constants/display.lisp, Previous: cl-liballegro/src/package.lisp, Up: Lisp [Contents][Index]
src (module).
define-allegro-library (macro).
Next: cl-liballegro/src/constants/events.lisp, Previous: cl-liballegro/src/library.lisp, Up: Lisp [Contents][Index]
constants (module).
+new-window-title-max-size+ (constant).
Next: cl-liballegro/src/constants/file-io.lisp, Previous: cl-liballegro/src/constants/display.lisp, Up: Lisp [Contents][Index]
constants (module).
Next: cl-liballegro/src/constants/filesystem.lisp, Previous: cl-liballegro/src/constants/events.lisp, Up: Lisp [Contents][Index]
constants (module).
Next: cl-liballegro/src/constants/fixed-point-math.lisp, Previous: cl-liballegro/src/constants/file-io.lisp, Up: Lisp [Contents][Index]
constants (module).
Next: cl-liballegro/src/constants/graphics.lisp, Previous: cl-liballegro/src/constants/filesystem.lisp, Up: Lisp [Contents][Index]
constants (module).
Next: cl-liballegro/src/constants/haptic.lisp, Previous: cl-liballegro/src/constants/fixed-point-math.lisp, Up: Lisp [Contents][Index]
constants (module).
Next: cl-liballegro/src/constants/joystick.lisp, Previous: cl-liballegro/src/constants/graphics.lisp, Up: Lisp [Contents][Index]
constants (module).
Next: cl-liballegro/src/constants/keyboard.lisp, Previous: cl-liballegro/src/constants/haptic.lisp, Up: Lisp [Contents][Index]
constants (module).
Next: cl-liballegro/src/constants/misc.lisp, Previous: cl-liballegro/src/constants/joystick.lisp, Up: Lisp [Contents][Index]
constants (module).
Next: cl-liballegro/src/constants/mouse.lisp, Previous: cl-liballegro/src/constants/keyboard.lisp, Up: Lisp [Contents][Index]
Next: cl-liballegro/src/constants/opengl.lisp, Previous: cl-liballegro/src/constants/misc.lisp, Up: Lisp [Contents][Index]
constants (module).
+mouse-max-extra-axes+ (constant).
Next: cl-liballegro/src/constants/touch-input.lisp, Previous: cl-liballegro/src/constants/mouse.lisp, Up: Lisp [Contents][Index]
constants (module).
Next: cl-liballegro/src/constants/shader.lisp, Previous: cl-liballegro/src/constants/opengl.lisp, Up: Lisp [Contents][Index]
constants (module).
+touch-input-max-touch-count+ (constant).
Next: cl-liballegro/src/constants/state.lisp, Previous: cl-liballegro/src/constants/touch-input.lisp, Up: Lisp [Contents][Index]
constants (module).
Next: cl-liballegro/src/constants/system.lisp, Previous: cl-liballegro/src/constants/shader.lisp, Up: Lisp [Contents][Index]
constants (module).
Next: cl-liballegro/src/constants/addons/audio.lisp, Previous: cl-liballegro/src/constants/state.lisp, Up: Lisp [Contents][Index]
constants (module).
Next: cl-liballegro/src/constants/addons/font.lisp, Previous: cl-liballegro/src/constants/system.lisp, Up: Lisp [Contents][Index]
addons (module).
+audio-pan-none+ (constant).
Next: cl-liballegro/src/constants/addons/native-dialogs.lisp, Previous: cl-liballegro/src/constants/addons/audio.lisp, Up: Lisp [Contents][Index]
addons (module).
Next: cl-liballegro/src/constants/addons/video-streaming.lisp, Previous: cl-liballegro/src/constants/addons/font.lisp, Up: Lisp [Contents][Index]
addons (module).
Next: cl-liballegro/src/types/events.lisp, Previous: cl-liballegro/src/constants/addons/native-dialogs.lisp, Up: Lisp [Contents][Index]
addons (module).
Next: cl-liballegro/src/types/filesystem.lisp, Previous: cl-liballegro/src/constants/addons/video-streaming.lisp, Up: Lisp [Contents][Index]
types (module).
Next: cl-liballegro/src/types/file-io.lisp, Previous: cl-liballegro/src/types/events.lisp, Up: Lisp [Contents][Index]
types (module).
Next: cl-liballegro/src/types/fixed-point-math.lisp, Previous: cl-liballegro/src/types/filesystem.lisp, Up: Lisp [Contents][Index]
types (module).
Next: cl-liballegro/src/types/fullscreen-modes.lisp, Previous: cl-liballegro/src/types/file-io.lisp, Up: Lisp [Contents][Index]
types (module).
Next: cl-liballegro/src/types/graphics.lisp, Previous: cl-liballegro/src/types/fixed-point-math.lisp, Up: Lisp [Contents][Index]
types (module).
display-mode-tclass (class).
Next: cl-liballegro/src/types/haptic.lisp, Previous: cl-liballegro/src/types/fullscreen-modes.lisp, Up: Lisp [Contents][Index]
types (module).
Next: cl-liballegro/src/types/joystick.lisp, Previous: cl-liballegro/src/types/graphics.lisp, Up: Lisp [Contents][Index]
types (module).
Next: cl-liballegro/src/types/keyboard.lisp, Previous: cl-liballegro/src/types/haptic.lisp, Up: Lisp [Contents][Index]
types (module).
Next: cl-liballegro/src/types/monitor.lisp, Previous: cl-liballegro/src/types/joystick.lisp, Up: Lisp [Contents][Index]
types (module).
keyboard-state-tclass (class).
Next: cl-liballegro/src/types/mouse.lisp, Previous: cl-liballegro/src/types/keyboard.lisp, Up: Lisp [Contents][Index]
types (module).
monitor-info-tclass (class).
Next: cl-liballegro/src/types/shader.lisp, Previous: cl-liballegro/src/types/monitor.lisp, Up: Lisp [Contents][Index]
types (module).
mouse-state-tclass (class).
Next: cl-liballegro/src/types/state.lisp, Previous: cl-liballegro/src/types/mouse.lisp, Up: Lisp [Contents][Index]
types (module).
shader-tclass (class).
Next: cl-liballegro/src/types/time.lisp, Previous: cl-liballegro/src/types/shader.lisp, Up: Lisp [Contents][Index]
types (module).
state-tclass (class).
Next: cl-liballegro/src/types/timer.lisp, Previous: cl-liballegro/src/types/state.lisp, Up: Lisp [Contents][Index]
types (module).
timeout-tclass (class).
Next: cl-liballegro/src/types/touch-input.lisp, Previous: cl-liballegro/src/types/time.lisp, Up: Lisp [Contents][Index]
types (module).
timer-tclass (class).
Next: cl-liballegro/src/types/transformations.lisp, Previous: cl-liballegro/src/types/timer.lisp, Up: Lisp [Contents][Index]
types (module).
Next: cl-liballegro/src/types/utf-8.lisp, Previous: cl-liballegro/src/types/touch-input.lisp, Up: Lisp [Contents][Index]
types (module).
transform-tclass (class).
Next: cl-liballegro/src/types/types.lisp, Previous: cl-liballegro/src/types/transformations.lisp, Up: Lisp [Contents][Index]
types (module).
Next: cl-liballegro/src/types/addons/audio.lisp, Previous: cl-liballegro/src/types/utf-8.lisp, Up: Lisp [Contents][Index]
types (module).
Next: cl-liballegro/src/types/addons/font.lisp, Previous: cl-liballegro/src/types/types.lisp, Up: Lisp [Contents][Index]
addons (module).
Next: cl-liballegro/src/types/addons/native-dialogs.lisp, Previous: cl-liballegro/src/types/addons/audio.lisp, Up: Lisp [Contents][Index]
addons (module).
font-tclass (class).
Next: cl-liballegro/src/ffi-functions/configuration-files.lisp, Previous: cl-liballegro/src/types/addons/font.lisp, Up: Lisp [Contents][Index]
addons (module).
Next: cl-liballegro/src/ffi-functions/display.lisp, Previous: cl-liballegro/src/types/addons/native-dialogs.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/events.lisp, Previous: cl-liballegro/src/ffi-functions/configuration-files.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/file-io.lisp, Previous: cl-liballegro/src/ffi-functions/display.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/filesystem.lisp, Previous: cl-liballegro/src/ffi-functions/events.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
fget_ustr (function).
Next: cl-liballegro/src/ffi-functions/fixed-point-math.lisp, Previous: cl-liballegro/src/ffi-functions/file-io.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/fullscreen-modes.lisp, Previous: cl-liballegro/src/ffi-functions/filesystem.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
fixsqrt (function).
Next: cl-liballegro/src/ffi-functions/graphics.lisp, Previous: cl-liballegro/src/ffi-functions/fixed-point-math.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/haptic.lisp, Previous: cl-liballegro/src/ffi-functions/fullscreen-modes.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/joystick.lisp, Previous: cl-liballegro/src/ffi-functions/graphics.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/keyboard.lisp, Previous: cl-liballegro/src/ffi-functions/haptic.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
uninstall-joystick (function).
Next: cl-liballegro/src/ffi-functions/monitor.lisp, Previous: cl-liballegro/src/ffi-functions/joystick.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/mouse.lisp, Previous: cl-liballegro/src/ffi-functions/keyboard.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/path.lisp, Previous: cl-liballegro/src/ffi-functions/monitor.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/shader.lisp, Previous: cl-liballegro/src/ffi-functions/mouse.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/state.lisp, Previous: cl-liballegro/src/ffi-functions/path.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/system.lisp, Previous: cl-liballegro/src/ffi-functions/shader.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/time.lisp, Previous: cl-liballegro/src/ffi-functions/state.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/timer.lisp, Previous: cl-liballegro/src/ffi-functions/system.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/touch-input.lisp, Previous: cl-liballegro/src/ffi-functions/time.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/transformations.lisp, Previous: cl-liballegro/src/ffi-functions/timer.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/utf-8.lisp, Previous: cl-liballegro/src/ffi-functions/touch-input.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/misc.lisp, Previous: cl-liballegro/src/ffi-functions/transformations.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/platform-specific.lisp, Previous: cl-liballegro/src/ffi-functions/utf-8.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
run-main (function).
Next: cl-liballegro/src/ffi-functions/direct3d.lisp, Previous: cl-liballegro/src/ffi-functions/misc.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
get-x-window-id (function).
Next: cl-liballegro/src/ffi-functions/opengl.lisp, Previous: cl-liballegro/src/ffi-functions/platform-specific.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/addons/audio.lisp, Previous: cl-liballegro/src/ffi-functions/direct3d.lisp, Up: Lisp [Contents][Index]
ffi-functions (module).
Next: cl-liballegro/src/ffi-functions/addons/audio-codecs.lisp, Previous: cl-liballegro/src/ffi-functions/opengl.lisp, Up: Lisp [Contents][Index]
addons (module).
Next: cl-liballegro/src/ffi-functions/addons/color.lisp, Previous: cl-liballegro/src/ffi-functions/addons/audio.lisp, Up: Lisp [Contents][Index]
addons (module).
Next: cl-liballegro/src/ffi-functions/addons/font.lisp, Previous: cl-liballegro/src/ffi-functions/addons/audio-codecs.lisp, Up: Lisp [Contents][Index]
addons (module).
Next: cl-liballegro/src/ffi-functions/addons/image-io.lisp, Previous: cl-liballegro/src/ffi-functions/addons/color.lisp, Up: Lisp [Contents][Index]
addons (module).
draw-justified-textf (macro).
Next: cl-liballegro/src/ffi-functions/addons/memfile.lisp, Previous: cl-liballegro/src/ffi-functions/addons/font.lisp, Up: Lisp [Contents][Index]
addons (module).
Next: cl-liballegro/src/ffi-functions/addons/native-dialogs.lisp, Previous: cl-liballegro/src/ffi-functions/addons/image-io.lisp, Up: Lisp [Contents][Index]
addons (module).
Next: cl-liballegro/src/ffi-functions/addons/physicsfs.lisp, Previous: cl-liballegro/src/ffi-functions/addons/memfile.lisp, Up: Lisp [Contents][Index]
addons (module).
get-native-file-dialog-path (function).
Next: cl-liballegro/src/ffi-functions/addons/primatives.lisp, Previous: cl-liballegro/src/ffi-functions/addons/native-dialogs.lisp, Up: Lisp [Contents][Index]
addons (module).
Next: cl-liballegro/src/ffi-functions/addons/video-streaming.lisp, Previous: cl-liballegro/src/ffi-functions/addons/physicsfs.lisp, Up: Lisp [Contents][Index]
addons (module).
Next: cl-liballegro/src/interface/interface.lisp, Previous: cl-liballegro/src/ffi-functions/addons/primatives.lisp, Up: Lisp [Contents][Index]
addons (module).
Previous: cl-liballegro/src/ffi-functions/addons/video-streaming.lisp, Up: Lisp [Contents][Index]
interface (module).
Next: Definitions, Previous: Files, Up: The cl-liballegro Reference Manual [Contents][Index]
Packages are listed by definition order.
Next: Indexes, Previous: Packages, Up: The cl-liballegro Reference Manual [Contents][Index]
Definitions are sorted by export status, category, package, and then by lexicographic order.
Next: Internals, Previous: Definitions, Up: Definitions [Contents][Index]
Next: Macros, Previous: Public Interface, Up: Public Interface [Contents][Index]
Next: Ordinary functions, Previous: Constants, Up: Public Interface [Contents][Index]
Next: Generic functions, Previous: Macros, Up: Public Interface [Contents][Index]
Next: Standalone methods, Previous: Ordinary functions, Up: Public Interface [Contents][Index]
automatically generated reader method
automatically generated reader method
automatically generated reader method
automatically generated reader method
automatically generated reader method
Next: Classes, Previous: Generic functions, Up: Public Interface [Contents][Index]
Previous: Standalone methods, Up: Public Interface [Contents][Index]
(cffi:foreign-alloc (quote (:union cl-liballegro:event)))
This slot is read-only.
t
0.0
30
:logic-fps
Previous: Public Interface, Up: Definitions [Contents][Index]
Next: Special variables, Previous: Internals, Up: Internals [Contents][Index]
Allow up to four extra axes for future expansion.
Next: Ordinary functions, Previous: Special variables, Up: Internals [Contents][Index]
Use macro for easier versioning. Debug using MACROEXPAND-1
Next: Generic functions, Previous: Macros, Up: Internals [Contents][Index]
Next: Classes, Previous: Ordinary functions, Up: Internals [Contents][Index]
Previous: Generic functions, Up: Internals [Contents][Index]
enhanced-foreign-type.
Initarg | Value |
---|---|
:actual-type | (quote (double)) |
enhanced-foreign-type.
Initarg | Value |
---|---|
:actual-type | (quote (float)) |
enhanced-foreign-type.
Initarg | Value |
---|---|
:actual-type | (quote (int)) |
enhanced-foreign-type.
Initarg | Value |
---|---|
:actual-type | (quote (pointer)) |
"allegro5 window"
:title
This slot is read-only.
0
:display-flags
This slot is read-only.
(quote nil)
:display-options
This slot is read-only.
Previous: Definitions, Up: The cl-liballegro Reference Manual [Contents][Index]
Jump to: | (
A B C D E F G H I J K L M N O P R S T U V W |
---|