Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Allegro 5.1.9 released!

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Allegro 5.1.9 released!
SiegeLord
Member #7,827
October 2006
avatar

Let's start the New Year with a new WIP release of Allegro!

Get the sources here: https://sourceforge.net/projects/alleg/files/allegro-unstable/5.1.9/

Changes from 5.1.8 to 5.1.9 (January 2015)

The main developers this time were: Trent Gamblin, SiegeLord, Elias Pschernig.

Core

  • Fix OSX backend on OSX 10.10 (lordnoriyuki).


  • Simplify how sub-bitmaps interact with their parent bitmaps. You can now destroy a sub-bitmap at any time (not only before the parent is destroyed). Additionally, when the parent is converted using al_convert_bitmap, all the sub-bitmaps are also automatically converted.


  • Switch to using unicode Win32 (e.g. this fixes using al_set_window_title with unicode strings).


  • Add some Linux WM hints so make Allegro windows work more smoothly (especially with Unity).

Filesystem

  • Add al_fprintf (DanielH and Tobias Scheuer).


  • Add al_for_each_fs_entry, a convenience function that helps enumerating the contents of a directory more easily using a callback function (Beoran).


  • Fix for al_get_standard_path with Unicode (vkensou).

Input

  • Add X11 touch driver (Ryan Gumbs).


  • Emulate mouse pressure for backends that don't support pressure.


  • Added Windows haptics driver, XInput joystick driver (Beoran).


  • Fix OSX joystick deinitialization.

Graphics

  • Add block compression pixel formats (ALLEGRO_PIXEL_FORMAT_COMPRESSED_RGBA_DXT1/DXT3/DXT5) for compressed video bitmaps. This includes an API to fetch compressed block size ( al_get_pixel_block_width/height/size) as well as API to load and unload compressed bitmap data without paying a runtime compression cost ( al_lock_bitmap_blocked). Unfortunately, due to patent concerns this last feature is disabled for OpenGL (if you think those concerns don't apply to you, you can enable it by passing -DWANT_OPENGL_S3TC_LOCKING=1 to cmake).


  • Make real fullscreen modes work on OS X again. May not be perfect still. (thanks to SDL).

Shaders

  • Don't clobber the 0'th texture unit in OpenGL and Direct3D. This simplifies working with shaders.

Android port

  • Bump minimum Android API level from 10 to 12 (aka version 3.1).


  • Add controller support to the Android port. An accelerometer 'joystick' is still the first joystick. Supports two analog sticks and 10 buttons (A B X Y L1 R1 DPAD_L DPAD_R DPAD_U DPAD_D). Supports hotplugging and theoretically multiple joysticks (needs testing).


  • Set correct orientation at startup on Android (thanks to Aikei_c).

Build system

  • Various CMake fixes.

Other

  • Add Travis and AppVeyor continuous integration support.


  • Fix a lot of memory leaks.


  • Many documentation improvements.

Audio addon

  • Disallow attaching a mixer to itself.


  • Fix uni- and bi-directional looping of zero-length samples.


  • Fix/avoid all sound examples freezing on OSX with the aqueue driver.

Image addon

  • Add functionality to load Direct Draw Surface files (.dds). Only compressed pixel formats are supported (DXT1, DXT3 and DXT5).

Dialog addon

  • Fix native file dialog default paths on Windows (Edgar Reynaldo).


  • Fix unintended behaviour in al_set_menu_item_flags (Malcolm Harrow).


  • Fix some bugs with native menus in OSX.

Video addon

  • Fix for now undefined AVCODEC_MAX_AUDIO_FRAME_SIZE (Dennis Busch).

TTF addon

  • Fix a crashing bug in the TTF addon.


  • Make al_load_ttf_font_stretch return NULL if invalid width/height are passed.

Font addon

  • Add multi line text output for the font addon ( al_draw_multiline_text, al_draw_multiline_textf and al_draw_multiline_ustr).

Primitives addon

  • Fix some sharp-angle polyline drawing bugs.

Examples

  • New examples: ex_compressed, ex_font_multiline.


  • ex_dir: demonstrate al_for_each_fs_entry.


  • ex_haptic2: demonstrate hotplugging.

MD5SUMS:
02565b8661532a25ae768ba31aa41a3b  allegro-5.1.9.7z
05baacbd06fb1e08dad202f057541ee5  allegro-5.1.9.tar.gz
58de0daa6bf85b108a221c6c569b8cb0  allegro-5.1.9.zip

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

jmasterx
Member #11,410
October 2009

Woo! Thanks to all the contributors for their hard work and contributions :)

Peter Hull
Member #1,136
March 2001

SPLENDID! 8-)

Arvidsson
Member #4,603
May 2004

Great work everybody!

--
nothing to see here...

Mark Oates
Member #1,146
March 2001
avatar

SiegeLord said:

al_draw_multiline_text

oooh, the star of the show :)

--
AllegroFlareallegro.cc markdownAllegro logo
disclaimer: I have no idea what I'm talking about.

beoran
Member #12,636
March 2011

Yeah, I contributed that functionality with SiegeLord's help. Glad to finally have a new release! And thanks to everyone and a happy new year!

SiegeLord
Member #7,827
October 2006
avatar

Oh yeah... not sure why that's uncredited. It's my first time releasing Allegro, I don't know how change-lists works :P.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Gideon Weems
Member #3,925
October 2003

I agree that al_draw_multiline_* series implements a fantastic and long-awaited feature. (The new sub-bitmap functionality also falls into this category.) At the same time, simple bug fixes and documentation additions improve Allegro just as much as feature additions. It's great to see both. ;)

Thank you, devs and everyone involved! You guys are awesome!

Here are a few compiler warnings being discussed in #allegro (using freetype2 2.5.5-1 and ffmpeg 1:2.5.2-2):

#SelectExpand
1allegro/addons/ttf/ttf.c: In function copy_glyph_mono: 2allegro/addons/ttf/ttf.c:290:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] 3 for (y = 0; y < face->glyph->bitmap.rows; y++) { 4 ^ 5allegro/addons/ttf/ttf.c:296:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] 6 for (x = 0; x < face->glyph->bitmap.width; x++) { 7 ^ 8allegro/addons/ttf/ttf.c:309:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] 9 for (x = 0; x < face->glyph->bitmap.width; x++) { 10 ^ 11allegro/addons/ttf/ttf.c: In function copy_glyph_color: 12allegro/addons/ttf/ttf.c:331:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] 13 for (y = 0; y < face->glyph->bitmap.rows; y++) { 14 ^ 15allegro/addons/ttf/ttf.c:336:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] 16 for (x = 0; x < face->glyph->bitmap.width; x++) { 17 ^ 18allegro/addons/ttf/ttf.c:346:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] 19 for (x = 0; x < face->glyph->bitmap.width; x++) { 20 ^ 21 22 23allegro/addons/video/ffmpeg.c: In function get_video_clock: 24allegro/addons/video/ffmpeg.c:266:4: warning: implicit declaration of function av_gettime [-Wimplicit-function-declaration] 25 delta = (av_gettime() - is->video_current_pts_time) / 1000000.0; 26 ^ 27allegro/addons/video/ffmpeg.c: In function audio_decode_frame: 28allegro/addons/video/ffmpeg.c:384:10: warning: avcodec_decode_audio3 is deprecated (declared at /usr/include/libavcodec/avcodec.h:4057) [-Wdeprecated-declarations] 29 len1 = avcodec_decode_audio3(is->audio_st->codec, 30 ^ 31allegro/addons/video/ffmpeg.c: In function our_get_buffer: 32allegro/addons/video/ffmpeg.c:740:4: warning: avcodec_default_get_buffer is deprecated (declared at /usr/include/libavcodec/avcodec.h:3934) [-Wdeprecated-declarations] 33 int ret = avcodec_default_get_buffer(c, pic); 34 ^ 35allegro/addons/video/ffmpeg.c: In function our_release_buffer: 36allegro/addons/video/ffmpeg.c:751:4: warning: avcodec_default_release_buffer is deprecated (declared at /usr/include/libavcodec/avcodec.h:3935) [-Wdeprecated-declarations] 37 avcodec_default_release_buffer(c, pic); 38 ^ 39allegro/addons/video/ffmpeg.c: In function video_thread: 40allegro/addons/video/ffmpeg.c:763:4: warning: avcodec_alloc_frame is deprecated (declared at /usr/include/libavcodec/avcodec.h:3599) [-Wdeprecated-declarations] 41 pFrame = avcodec_alloc_frame(); 42 ^ 43allegro/addons/video/ffmpeg.c: In function stream_component_open: 44allegro/addons/video/ffmpeg.c:925:10: warning: get_buffer is deprecated (declared at /usr/include/libavcodec/avcodec.h:2122) [-Wdeprecated-declarations] 45 codecCtx->get_buffer = our_get_buffer; 46 ^ 47allegro/addons/video/ffmpeg.c:926:10: warning: release_buffer is deprecated (declared at /usr/include/libavcodec/avcodec.h:2136) [-Wdeprecated-declarations] 48 codecCtx->release_buffer = our_release_buffer; 49 ^

Trent Gamblin
Member #261
April 2000
avatar

Did anyone catch that compressed textures are now supported (thanks to SiegeLord)? These can save loads of video memory if you're not using pixel art.

EDIT: I believe they need to be enabled manually at compile time due to potential patent implications.

SiegeLord
Member #7,827
October 2006
avatar

The story behind compressed textures is like this:

By default, you can load non-compressed textures and compress them on the fly. Check out ex_compressed as it does exactly that. This is typically 3-4x slower than keeping them un-compressed. That's why typically you want to compress them ahead of time (also the quality varies between GPUs so you might get better quality if you compress them yourself ahead of time).

By default you cannot load pre-compressed textures with OpenGL (you can load them fine in D3D) unless you compile Allegro with that feature enabled.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

beoran
Member #12,636
March 2011

Yea,texture compression is cool, but due to the patent problems of DXTC it's probably a good idea to try and implement support in the future for ETC and ASTC which are not patent-encumbered. Should be faster than waiting for the patent to lapse :P

Gideon Weems
Member #3,925
October 2003

Did anyone catch that compressed textures are now supported (thanks to SiegeLord)?

I did not, but I want to try it now. Thanks for the addition (and explanation), SiegeLord. The compile-time option for OpenGL sounds like a good solution.

Izual
Member #2,756
September 2002
avatar

Great work and big thanks for all your efforts everyone.

gameovera
Member #15,340
October 2013

Congratulations :)

By the way, typo in the date of official site's news page(http://alleg.sourceforge.net). It should be 2015.

SiegeLord
Member #7,827
October 2006
avatar

gameovera said:

By the way, typo in the date of official site's news page(http://alleg.sourceforge.net). It should be 2015.

That's just embarassing :-[. Thanks!

beoran said:

ETC and ASTC which are not patent-encumbered. Should be faster than waiting for the patent to lapse :P

Yeah. The only issue is that I think the desktop GL support for those is spotty. For mobile, however, we pretty much will have to implement more formats. I decided not to wait that long though :P.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

beoran
Member #12,636
March 2011

Yeah, the other compression algorithms may not be supported on all desktops, but that's entirely out of our hands. We'll have to wait until OpenGL implementations catch up. With some conditional compilation, etc, and maybe a query interface to heck which compression algorirthms are available, this could be solved without too much of a hassle.

Neil Roy
Member #2,229
April 2002
avatar

Looking for binaries for MinGW 4.7.0 please and thanks. ;)
Edit: actually, for any version of MinGW, preferably a modern version, I'm willing to upgrade my MinGW for it.

--
Deluxe Pacman
"I am not ashamed of my belief in God."

AMCerasoli
Member #11,955
May 2010
avatar

Feels good see a new release from time to time. Thanks for the effort!

pkrcel
Member #14,001
February 2012

I usually don't comment new releases because I'm sort of a GIT folk , but I MUST commend all the developers for the incredible piece of software which is Allegro.

I the last weeks (since till tomorrow I'll be unemployed! ;D ) I had the chance to play around the source and try to make my way through it to be able to contribute and...

...well, THIS library my fine gentlemen is incredibly modern and well-tought.

So triple kudos to all developers of this great tool, absolutely outstanding.

Cheers
-pkrcel

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

Edgar Reynaldo
Member #8,592
May 2007
avatar

NiteHackr said:

Looking for binaries for MinGW 4.7.0 please and thanks. ;)
Edit: actually, for any version of MinGW, preferably a modern version, I'm willing to upgrade my MinGW for it.

Here you can find my unofficial distributions of MinGW 4.8.1

MinGW 4.8.1

and my unofficial Allegro 5.1.9 binary distribution. It comes with src, static linked example programs, dlls and static and dynamic libraries for most every dependency, and debug and release versions for Allegro 5. You need 7zip to unpack it. Once installed right click on the 7z file in Explorer and select 'Extract here' or wherever you want it.

Allegro 5.1.9 binary distribution for MinGW 4.8.1

Neil Roy
Member #2,229
April 2002
avatar

Here you can find my unofficial distributions of MinGW 4.8.1

Many thanks for that!

Edit: Tried it out with MinGW 4.8.1, had too many compile errors. I think certain libraries are missing from this like OpenAL. Reverting back to 5.0.10 and MinGW 4.7.0. I'll have to see if I can't figure out how to compile this beast. :/

--
Deluxe Pacman
"I am not ashamed of my belief in God."

Gideon Weems
Member #3,925
October 2003

Got some signed/unsigned comparison warnings from the latest ttf.c:

addons/ttf/ttf.c:290:18:
    for (y = 0; y < face->glyph->bitmap.rows; y++) {
                  ^
addons/ttf/ttf.c:296:24:
          for (x = 0; x < face->glyph->bitmap.width; x++) {
                        ^
addons/ttf/ttf.c:309:24:
          for (x = 0; x < face->glyph->bitmap.width; x++) {
                        ^
addons/ttf/ttf.c:331:18:
    for (y = 0; y < face->glyph->bitmap.rows; y++) {
                  ^
addons/ttf/ttf.c:336:24:
          for (x = 0; x < face->glyph->bitmap.width; x++) {
                        ^
addons/ttf/ttf.c:346:24:
          for (x = 0; x < face->glyph->bitmap.width; x++) {
           ^    ... j/k ^ it's here

SiegeLord
Member #7,827
October 2006
avatar

Thanks for that compilation output ;). It's fixed in git latest.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

Edgar Reynaldo
Member #8,592
May 2007
avatar

NiteHackr said:

Here you can find my unofficial distributions of MinGW 4.8.1

Many thanks for that!

Edit: Tried it out with MinGW 4.8.1, had too many compile errors. I think certain libraries are missing from this like OpenAL. Reverting back to 5.0.10 and MinGW 4.7.0. I'll have to see if I can't figure out how to compile this beast. :/

But I never compiled OpenAL. Wait, I have it. I don't know if cmake linked against this openal or another version I had installed so I will rebuild openal and allegro. OpenAL would only compile a shared version with cmake but is now included in the headers and libs and bin directories. I also recompiled the examples to be debug static link. I then recompiled the debug and release shared and static monolith versions of allegro 5.1.9.

Get the updated MinGW 4.8.1 Allegro 5.1.9 binary package here
Make sure it says A519distro2.7z

Neil Roy
Member #2,229
April 2002
avatar

Great stuff... but now Sourceforge is temporarily offline. It's as if I was not meant to use this version. ;D ;) I'll try again later.

Edit: Okay, I got it downloaded and installed. My game compiled okay with it (I am curious, I staticly link my libs, so libOpenAL.dll.a confused me as there wasn't a static version, the game runs, but will this need the dll? It seemed to run without it <confused>)

The game ran with no problems or errors when compiled with MinGW 4.7.0 and Allegro 5.1.8 (I had recently started using 5.1.8, I used to use 5.0.10), this was compiled with a fresh MinGW 4.8.1-4 and the Allegro you supplied.

Anyhow, game ran fine, but when I went to exit the game it froze. Even in debug mode it wouldn't show me which line this happened on (Code::Blocks) so after some crude searching I narrowed it down to this line:

al_destroy_display(setting.screen);

setting.screen being set with:

   setting.screen = al_create_display(WIDTH, HEIGHT);
   if(!setting.screen) {
      a5_error(AT, setting.screen, "Create display failed.");
      shut_down();
      exit(1);
   }

Most of the time when it froze, the only way to shut it down was to close the console screen (if I ran it in release mode, which has no console, than I was screwed, only the task manager could shut it down then). There was two times it crashed that a message momentarily flickered on the screen (closed the console, then a message appeared and the console would close before I could read it). The second time this happened I hit my printscreen and captured it.

(most text is from my game, just the assertion failed line is new)
{"name":"609239","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/2\/1293fca4dd91c95e8656623d288c57b7.jpg","w":651,"h":312,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/1\/2\/1293fca4dd91c95e8656623d288c57b7"}609239

Edit: also, my game now requires "libogg-0.dll" to run, even though it is statically linked.

Edit: Just tested my editor as well (which is separate from the main game and uses no sound effects at all) and it actually exits okay, but the al_create_native_file_dialog() function doesn't work at all for saving, only loading.

Here's my code, this works with 5.1.8 no problem (except there is no default filename, which is the main reason I want 5.1.9 to work)...
file_dialog = al_create_native_file_dialog(".//level001.dp2", "Save Level", "*.DP2", ALLEGRO_FILECHOOSER_SAVE);

Changed ".//" to "//" at the start and it brought up the dialog for saving, but still no default filename at all. :(
file_dialog = al_create_native_file_dialog("//level001.dp2", "Save Level", "*.DP2", ALLEGRO_FILECHOOSER_SAVE);

--
Deluxe Pacman
"I am not ashamed of my belief in God."

 1   2 


Go to: