Because my installation lacks jpeg, I edited some ini files for test_driver. Namely: test_image (removed jpeg sections), and test_prim (changed file name for obp). For the latter of course I also saved a copy of the file in an another format. Still it failed (gracefully) to load the third bitmap. I have tried bmp (24 or 32 bit), and png with some random settings (desperately tried turning down compression). I don't see why the image won't load.
I ran it through gdb, and it justs fails to fopen the third file. (Notice the previous two images were loaded without problem.)
So here's the first few lines of the ini (only first 3 are of importance):
[bitmaps] bkg=../examples/data/bkg.png texture=../examples/data/texture.tga obp=../examples/data/obp.bmp [ll] op0= al_draw_bitmap(bkg, 0, 0, 0) op1= al_build_transform(trans, 320, 240, 1, 1, 1.0) op2= op3= al_set_blender(ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_ONE) op4= al_use_transform(trans) [...]
(I asserted the line ending and non-printing characters)
Here's my first attempt at debugging it:
Allegro 5.1.2.0 debug. Build without SSE. MinGW 4.5. Windows 7. I've tried a fresh restart.
The only thing I can think of is some illegal access to memory used by fopen.
Any more sensible ideas?
If you swap the order of files around, the third one always fails?
Make sure the obp.bmp exists in the $BUILDDIR/examples/data, where $BUILDDIR is your build directory. It won't work to just have it in the source examples/data directory.
D'OH! Now I feel stupid. I was confused because the ini files are only in the source directory.
Rule #1 of debugging: the least trustworthy needs the closest inspection.