Skip to content

gilzoide/lallegro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lallegro

Lua bindings for the Allegro 5.2 game programming library using SWIG.

Dependencies

Using

Require, use, have fun!

local al = require 'lallegro'
assert (al.init ())

local disp = al.create_display (800, 600)
al.clear_to_color (al.map_rgb (0, 0, 0))
al.flip_display ()
al.rest (5)
al.destroy_display (disp)

Bindings

1 to 1 function binding is provided to almost all the Allegro API, including addons. Functions are renamed so the prefix al_ is removed, so the calls to functions use the Lua module as the Allegro namespace.

A more Lua-style API is being created (the .lua files) as well, with auto destroyed objects, metatables/metamethods, iterators, functional stuff, etc... And it'll all be documented! See the high level Lua wrappers document for an overview.

Differences between the Allegro C API and this one is detailed in the API diff document.

Building

With cmake:

$ mkdir build
$ cd build
$ cmake ..
$ make

Call cmake with -DALLEGRO_UNSTABLE=1 for including the Allegro Unstable API

Installing

Using LuaRocks remote:

# luarocks install --server=http://luarocks.org/dev lallegro

Using make directly (after building with cmake):

# make install

Documentation

The Allegro Documentation should be widely used, as lallegro provides 1 to 1 bindings.

LDoc used for documenting the Lua specific stuff. Generate with ldoc .

About

Lua bindings for the Allegro 5.2 game programming library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors