Hi
I was searching for the answer in many places but nobody could help me yet. like this:
Sprite is in the internal directory named like the project (as you can see). It always ends returning -2. I included needed header files.
So what could possibly go wrong?
"D:/C++/Allegro_drawing/Allegro_drawing/sprite.bmp" != "sprite.bmp"
What's your operating system?
Windows xp home
It is not equal in theory, but it is also the directory where main.cpp is. When i load font this way it works.
If you use a relative path like sprite.bmp, then you have to run the program from the same directory as sprite.bmp, or the same directory as your program, if they're the same.
You can set the current directory to where the executable is like this, if that's where your data is:
ALLEGRO_PATH appdir = al_get_standard_path(ALLEGRO_RESOURCES_PATH, ALLEGRO_NATIVE_PATH_SEP); if (!appdir) return -6; if (!al_change_directory(al_path_cstr(appdir))) return -7; al_destroy_path(appdir);
If that doesn't work, maybe the BMP file is an a weird format?
But when i do sth like:
al_load_bitmap("D:/C++/Allegro_drawing/Allegro_drawing/sprite.bmp");
it also doesn't load my sprite. Why is that? Its not a relative path then.
As Torhu mentioned, the BMP file could be in a wrong format. Try loading/saving it with MS Paint, and see if the problem persists.
Yeah, this totally worked 
Thx, but one more question - if for example i'm using photoshop to edit pictures, with what parameters i should save them with?
According to this thread, somebody had similar problem with a 32bit BMP, 24bit was fine.
If you can provide a sample non-loading bitmap, Allegro coders can have a look at what's the problem with such images.
(edit: From looking at the source, the load routine will only accept some very specific R G B bitmasks... for 32bit, only ARGB order is accepted.)
Photoshop should be able to save to .png or possibly .tga.
Thanks guyz