
d2clone kit
0.1.0Generic Diablo 2 clone game engine.
Diablo 2 is arguably one of the best action RPG created ever. This is humble attempt to recreate and, hopefully, deconstruct it using Common Lisp programming language and related techniques.
Features
- Support for Tiled map format.
- Support for Aseprite sprite format.
- Entity-Component-System implementation.
- Powerful events subsystem (courtesy of Shinmera's deeds library).
- 2D renderer with functional interface.
- Sprite batching subsystem.
- Naïve implementation of A* pathfinding algorithm.
- Powerful debugging facilities, including visual debugging.
- Loading assets from zip files.
- Simple yet powerful configuration subsystem.
- Logging subsystem.
Installation
d2clone-kit requires liballegro to function. To install liballegro, refer to your distribution's package manager; for instance, on Debian derivatives (including Ubuntu and Mint):
sudo apt-get install liballegro-acodec5.2 liballegro-audio5.2 liballegro-image5.2 \
liballegro-dialog5.2 liballegro-ttf5.2 liballegro-physfs5.2 liballegro-video5.2
Currently the following Common Lisp implementations are tested and supported by d2clone-kit:
You can run it on x86_64 Linux, OS X, and Windows, while SBCL on Linux is the recommended platform.
To install d2clone-kit, clone the repository to your Quicklisp's local-projects
directory (assuming you have Quicklisp installed):
$ git clone https://gitlab.com/lockie/d2clone-kit ~/quicklisp/local-projects/d2clone-kit
$ sbcl --quit --eval "(progn (ql:register-local-projects) (ql:quickload :d2clone-kit))"
Glossary
- map coordinates - world coordinates of tile in staggered map grid.
- prefab - system-specific object loaded from file and used as a template to create new instances of system's component.
- viewport coordinates - screen pixel coordinates relative to the current camera position.
- world coordinates - floating point in-game world coordinates. One unit of length corresponds to one map tile width, typically 64 pixels.
Legal
d2clone-kit is licensed under the GNU GPL license version 3. See LICENSE.
Diablo® II - Copyright © 2000 Blizzard Entertainment, Inc. All rights reserved. Diablo and Blizzard Entertainment are trademarks or registered trademarks of Blizzard Entertainment, Inc. in the U.S. and/or other countries.
d2clone-kit and any of its maintainers are in no way associated with or endorsed by Blizzard Entertainment®.
System Information
Definition Index
-
D2CLONE-KIT
- D2C
Generic Diablo 2 clone game engine.
-
EXTERNAL CLASS ALLEGRO-EVENT
Event class representing low-level liballegro event.
-
EXTERNAL CLASS BINARY-STREAM
Wrapper around liballegro file APIs.
-
EXTERNAL CLASS CAMERA-SYSTEM
Handles camera entity.
-
EXTERNAL CLASS CHARACTER-MOVED
Event class issued when a character is about to move.
-
EXTERNAL CLASS CHARACTER-STREAM
Wrapper around liballegro file APIs.
-
EXTERNAL CLASS CHARACTER-SYSTEM
Handles sprites that are able to walk and collide with obstacles.
-
EXTERNAL CLASS COLLISION-SYSTEM
Handles object collisions.
To make tile collide (e.g. be non-walkable by characters), set custom boolean property collides to true in Tiled tileset.
-
EXTERNAL CLASS COMBAT-SYSTEM
Handles close combat.
-
EXTERNAL CLASS COMPONENT-CREATED
Event class issued when a new component is created.
-
EXTERNAL CLASS COORDINATE-SYSTEM
Stores world coordinates.
-
EXTERNAL CLASS DEBUG-SYSTEM
Handles drawing of various debug information.
-
EXTERNAL CLASS ENTITY-DIED
Event class issued when entity's HP reaches zero.
-
EXTERNAL CLASS EVENT-LOOP
Event loop class.
To avoid overhead of managing the foreign pointers to allegro events, we use simple synchronous single-threaded event loop for now.
-
EXTERNAL CLASS HP-SYSTEM
Handles hit points.
-
EXTERNAL CLASS MANA-SYSTEM
Handles mana points.
-
EXTERNAL CLASS MAP-SYSTEM
Handles map chunks in Tiled format.
The following format features are unsupported yet:
- maps made in Tiled < v0.15
- tile flipping
- external tileset files
- non-staggered maps
- stagger axis other than Y
- odd tile size
Also only integer map coordinates allowed for map chunks, otherwise the screen <-> map conversion maths are badly fucked up.
-
EXTERNAL CLASS MOB-SYSTEM
Handles mobs.
-
EXTERNAL CLASS PLAYER-SYSTEM
Handles player character.
-
EXTERNAL CLASS QUIT
Quit event class.
Do not handle liballegro's :DISPLAY-CLOSE event, handle this instead.
-
EXTERNAL CLASS SOUND-SYSTEM
Handles sounds.
-
EXTERNAL CLASS SPRITE-BATCH-SYSTEM
Handles ordered sprite batches.
-
EXTERNAL CLASS SPRITE-SYSTEM
Handles movable sprites in Aseprite format.
The following format features are unsupported yet:
- color modes other than RGBA
- group layers
- layer blend modes
- linked cels
-
EXTERNAL CLASS SYSTEM
Base class for all ECS systems.
-
EXTERNAL CLASS VIRTUAL-BINARY-STREAM
Read-only binary Gray stream based on SIMPLE-ARRAY of UNSIGNED-BYTE.
-
EXTERNAL STRUCTURE GROWABLE-VECTOR
A simple vector of dynamic size.
-
EXTERNAL STRUCTURE PRIORITY-QUEUE
A simple priority queue with DOUBLE-FLOAT priorities.
-
EXTERNAL STRUCTURE SPARSE-MATRIX
A high-watermark sparse matrix, implemented as a dictionary of keys.
-
EXTERNAL TYPE-DEFINITION ANGLE
Angle value in radians.
-
EXTERNAL FUNCTION (SETF %GROWABLE-VECTOR-REF)
- VALUE
- GROWABLE-VECTOR
- INDEX
Access GROWABLE-VECTOR by INDEX with no bounds checking whatsoever.
-
EXTERNAL FUNCTION A*
- START-X
- START-Y
- GOAL-X
- GOAL-Y
Runs A* algorithm to find path from point START-X, START-Y to GOAL-X, GOAL-Y. Returns simple array containing conses of x and y path node world coordinates.
Note: if goal point is not walkable, this function will stuck.
-
EXTERNAL FUNCTION ABSOLUTE->VIEWPORT
- X
- Y
Converts given integer absolute screen coordinates to viewport coordinates.
-
EXTERNAL FUNCTION ADD-DEBUG-POINT
- ENTITY
- X
- Y
- R
- G
- B
- &OPTIONAL
- A
Adds point with screen coordinates X, Y and color R, G, B, A to debug buffer ENTITY.
-
EXTERNAL FUNCTION ADD-DEBUG-RECTANGLE
- ENTITY
- X
- Y
- W
- H
- COLOR
Adds rectangle with screen coordinates X, Y, dimensions W, H and color COLOR to debug buffer ENTITY.
-
EXTERNAL FUNCTION ADD-DEBUG-TEXT
- DESIGNATOR
- TEXT
- &REST
- ARGS
Adds debug text TEXT using FORMAT-like arguments ARGS to display on top left corner of the screen. To identify same text line each frame, set keyword DESIGNATOR to same value.
-
EXTERNAL FUNCTION ADD-DEBUG-TILE-RHOMB
- ENTITY
- X
- Y
- COLOR
- MARK
Adds grid rhomb with screen coordinates X, Y and color COLOR to debug buffer ENTITY. If MARK is T, then rhomb is drawn crossed out.
-
EXTERNAL FUNCTION ADD-SPRITE-INDEX-TO-BATCH
- ENTITY
- ORDER
- INDEX
- SCREEN-X
- SCREEN-Y
Adds sprite to sprite batch ENTITY using order ORDER, sprite index INDEX and screen coordinates SCREEN-X, SCREEN-Y.
-
EXTERNAL FUNCTION ADD-SPRITE-TO-BATCH
- ENTITY
- ORDER
- IMAGE-X
- IMAGE-Y
- SCREEN-X
- SCREEN-Y
Adds sprite to sprite batch ENTITY using order ORDER, sprite coordinates IMAGE-X, IMAGE-Y and screen coordinates SCREEN-X, SCREEN-Y.
-
EXTERNAL FUNCTION ATTACK
- ATTACKER-ENTITY
- TARGET-ENTITY
Initiates a close combat attack of TARGET-ENTITY by ATTACKER-ENTITY.
-
EXTERNAL FUNCTION CAMERA-ENTITY
Returns current camera entity.
-
EXTERNAL FUNCTION CAMERA-TARGET
Returns current camera target, i.e. the entity camera tracks.
-
EXTERNAL FUNCTION (SETF CAMERA-TARGET)
- TARGET
Sets current camera target, i.e. the entity camera tracks. Set to NIL to stop camera tracking.
-
EXTERNAL FUNCTION COLLIDESP
- X
- Y
- &KEY
- CHARACTER
Returns whether tile located at integer map coordinates X, Y does collide with other objects. CHARACTER, when non-NIL, specifies character entity to check for collisions with other characters.
-
EXTERNAL FUNCTION DEADP
- ENTITY
Returns T when ENTITY is dead.
-
EXTERNAL FUNCTION DELETE-ENTITY
- ENTITY
Deletes entity ENTITY.
-
EXTERNAL FUNCTION DEMO
Runs built-in engine demo.
-
EXTERNAL FUNCTION DO-DRAW
- RENDERER
Calls renderer functions scheduled within renderer instance RENDERER in accordance with their respective Z order values.
-
EXTERNAL FUNCTION FACE-TARGET
- CHARACTER-X
- CHARACTER-Y
- TARGET-X
- TARGET-Y
Returns the angle that the character at CHARACTER-X, CHARACTER-Y should be facing to look at point TARGET-X, TARGET-Y.
-
EXTERNAL FUNCTION GAME-LOOP
- EVENT-QUEUE
- &KEY
- REPL-UPDATE-INTERVAL
Runs game loop.
-
EXTERNAL FUNCTION GROUND-LAYER-P
- LAYER
Returns T if map chunk layer LAYER is ground layer (i.e. has "ground" property).
-
EXTERNAL FUNCTION GROWABLE-VECTOR-CLEAR
- GROWABLE-VECTOR
Removes all elements from GROWABLE-VECTOR.
-
EXTERNAL FUNCTION GROWABLE-VECTOR-FREEZE
- GROWABLE-VECTOR
- &KEY
- ELEMENT-TYPE
Creates SIMPLE-ARRAY of ELEMENT-TYPE holding the same elements that GROWABLE-VECTOR holds.
-
EXTERNAL FUNCTION GROWABLE-VECTOR-LENGTH
- GROWABLE-VECTOR
Returns GROWABLE-VECTOR length (i.e. current actual element count).
-
EXTERNAL FUNCTION GROWABLE-VECTOR-REF
- GROWABLE-VECTOR
- INDEX
Access GROWABLE-VECTOR by INDEX.
-
EXTERNAL FUNCTION (SETF GROWABLE-VECTOR-REF)
- VALUE
- GROWABLE-VECTOR
- INDEX
Access GROWABLE-VECTOR by INDEX, growing if necessary (when index is greater than current allocated size).
-
EXTERNAL FUNCTION HANDLE-EVENT
- EVENT
Broadcasts liballegro event EVENT through ECS systems. Returns T when EVENT is not :DISPLAY-CLOSE.
-
EXTERNAL FUNCTION LOG-DEBUG
- MESSAGE
- &REST
- ARGS
Adds formatted message MESSAGE using placeholder arguments ARGS to liballegro debug channel.
-
EXTERNAL FUNCTION LOG-ERROR
- MESSAGE
- &REST
- ARGS
Adds formatted message MESSAGE using placeholder arguments ARGS to liballegro error channel.
-
EXTERNAL FUNCTION LOG-INFO
- MESSAGE
- &REST
- ARGS
Adds formatted message MESSAGE using placeholder arguments ARGS to liballegro info channel.
-
EXTERNAL FUNCTION LOG-WARN
- MESSAGE
- &REST
- ARGS
Adds formatted message MESSAGE using placeholder arguments ARGS to liballegro warn channel.
-
EXTERNAL FUNCTION MAKE-ENTITY
Allocates new entity.
-
EXTERNAL FUNCTION MAKE-ENTITY-INITIALIZER
- SPEC
Creates FUNCALL'able entity initializer following specification SPEC structured as follows:
'((:system-name1 :component-parameter1 "value1" :component-parameter2 2.0) (:system-name2 :prefab :prefab-name) ;; ... )
Corresponding systems are created by initializer function on-demand.
-
EXTERNAL FUNCTION MAKE-GROWABLE-VECTOR
- &KEY
- INITIAL-ELEMENT
- INITIAL-ALLOCATED-SIZE
Creates new growable vector with initial allocated size INITIAL-ALLOCATED-SIZE (1 by default) and initial element INITIAL-ELEMENT (NIL by default).
-
EXTERNAL FUNCTION MAKE-PRIORITY-QUEUE
- KEY-FN
Creates priority queue using key extraction function KEY-FN.
Note: keys are expected to be DOUBLE-FLOATs.
-
EXTERNAL FUNCTION MAKE-RENDERER
Creates functional renderer instance.
-
EXTERNAL FUNCTION MAKE-SPARSE-MATRIX
Creates new sparse matrix.
-
EXTERNAL FUNCTION MAP->SCREEN
- X
- Y
Converts map coordinates to screen pixel coordinates.
See SCREEN->MAP
See SCREEN->MAP* -
EXTERNAL FUNCTION MOUSE-POSITION
- &OPTIONAL
- EVENT
Get current mouse cursor coordinates using liballegro mouse event EVENT or by calling al_get_mouse_state.
-
EXTERNAL FUNCTION PLAYER-ENTITY
Returns current player entity.
-
EXTERNAL FUNCTION PRIORITY-QUEUE-CLEAR
- QUEUE
Clears priority queue QUEUE.
-
EXTERNAL FUNCTION PRIORITY-QUEUE-FIND
- QUEUE
- ELEMENT
Finds ELEMENT's position in QUEUE. Returns NIL if there's no such element. O(log N) complexity.
-
EXTERNAL FUNCTION PRIORITY-QUEUE-POP
- QUEUE
Removes and returns the first (priority-wise) element in QUEUE.
-
EXTERNAL FUNCTION PRIORITY-QUEUE-PUSH
- QUEUE
- ELEMENT
Adds element ELEMENT to priority queue QUEUE.
-
EXTERNAL FUNCTION PRIORITY-QUEUE-PUSH-MANY
- QUEUE
- ELEMENTS
Adds elements from vector ELEMENTS to priority queue QUEUE.
A bit more performance-friendly than calling PRIORITY-QUEUE-PUSH many times (but complexity is still O(N log N)).
-
EXTERNAL FUNCTION PRIORITY-QUEUE-REMOVE
- QUEUE
- INDEX
Removes element from QUEUE denoted by INDEX.
-
EXTERNAL FUNCTION PRIORITY-QUEUE-TRAVERSE
- QUEUE
- FN
Calls one argument function FN on elements of priority queue QUEUE in appropriate order.
-
EXTERNAL FUNCTION RANGE-VISIBLE-P
- X
- Y
- WIDTH
- HEIGHT
Returns T if any part of rectangular range defined by given viewport coordinates and dimensions is visible on screen.
-
EXTERNAL FUNCTION RENDER
- RENDERER
- Z-ORDER
- RENDER-PROC
Schedules function RENDER-PROC to be called in accordance with specified Z order Z-ORDER within renderer instance RENDERER.
-
EXTERNAL FUNCTION SCREEN->MAP
- X
- Y
Converts screen pixel coordinates to map coordinates of nearest tile.
See SCREEN->MAP*
See MAP->SCREEN -
EXTERNAL FUNCTION SCREEN->MAP*
- X
- Y
Converts screen pixel coordinates to exact map coordinates.
See SCREEN->MAP
See MAP->SCREEN -
EXTERNAL FUNCTION SET-CHARACTER-TARGET
- ENTITY
- NEW-TARGET-X
- NEW-TARGET-Y
Sets character ENTITY new movement target to NEW-TARGET-X, NEW-TARGET-Y.
-
EXTERNAL FUNCTION SET-HP
- ENTITY
- NEW-HP
Sets current hit points of ENTITY to NEW-HP.
-
EXTERNAL FUNCTION SPARSE-MATRIX-REF
- SPARSE-MATRIX
- SUBSCRIPTS
Returns SPARSE-MATRIX element identified by list SUBSCRIPTS or NIL if there's no such element.
-
EXTERNAL FUNCTION (SETF SPARSE-MATRIX-REF)
- VALUE
- SPARSE-MATRIX
- SUBSCRIPTS
Sets SPARSE-MATRIX element identified by list SUBSCRIPTS to VALUE. To remove an element from sparse matrix, use SPARSE-MATRIX-REMOVE.
-
EXTERNAL FUNCTION SPARSE-MATRIX-REMOVE
- SPARSE-MATRIX
- SUBSCRIPTS
Removes element identified by list SUBSCRIPTS from SPARSE-MATRIX. Returns number of deleted elements or NIL if there's no such element in matrix.
-
EXTERNAL FUNCTION SPRITE-DIRECTION
- DIRECTIONS
- ANGLE
Calculates sprite direction from angle value ANGLE assuming total sprite direction count DIRECTIONS. East direction is 0 degree angle; counted clockwise.
-
EXTERNAL FUNCTION STANCE-INTERRUPTIBLE-P
- ENTITY
Returns whether current stance can be interrupted for ENTITY.
-
EXTERNAL FUNCTION START-ENGINE
- GAME-NAME
- INITIALIZERS
- &REST
- CONFIG
Initializes and starts engine to run the game named by GAME-NAME. INITIALIZERS is list of FUNCALL'able entity initializers which are called just before entering game loop with no parameters. CONFIG plist is used to override variables read from config file.
-
EXTERNAL FUNCTION STOP-ENTITY
- ENTITY
Stops the ENTITY from moving.
-
EXTERNAL FUNCTION SWITCH-STANCE
- ENTITY
- NEW-STANCE
Immediately switches stance of the sprite ENTITY to NEW-STANCE.
-
EXTERNAL FUNCTION SYSTEM-REF
- NAME
Returns system instance by its name symbol NAME.
-
EXTERNAL FUNCTION TARGET-PLAYER
- &OPTIONAL
- MOUSE-EVENT
Set new player character target according to MOUSE-EVENT or current mouse cursor position.
-
EXTERNAL FUNCTION TILE-INDEX
- X
- Y
Returns index of tile containing point with world coordinates X, Y.
-
EXTERNAL FUNCTION TILE-PROPERTY
- TILE-PROPERTIES
- INDEX
- PROPERTY
- &OPTIONAL
- DEFAULT
Returns property denoted by symbol PROPERTY of tile with index INDEX. Returns DEFAULT if there's no such property.
-
EXTERNAL FUNCTION TOGGLE-LAYER
- ENTITY
- LAYER
- &OPTIONAL
- ON
Toggles layer LAYER on sprite entity ENTITY.
-
EXTERNAL FUNCTION VIEWPORT->ABSOLUTE
- X
- Y
Converts given integer viewport coordinates to absolute screen coordinates.
-
EXTERNAL FUNCTION VISIBLEP
- X
- Y
- &OPTIONAL
- DELTA
Returns T if point with given viewport coordinates is visible on screeen.
-
EXTERNAL FUNCTION WORLD->SCREEN
- X
- Y
Converts world coordinate units to screen pixel units.
-
EXTERNAL GENERIC-FUNCTION CHARACTER-AT
- SYSTEM
- X
- Y
No documentation provided. -
EXTERNAL GENERIC-FUNCTION COLLIDES
- SYTEM
- X
- Y
- &KEY
- CHARACTER
No documentation provided. -
EXTERNAL GENERIC-FUNCTION DELETE-COMPONENT
- SYSTEM
- ENTITY
Deletes SYSTEM's component from ENTITY.
-
EXTERNAL GENERIC-FUNCTION HAS-COMPONENT-P
- SYSTEM
- ENTITY
Returns T when ENTITY has the SYSTEM's component in it.
-
EXTERNAL GENERIC-FUNCTION MAKE-COMPONENT
- SYSTEM
- ENTITY
- &REST
- PARAMETERS
Creates new component using PARAMETERS within system SYSTEM for entity ENTITY.
PARAMETERS could include
:PREFAB
key, in which case component is constructed using corresponding prefab. -
EXTERNAL GENERIC-FUNCTION MAKE-PREFAB
- SYSTEM
- PREFAB-NAME
Loads prefab with name symbol PREFAB-NAME within system SYSTEM.
-
EXTERNAL GENERIC-FUNCTION MAKE-PREFAB-COMPONENT
- SYSTEM
- ENTITY
- PREFAB
- PARAMETERS
Creates new component using prefab instance PREFAB as a template and optional extra parameters PARAMETERS within system SYSTEM for entity ENTITY.
-
EXTERNAL GENERIC-FUNCTION PREFAB
- SYSTEM
- PREFAB-NAME
Returns prefab with name symbol PREFAB-NAME within system SYSTEM.
-
EXTERNAL GENERIC-FUNCTION (SETF PREFAB)
- NEW-PREFAB
- SYSTEM
- PREFAB-NAME
Sets prefab NEW-PREFAB with name symbol PREFAB-NAME within system SYSTEM.
-
EXTERNAL GENERIC-FUNCTION PREFAB-PATH
- SYSTEM
- PREFAB-NAME
Returns prefab file path for system SYSTEM and prefab name symbol PREFAB-NAME.
-
EXTERNAL GENERIC-FUNCTION PRELOAD-PREFABS
- SYSTEM
Loads all prefabs for SYSTEM to avoid in-game performance degradations.
-
EXTERNAL GENERIC-FUNCTION READ-BINARY
- TYPE
- STREAM
Reads and returns element of type denoted by TYPE from binary stream STREAM.
-
EXTERNAL GENERIC-FUNCTION SYSTEM-DRAW
- SYSTEM
- RENDERER
Renders system SYSTEM using functional renderer RENDERER.
See RENDER
-
EXTERNAL GENERIC-FUNCTION SYSTEM-UPDATE
- SYSTEM
- DT
Updates system SYSTEM for time step DT (usually fixed by liballegro around 1/60 of second).
-
EXTERNAL METHOD CHARACTER-AT
- COLLISION-SYSTEM
- T
- T
Returns character entity at ingeter map coordinates X, Y or NIL if there's no character there.
-
EXTERNAL METHOD COLLIDES
- COLLISION-SYSTEM
- T
- T
- &KEY
- CHARACTER
Returns whether tile located at integer map coordinates X, Y does collide with other objects using collision system SYSTEM. CHARACTER, when non-NIL, specifies character entity to check for collisions with other characters.
-
INTERNAL METHOD NAME
- SYSTEM
Symbol that denotes system.
-
INTERNAL METHOD ORDER
- SYSTEM
Fixnum representing system's update order.
-
INTERNAL METHOD SHOWNP
- CONSOLE-SYSTEM
automatically generated reader method
-
INTERNAL METHOD (SETF SHOWNP)
- T
- CONSOLE-SYSTEM
automatically generated writer method
-
EXTERNAL MACRO DEFCOMPONENT
- SYSTEM
- NAME
- &REST
- SLOTS
Defines component structure with name NAME and slots SLOTS within system SYSTEM.
-
EXTERNAL MACRO DEFEVENT
- NAME
- DIRECT-SUPERCLASSES
- DIRECT-SLOTS
- &REST
- OPTIONS
Shorthand convenience macro around DEFCLASS to define new event classes.
Pushes the EVENT-CLASS as :METACLASS and EVENT as direct-superclass if it does not already appear somewhere as a transitive superclass.
-
EXTERNAL MACRO DEFHANDLER
- SYSTEM
- EVENT
- ARGS
- &BODY
- OPTIONS-AND-BODY
Defines event handler in SYSTEM for event type EVENT. ARGS are handler's arguments. OPTIONS-AND-BODY are passed as is to DEEDS:DEFINE-HANDLER.
-
EXTERNAL MACRO DEFINE-BINARY-STRUCT
- NAME
- &REST
- SLOTS
Defines structure with name NAME and slots SLOTS along with corresponding READ-BINARY method which reads and returns that structure from given binary stream.
See READ-BINARY
-
EXTERNAL MACRO DEFOPTIONS
- NAME
- &REST
- OPTIONS
Defines macro to access given group of options. E.g. when NAME is 'SYSTEM, it defines WITH-SYSTEM-CONFIG-OPTIONS macro. OPTIONS should be list of lists containing option's section name, option's name, and :TYPE and :DEFAULT properties.
-
EXTERNAL MACRO DEFPREFAB
- SYSTEM
- EXTENSION
- &REST
- SLOTS
Defines prefab structure with slots SLOTS and file name extension EXTENSION within system SYSTEM.
-
EXTERNAL MACRO DEFUNL
- FNAME
- LAMBDA-LIST
- &BODY
- BODY
DEFUN wrapper which sets correct current function name for logging functions.
-
EXTERNAL MACRO ISSUE
- EVENT-TYPE
- &REST
- ARGS
Shorthand macro to allow more convenient issuing of events.
-
EXTERNAL MACRO WITH-CAMERA
- BINDINGS
- &BODY
- BODY
Executes BODY with current camera position bound to two symbols in BIDNINGS list.
-
EXTERNAL MACRO WITH-CONDITION-REPORTER
- &BODY
- BODY
Executes body BODY with generic error handler which puts full error condition info including backtrace to liballegro log and displays error messagebox when not in debugger.
-
EXTERNAL MACRO WITH-SCREEN-COORDINATE
- ENTITY
- BINDINGS
- &BODY
- BODY
Executes BODY with ENTITY's screen pixel coordinates bound to two symbols in BINDINGS list. If BINDINGS are not set, coordinates are bound to symbols X and Y.
-
EXTERNAL MACRO WITH-SYSTEM-CONFIG-OPTIONS
- OPTIONS
- &KEY
- READ-ONLY
- &BODY
- BODY
Executes BODY with bindings for config options OPTIONS. If READ-ONLY is T (the default), options are not SETF-able.
-
EXTERNAL MACRO WITH-SYSTEMS
- VAR
- &BODY
- BODY
Executes BODY in loop for each system, binding system instance to variable VAR.