问题
I'm developing an Allegro-library based framework for simple game development in C++, and so far I haven't had a single problem with Allegro. Now, though, for my bitmap-extension class, nfImage (Line 196), when I use my "nfImage.loadFromFile" function (Line 1429) it doesn't want to load a perfectly legitimate PNG file I made in MS Paint. The file wouldn't fit in this post, so the code's here.
When I try to load "hello.png" it gives me my "Neil's Framework: al_load_bitmap failed to load the image 'hello.png'" error and returns -1. Does anyone know why Allegro isn't loading this file? I've tried loading files in Allegro with my same setup using this tutorial, and it works perfectly, but as soon as I put it in a class is messes up.
Thanks guys, -Neil
回答1:
I'm not going to debug thousands of lines of code, but this article contains all the useful information that you would need if you read it carefully.
来源:https://stackoverflow.com/questions/14099984/allegro-5-al-load-bitmap-not-working