Incbin and Framework
BlitzMax Forums/BlitzMax Programming/Incbin and Framework
| ||
Hacing a small problem here. Incbin is not working if I use a framework. Code: I may be missing some Mod to import, but not sure which one since brl.blitz is where Incbin resides. Ideas? I've tried upgrading Blitzmax 1.42, and tried switching the driver (which led to me finding a bug), and tried to test if the image was corrupt (its not). |
| ||
When using the max2d framework, you also need to import brl.pngloader to be able to use png images. Last edited 2011 |
| ||
THanks, i knew it was something my half-brain was missing. |
| ||
Just to clarify, when not using a framework, I believe BlitzMax imports all modules, or at least all the brl modules. However, when you do use a framework, it only loads the modules specified by that framework, so anything else must be imported. |
| ||
I figured, thanks, but am actually having a major problem with incbin in a larger program, so am at my wits end. Is there another way to include binary files other than incbin? |
| ||
Could you post some code so we could see the problem? |
| ||
I can now, as I've finally replicated the problem in a smaller set of code. The original code was using bah.freeimage, but it seems I've managed to replicate the problem: It's the order of the imports/framework. Very strange, and it's taken quite a while to isolate the problem. |
| ||
AHA! got it, I needed to import max2d BEFORE the png or freeimage modules.... wow, took a couple days.... ugh thanks for your encouragement. |
| ||
Glad you got it sorted. |
| ||
You may want to try Framework Assistant, it's pretty good at auto-generating the list of imports necessary for your program. |
| ||
How on earth do you determin which part of Blitz you need to Import? i like the idea of beig able to shrink the file |
| ||
How on earth do you determin which part of Blitz you need to Import? i like the idea of beig able to shrink the file ou may want to try Framework Assistant, it's pretty good at auto-generating the list of imports necessary for your program. |
| ||
Lol i didn't see that. Cant believe i missed it! was working at the time of reading (im a new buyer of BlitzMax) Where is this tool? Last edited 2012 |
| ||
http://homepage.ntlworld.com/config/fa/index.htm |