Me again.
So I'm experimenting with A5 and would like to draw primitive shapes or display bmp files :-)
For that I need addons, right?
I checked, the test.bmp file IS there, but still I see a yellow square. ALLEGRO_BITMAP *bmp = al_load_bitmap("test.bmp"); fails.
The conclusion:
The manual was right.
Note: the core Allegro library does not support any image file formats by default. You must use the allegro_image addon, or register your own format handler
Recently I asked how to link to Allegro5. Today I'm asking how to use addons in Code::Blocks 10.
I tried project -> build options -> linker settings, and added liballegro_image-5.0.0-RC2-mt.a (what are the debug ones for?) Didn't work.
Also tried settings -> compiler and debugger -> linker settings , adding the same file. Didn't work.
Can someone help me? Again.
Here's my code in case I actually already have it working but am missing something:
anim.h
anim.cpp
Have you called al_init_image_addon()?
I had not.
It wasn't obvious to me that I had to call it either. But now I see.
Thank you once again
al_init(); //allegro itself al_init_image_addon(); //bitmaps, pngs, jpegs etc al_init_font_addon(); //for fonts, just bitmap ones al_init_primitives_addon(); //rectangles, circles, triangles etc al_init_ttf_addon(); // true type fonts (scalable vector fonts) al_install_mouse(); //the mouse al_install_keyboard(); //the keyboard al_install_joystick(); //game pads al_install_audio(); //for audio, WAVs, al_init_acodec_addon(); //audio codecs like OGG and FLAC