Python bindings for Allegro game library

David Kuehling dvdkhlng at gmx.de
Fri Mar 30 20:22:51 EDT 2012


Jpeg and png loading is now working, too.  You'll need all the
liballegro*-3_xburst.ipk packages plus alpy*-2_xburst.ipk from
http://downloads.qi-hardware.com/people/dvdkhlng/openwrt/ .

Loading and drawing images is as easy as:

--8<--
#! /usr/bin/python
From alpy import *

allegro_init()
install_keyboard()

set_color_depth(32)
set_gfx_mode(GFX_SAFE, 320, 240)
b, pal = load_bitmap('IMGP2962.JPG', 'jpg')
b.blit(dest=screen, dest_x=0, dest_y=0)
readkey()
--8<--

cheers,

David
-- 
GnuPG public key: http://dvdkhlng.users.sourceforge.net/dk.gpg
Fingerprint: B17A DC95 D293 657B 4205  D016 7DEF 5323 C174 7D40
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.en.qi-hardware.com/pipermail/discussion/attachments/20120331/39a35a4b/attachment.pgp>


More information about the discussion mailing list


interactive