- Online Community Forums » Allegro Development » Allegro 4.9.22 released

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Allegro 4.9.22 released
Peter Wang
Member #23
April 2000


Changes from 4.9.21 to 4.9.22 (September 2010)

The developers this time included: Michał Cichoń, Trent Gamblin, Evert
Glebbeek, Angelo Mottola, Elias Pschernig, Paul Suntsov and Peter Wang.


* Allow the X11 port to initialise without an X server connection.


* Fix many bugs with bitmap locking.

* Fix many bugs to do with transformations, flipping and clipping.

* Fix many bugs to do with sub-bitmaps as source and destination.

* Renamed al_draw_[tinted_]rotated_scaled_bitmap to
al_draw_[tinted_]scaled_rotated_bitmap to match the parameter

* Reimplemented bitmap software rendering routines using newly
optimised software triangle renderer, formerly in the primitives

* Add pixel_size field to ALLEGRO_LOCKED_REGION.

* Fix bugs to do with pixel alignment on OpenGL.

* Fix OpenGL pixel transfer of 15 bpp formats, where Allegro does
not Allegro does not care whether the unused bit is set or not,
but when transferring to OpenGL it will be interpreted as an alpha

* Disabled support for drawing a bitmap into itself.

* Changed specification of al_draw_*bitmap to not allow
transformation and ignore blending/tinting when the screen itself
is being drawn (except when drawn into a memory bitmap).

* Allow bitmap regions to be outside the bitmap area in drawing

* Added al_add_new_bitmap_flag convenience function.

* Added three new bitmaps flags ALLEGRO_MAG_LINEAR,
ALLEGRO_MIN_LINEAR, ALLEGRO_MIPMAP. Removed the config settings
for linear/anisotropic min/mag filtering. DirectX side not yet

* Register destructors for bitmaps, so they will be implicitly
destroyed when Allegro is shut down. This was only true for some
bitmaps previously.

* Don't allocate memory buffers for video bitmaps when using OpenGL.

* Make al_get_opengl_extension_list() return NULL if called on a
non-GL display.

* Fix al_create_display for OpenGL forward compatible contexts.

* Add al_set_current_opengl_context as an explicit way to set the
OpenGL context.

* Rename al_is_opengl_extension_supported to

* Produce more accurate/correct color when going from less to more
bits per component.

* Fix al_set_new_window_position() everywhere.

* Avoid potential deadlock if resizing window to the same size on

* Fixed turning off vsync in X11.

* Added al_is_d3d_device_lost function.

* Dynamically load dinput and d3d DLLs on Windows.

* Replaced PeekMessage with GetMessage in window event loops for the
D3D and WGL drivers (David Capello).


* Added hotplugging support for joysticks on Linux, Windows and OS X.

* Added al_reconfigure_joysticks function.

* Merged all joystick devices under a single joystick event source.

* Removed al_get_joystick_number.

* Add al_is_joystick_installed.

* The OS X joystick driver was rewritten; it requires OS X 10.5. The
older driver still exists for OS X 10.4 and earlier but is in a
semi-updated state with regards to hotplugging.

* Allow user to override joystick device paths in the config file

* Fix iphone touch input and clipping for modes other than

* Fixed missing mouse movement messages on IPhone on touch-up/down.
Also changed how mouse buttons are reported - always as button 1


* Give config iterators proper types instead of void *.

* Make al_get_system_config() always return non-NULL if a system
driver is installed.


* Rename al_event_queue_is_empty to al_is_event_queue_empty (with
compatibility define).


* Add al_add_timer_count function.

* Rename al_timer_is_started to al_get_timer_started.

* Rename al_current_time to al_get_time (with compatibility define).

File I/O:

* Add al_open_fs_entry to open a file handle from an FS_ENTRY.

* Add al_fclearerr.

* Set ALLEGRO_FILEMODE_HIDDEN flag on entries for file names
beginning with dot (OS X).

* Remove al_is_path_present, al_fs_entry_is_directory,
al_fs_entry_is_file (all trivial).

Primitives addon:

* Optimised most of the software rendering routines by a lot.

* Triangle drawer was skipping pixels in very thin triangles.

* Handle lost d3d devices better.

* Fix some bugs found during testing.

Image I/O addon:

* Fix native image loader on Mac OS X: images that were not 72 dpi
would be rescaled to a smaller size.

* Added native bitmap saving support for OSX.

* Fix jpeg saving when locked region has negative pitch.

Native dialogs addon:

* Add Windows and OS X text log implementations.

conflating them into ALLEGRO_NATIVE_DIALOG.

* Fix race condition in al_open_native_text_log.

* Rename al_destroy_native_dialog to al_destroy_native_file_dialog.

* Rename al_get_native_dialog_event_source to

* Speed up text log appending by making the reader/writers

* Register destructors for file chooser and text log dialogs.

* Fix file chooser on Windows returning multiple selections with
slashes appended to filenames. If an initial path was specified
then the dialog wouldn't open at all; fixed.

* Let native dialog functions fail gracefully.

Audio addons:

* Init destructors even if audio driver fails to install.

* Dynamically load dsound DLL on Windows.

Font addons:

* Added al_shutdown_ttf_addon.

* Prevent SIGSEGV for double-closing a file in the TTF addon if it
is not a valid font file.

* Make al_grab_font_from_bitmap not cause a segmentation fault if
the bitmap is garbage.

* Some TTF fonts would not render right at small sizes; fixed.

* Make al_destroy_font ignore NULL.


* Added a test suite (finally).

* Add a shell script to produce test coverage results using lcov.


* Add ex_haiku, an example based on Mark Oates's Haiku game. Mark
generously agreed to let us include it as an Allegro example.

* Added a new example ex_joystick_hotplugging.

* Added a new example ex_filter.

* Make ex_fs_window work on MSVC.

* Allow a5teroids to run without audio, or if audio data doesn't

Build system:

* Re-added CMake option that allows forced static linking of libFLAC.

* Replaced the old iphone xcode project with a cmake iphone


* Many updates to the reference manual.


* Added a workaround to the Python wrapper for a Mingw bug.

Member #4,603
May 2004

Great job as always guys!

Michał Cichoń
Member #11,736
March 2010

Arthur Kalliokoski
Second in Command
February 2005

Very good, very tempting...

We would be a lot safer if the Government would take its money out of science and put it into astrology and the reading of palms. Only in superstition is there hope. If you want to become a friend of civilization, then become an enemy of the truth and a fanatic for harmless balderdash. — Kurt Vonnegut

Member #8,794
July 2007



[EDIT:] I liked the new ex_haiku example. Since I have zero musical skill, I found it quite impressive.

Dario ff
Member #10,065
August 2008

Nice work on the new version! :)

But I was surprised to come across this:

[ 18%] Building C object addons/image/CMakeFiles/allegro_image.dir/bmp.c.obj
[ 18%] Building C object addons/image/CMakeFiles/allegro_image.dir/iio.c.obj
[ 19%] Building C object addons/image/CMakeFiles/allegro_image.dir/pcx.c.obj
[ 19%] Building C object addons/image/CMakeFiles/allegro_image.dir/tga.c.obj
[ 19%] Building C object addons/image/CMakeFiles/allegro_image.dir/png.c.obj
[ 20%] Building C object addons/image/CMakeFiles/allegro_image.dir/jpg.c.obj
In file included from E:/mingw/include/jpeglib.h:27,
                 from E:\allegro\addons\image\jpg.c:20:
E:/mingw/include/jmorecfg.h:236: error: conflicting types for 'boolean'
E:/mingw/include/rpcndr.h:52: error: previous declaration of 'boolean' was here
mingw32-make[2]: *** [addons/image/CMakeFiles/allegro_image.dir/jpg.c.obj] Error
mingw32-make[1]: *** [addons/image/CMakeFiles/allegro_image.dir/all] Error 2
mingw32-make: *** [all] Error 2

I already fixed it(edited some headers), but does anyone know what's the reason behind this? IIRC, it didn't happen with earlier builds, or maybe I just didn't build Allegro since the last format and my memory is failing. :-[

TranslatorHack 2010, a human translation chain in
My games: [GiftCraft] - [Blocky Rhythm[SH2011]] - [Elven Revolution] - [Dune Smasher!]

Michał Cichoń
Member #11,736
March 2010

Use libjpeg-8b or newer. This should help.

"God starts from scratch too"
Windows Allegro Build Repo:

Member #7,339
June 2006

1Creating library file: ..\..\lib\liballegro_primitives.dll.a 2[ 27%] Built target allegro_primitives 3Scanning dependencies of target allegro_image 4[ 27%] Building C object addons/image/CMakeFiles/allegro_image.dir/bmp.c.obj 5[ 27%] Building C object addons/image/CMakeFiles/allegro_image.dir/iio.c.obj 6[ 28%] Building C object addons/image/CMakeFiles/allegro_image.dir/pcx.c.obj 7[ 28%] Building C object addons/image/CMakeFiles/allegro_image.dir/tga.c.obj 8[ 29%] Building CXX object addons/image/CMakeFiles/allegro_image.dir/gdiplus.cpp 9.obj 10C:\allegro\addons\image\gdiplus.cpp: In constructor 'AllegroWindowsStream::Alleg 11roWindowsStream(ALLEGRO_FILE*)': 12C:\allegro\addons\image\gdiplus.cpp:59:18: warning: 'AllegroWindowsStream::fp' w 13ill be initialized after 14C:\allegro\addons\image\gdiplus.cpp:58:9: warning: 'long int AllegroWindowsStr 15eam::refCount' 16C:\allegro\addons\image\gdiplus.cpp:63:4: warning: when initialized here 17C:\allegro\addons\image\gdiplus.cpp: In member function 'virtual HRESULT Allegro 18WindowsStream::CopyTo(IStream*, ULARGE_INTEGER, ULARGE_INTEGER*, ULARGE_INTEGER* 19)': 20C:\allegro\addons\image\gdiplus.cpp:171:24: warning: right-hand operand of comma 21 has no effect 22C:\allegro\addons\image\gdiplus.cpp:171:33: warning: right-hand operand of comma 23 has no effect 24C:\allegro\addons\image\gdiplus.cpp:171:43: warning: right-hand operand of comma 25 has no effect 26C:\allegro\addons\image\gdiplus.cpp: In member function 'virtual HRESULT Allegro 27WindowsStream::LockRegion(ULARGE_INTEGER, ULARGE_INTEGER, DWORD)': 28C:\allegro\addons\image\gdiplus.cpp:178:29: warning: right-hand operand of comma 29 has no effect 30C:\allegro\addons\image\gdiplus.cpp:178:39: warning: right-hand operand of comma 31 has no effect 32C:\allegro\addons\image\gdiplus.cpp: In member function 'virtual HRESULT Allegro 33WindowsStream::UnlockRegion(ULARGE_INTEGER, ULARGE_INTEGER, DWORD)': 34C:\allegro\addons\image\gdiplus.cpp:196:29: warning: right-hand operand of comma 35 has no effect 36C:\allegro\addons\image\gdiplus.cpp:196:39: warning: right-hand operand of comma 37 has no effect 38C:\allegro\addons\image\gdiplus.cpp: In function 'ALLEGRO_BITMAP* _al_load_gdipl 39us_bitmap_f(ALLEGRO_FILE*)': 40C:\allegro\addons\image\gdiplus.cpp:220:16: error: 'PixelFormat' was not declare 41d in this scope 42C:\allegro\addons\image\gdiplus.cpp:220:16: error: expected ')' before numeric c 43onstant 44C:\allegro\addons\image\gdiplus.cpp:405:1: error: expected ')' at end of input 45C:\allegro\addons\image\gdiplus.cpp:405:1: error: expected ')' at end of input 46C:\allegro\addons\image\gdiplus.cpp:405:1: error: expected statement at end of i 47nput 48C:\allegro\addons\image\gdiplus.cpp:217:31: warning: unused variable 'gdi_lock' 49C:\allegro\addons\image\gdiplus.cpp:405:1: error: expected '}' at end of input 50C:\allegro\addons\image\gdiplus.cpp:405:1: error: expected '}' at end of input 51C:\allegro\addons\image\gdiplus.cpp:405:1: error: expected '}' at end of input 52C:\allegro\addons\image\gdiplus.cpp:405:1: warning: control reaches end of non-v 53oid function 54C:\allegro\addons\image\gdiplus.cpp: At global scope: 55C:\allegro\addons\image\gdiplus.cpp:17:13: warning: 'gdiplus_inited' defined but 56 not used 57C:\allegro\addons\image\gdiplus.cpp:18:18: warning: 'gdiplusToken' defined but n 58ot used 59C:\allegro\addons\image\gdiplus.cpp:23:12: warning: 'int GetEncoderClsid(const W 60CHAR*, CLSID*)' defined but not used 61mingw32-make[2]: *** [addons/image/CMakeFiles/allegro_image.dir/gdiplus.cpp.obj] 62 Error 1 63mingw32-make[1]: *** [addons/image/CMakeFiles/allegro_image.dir/all] Error 2 64mingw32-make: *** [all] Error 2

I'm getting these errors



In CMAKE I unchecked WANT_NATIVE_IMAGE_LOADER and it compiled fine. I don't remember seeing that option last time I used it.

Member #1,086
March 2001

I'm a bit behind the times with respect to A5. Having just installed the latest version of TDM 4.5, a pointer to the list of libraries and maybe flags required to successfully link with liballegro-4.9.22-monolith-static-mt.a would be appreciated. Working with the monolithic dll works as expected. Even so it would be nice to statically link. Currently, the resulting executable size is the same as when linking with the dll.

Using the following in a simple makefile,

IDIR = -Ic:\apps\libs451\include -Lc:\apps\libs451\lib
LIBS = -lallegro-4.9.22-monolith-mt -lkernel32 -luser32 -lgdi32 -lcomdlg32 \
-lole32 -ldinput -ldxguid -ldsound -ldplayx -lddraw -lwinmm \

Peter Wang
Member #23
April 2000

KnightWhoSaysNi: I thought mingw did not distribute the GDI+ headers, so I wonder where yours come from? It seems to be incomplete. I added a check which might detect that, but I don't know.

Member #7,339
June 2006

They're in the w32api package. I used the mingw-get-inst GUI installer and it installed it automatically.

Michał Cichoń
Member #11,736
March 2010

ks said:

Having just installed the latest version of TDM 4.5, a pointer to the list of libraries and maybe flags required to successfully link with liballegro-4.9.22-monolith-static-mt.a would be appreciated.

This library is compiled using GCC 4.5.0 downloaded from official MinGW site.

I can prepare build using TDM 4.5.1 if you like.

"God starts from scratch too"
Windows Allegro Build Repo:

Member #1,086
March 2001

Thanks Michal, I'll do the official MingW install today.

Edit: Still at a loss for the correct set of libraries to include. I have added the following gdiplus to the mix (fresh install of the official MinGW),

Should the DirectX files be overwritten with

Michał Cichoń
Member #11,736
March 2010

Static version of allegro can be linked using following libraries:


Remove those which you do not use. Keep in mind, order of libraries is important with GCC.

GDI+ import library is exactly the same I use.

"God starts from scratch too"
Windows Allegro Build Repo:

Member #1,786
December 2001

If you are having problems with link order you can try -Wl,--start-group -lblah ... -Wl,--end-group to force gcc to loop through all libraries until finds all references.

Member #1,086
March 2001

Still having issues...It appears that -luuid had to be added leaving the following,

Info: resolving vtable for __cxxabiv1::__si_class_type_info by linking to __imp_
__ZTVN10__cxxabiv120__si_class_type_infoE (auto-import)
Info: resolving vtable for __cxxabiv1::__class_type_info by linking to __imp___Z
TVN10__cxxabiv117__class_type_infoE (auto-import)
c:/mingw/bin/../lib/gcc/mingw32/4.5.0/../../../../mingw32/bin/ld.exe: warning: a
uto-importing has been activated without --enable-auto-import specified on the c
ommand line.
This should work unless it involves constant data structures referencing symbols
 from auto-imported DLLs.

The binary (ex_bitmap) doesn't run.

Michał Cichoń
Member #11,736
March 2010

Add switches:
-static-libgcc -lgcc_eh -static-libstdc++

"God starts from scratch too"
Windows Allegro Build Repo:

Member #1,086
March 2001

Clearly, I'm doing something stupid.

Let's try a different approach, does anyone have working version of a simple makefile to statically link one of the examples?

I have used the following, in various incarnations such as stripping away unnecessary libs as well as linking with directx. They all compile without error yet do not run.

1cc=g++ 2CFLAGS = -static-libgcc -static-libstdc++ 3IDIR = -Ic:/apps/libs451/include -Lc:/apps/libs451/lib 4LIBS = -lallegro-4.9.22-monolith-static-mt -lflac-1.2.1-static-mt \ 5 -lvorbisfile-1.2.3-static-mt -lvorbis-1.2.3-static-mt \ 6 -logg-1.1.4-static-mt -ldumb-0.9.3-static-mt \ 7 -lopenal-1.11.753-static-mt -lzlib-1.2.3-static-mt \ 8 -lphysfs-2.0.0-static-mt -lfreetype-2.4.2-static-mt \ 9 -lgdiplus -luuid -lkernel32 -lwinmm -lpsapi -lopengl32 -lglu32 -luser32 \ 10 -lcomdlg32 -lgdi32 -lshell32 -lole32 -ladvapi32 -lws2_32 -lgcc_eh 11 12OBJS=ex_bitmap.o 13 14all: ex_bitmap.exe 15 16ex_bitmap.o: ex_bitmap.c 17 $(cc) -c ex_bitmap.c $(CFLAGS) $(IDIR) 18 19ex_bitmap.exe: $(OBJS) 20 $(cc) -o ex_bitmap.exe $(OBJS) $(CFLAGS) $(IDIR) $(LIBS) 21 22clean: 23 rm -rf *.o ex_bitmap.exe

Michał Cichoń
Member #11,736
March 2010

In the attachment you will find Code::Blocks project file which is configured to create ex_bitmap linked to the static version of Allegro.

Put this file in example directory. This is folder tree I expected:

Executable will be linked into examples folder.

Setup you Code::Block to use 4.5.0 GCC and everything should be fine.

Good luck!

"God starts from scratch too"
Windows Allegro Build Repo:

Mark Oates
Member #1,146
March 2001

Awesome, guys. I can't thank you all enough.

Michał Cichoń
Member #11,736
March 2010

Build for Win32 was updated.

Important changes:
- [MSVC] PDB files are now included also for static version of Allegro and dependent libraries. Linker will not complain any more.
- [MSVC] Static version of Allegro is working as expected. DLL TLS was accidentally enabled in configuration file.

If you encounter one of above problems please download Allegro package again.

You can download packages from there if you do not want to wait for update on

"God starts from scratch too"
Windows Allegro Build Repo:

Mark Oates
Member #1,146
March 2001

what's the difference between these two (and others like it)?

Thomas Fjellstrom
Member #476
June 2000

I would assume "md" is debug, and "mt" is release.

Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" --

Mark Oates
Member #1,146
March 2001

that was my first guess, but there's also allegro_dialog-4.9.22-md-debug.lib and allegro_dialog-4.9.22-mt-debug.lib in there, too. :-/

Member #1,090
July 2003

md means it was built, linking to the dynamic versions of the msvc runtime routines (dll)
mt means it was build, linking to the static versions of the msvc runtime

 1   2 

Go to: