Incbin and Framework

BlitzMax Forums/BlitzMax Programming/Incbin and Framework

AdamRedwoods(Posted 2011) [#1]
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).


Pengwin(Posted 2011) [#2]
When using the max2d framework, you also need to import brl.pngloader to be able to use png images.

Last edited 2011


AdamRedwoods(Posted 2011) [#3]
THanks, i knew it was something my half-brain was missing.


Pengwin(Posted 2011) [#4]
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.


AdamRedwoods(Posted 2011) [#5]
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?


Pengwin(Posted 2011) [#6]
Could you post some code so we could see the problem?


AdamRedwoods(Posted 2011) [#7]
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.


AdamRedwoods(Posted 2011) [#8]
AHA! got it, I needed to import max2d BEFORE the png or freeimage modules....

wow, took a couple days.... ugh

thanks for your encouragement.


Pengwin(Posted 2011) [#9]
Glad you got it sorted.


xlsior(Posted 2011) [#10]
You may want to try Framework Assistant, it's pretty good at auto-generating the list of imports necessary for your program.


Neochrome(Posted 2012) [#11]
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


GfK(Posted 2012) [#12]
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.



Neochrome(Posted 2012) [#13]
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


GfK(Posted 2012) [#14]
http://homepage.ntlworld.com/config/fa/index.htm