Allegro.cc - Online Community

Allegro.cc 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

http://sourceforge.net/projects/alleg/files/allegro-unstable/4.9.22/

Quote:

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.

System:

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

Graphics:

* 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
order.

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

* 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
bit.

* 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
routines.

* 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
updated.

* 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
al_have_opengl_extension.

* 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
X11.

* 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).

Input:

* 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
(Linux).

* Fix iphone touch input and clipping for modes other than
w=768,h=1024.

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

Config:

* Give config iterators proper types instead of void *.

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

Events:

* Rename al_event_queue_is_empty to al_is_event_queue_empty (with
compatibility define).

Timers:

* 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.

* Add ALLEGRO_FILECHOOSER and ALLEGRO_TEXTLOG types instead of
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
al_get_native_text_log_event_source.

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

* 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.

Tests:

* Added a test suite (finally).

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

Examples:

* 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
load.

Build system:

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

* Replaced the old iphone xcode project with a cmake iphone
toolchain.

Documentation:

* Many updates to the reference manual.

Bindings:

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

Arvidsson
Member #4,603
May 2004
avatar

Great job as always guys!

Michał Cichoń
Member #11,736
March 2010

Arthur Kalliokoski
Second in Command
February 2005
avatar

Very good, very tempting...

They all watch too much MSNBC... they get ideas.

kenmasters1976
Member #8,794
July 2007

Downloading.

Thanks.

[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
avatar

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
 1
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 a.cc.
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: http://targonski.nazwa.pl/thedmd/allegro/

KnightWhoSaysNi
Member #7,339
June 2006
avatar

#SelectExpand
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

---------------------

[EDIT]:

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

ks
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 \
-mwindows

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.

KnightWhoSaysNi
Member #7,339
June 2006
avatar

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: http://targonski.nazwa.pl/thedmd/allegro/

ks
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),

http://code.google.com/p/wxmax/downloads/detail?name=gdiplus_includes.zip&can=2&q=

Should the DirectX files be overwritten with http://trent.gamblin.ca/dx/

Michał Cichoń
Member #11,736
March 2010

Static version of allegro can be linked using following libraries:

liballegro-4.9.22-monolith-static-mt.a
liblibFLAC-1.2.1-static-mt.a
libvorbisfile-1.2.3-static-mt.a
libvorbis-1.2.3-static-mt.a
libogg-1.1.4-static-mt.a
libdumb-0.9.3-static-mt.a
libopenal-1.11.753-static-mt.a
libzlib-1.2.3-static-mt.a
libphysfs-2.0.0-static-mt.a
libfreetype-2.4.2-static-mt.a
libgdiplus.a
libkernel32.a
libwinmm.a
libpsapi.a
libopengl32.a
libglu32.a
libuser32.a
libcomdlg32.a
libgdi32.a
libshell32.a
libole32.a
libadvapi32.a
libws2_32.a

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: http://targonski.nazwa.pl/thedmd/allegro/

kazzmir
Member #1,786
December 2001
avatar

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.

ks
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: http://targonski.nazwa.pl/thedmd/allegro/

ks
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.

#SelectExpand
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:
<root>/include/allegro5/*
<root>/lib/liballegro-4.9.22-monolith-static-mt.a
<root>/lib/libdumb-0.9.3-static-mt-debug.a
<root>/lib/libFLAC-1.2.1-static-mt-debug.a
<root>/lib/libfreetype-2.4.2-static-mt-debug.a
<root>/lib/libogg-1.1.4-static-mt-debug.a
<root>/lib/libopenal-1.11.753-static-mt-debug.a
<root>/lib/libphysfs-2.0.0-static-mt-debug.a
<root>/lib/libvorbis-1.2.3-static-mt-debug.a
<root>/lib/libvorbisfile-1.2.3-static-mt-debug.a
<root>/lib/libzlib-1.2.3-static-mt-debug.a
<root>/examples/ex_bitmap.cbp
<root>/examples/ex_bitmap.c

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: http://targonski.nazwa.pl/thedmd/allegro/

Mark Oates
Member #1,146
March 2001
avatar

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

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

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 allegro5.org:
allegro-4.9.22-mingw-3.4.5.7z
allegro-4.9.22-mingw-4.2.1-sjlj.7z
allegro-4.9.22-mingw-4.4.0.7z
allegro-4.9.22-mingw-4.5.0.7z
allegro-4.9.22-msvc-10.0.7z
allegro-4.9.22-msvc-8.0.7z
allegro-4.9.22-msvc-9.0.7z

"God starts from scratch too"
Windows Allegro Build Repo: http://targonski.nazwa.pl/thedmd/allegro/

Mark Oates
Member #1,146
March 2001
avatar

what's the difference between these two (and others like it)?
allegro_dialog-4.9.22-md.lib
allegro_dialog-4.9.22-mt.lib

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Thomas Fjellstrom
Member #476
June 2000
avatar

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" -- https://twitter.com/neiltyson/status/592870205409353730

Mark Oates
Member #1,146
March 2001
avatar

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. :-/

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Dennis
Member #1,090
July 2003
avatar

http://msdn.microsoft.com/en-us/library/2kzt1wy3%28VS.71%29.aspx

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: