Allegro 5: al_load_bitmap not working

限于喜欢 提交于 2019-12-25 08:59:39

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!