The title refers to the unknown second argument desired by the al_register_bitmap_loader() function. In fact, the documentation and the MSVS snippet auto-completer disagree on exactly what it wants, the former designating an "ALLEGRO_BITMAP *(*loader)(const char *filename)"; the latter demanding an "ALLEGRO_IIO_LOADER_FUNCTION loader". I assume that these types are identical, though how this is so is beyond my ken, and all attempts to satisfy the wanton desires of this function have proven fruitless.
So I am asking for someone to explain in clear terms the reason why this function was implemented and how to provide it an argument which allows me to make use of it. ( I am aware that the NULL pointer allows you to compile without error, but it still precludes actual use of it to load bitmaps, which is the whole idea. )
I'd assume you just need to pass it any pointer to a function that returns and ALLEGRO_BITMAP* while taking a const char*. This would make most sense, if you think about it.
As an example:
Thank you for the help! It has kicked the ball further down the field. I do have a resulting problem I would like to know the answer to, however: namely, Doesn't allegro supply the code for loading images? If this is so, I must be using the wrong method of loading them.
Yes, it has code for a few image formats included already, such as png. You have to init the image addon to use them.