desactivate incbin clause inside a bmax file
BlitzMax Forums/BlitzMax Programming/desactivate incbin clause inside a bmax file
| ||
Hi ! inside my program, i've a lot of included graphics external files (.png) to the final exe ('incbin'). These are graphics files. Into the design step, my artist need to access them. Is there a way for me to 'desactivate all the incbin clauses' without edit all the bmax file and change it manually ? (compiler directive ?) Thanks. Incbin "stars.png" global stars=LoadImage( "incbin::stars.png" ) ... |
| ||
'desactivate all the incbin clauses' Not entirely sure what your asking here, but for one you cannot change any incbinned files once the code is compiled. |
| ||
perhaps more clear : is there a compiler directive to desactivate the incbin process before compile the program (to keep the external files). |
| ||
No, but you can always do something like this:?Debug Const RESOURCE_PATH:String = "" ?Not Debug Const RESOURCE_PATH:String = "incbin::" IncBin "resources/dat/levels.ini" IncBin "resources/gfx/logo.png" ? Then in your code you load stuff like this: LoadImage(RESOURCE_PATH + "resources/gfx/logo.png") That way debug releases use files in the filesystem, and release versions are incbined. |
| ||
Unless you rewrote BMK, no You will have to modify the source at least once. I would recommend to do a "protocol based approach" like: global loadProtocol:string = "" if incBin then loadProtocol = "incbin::" This also would give you flexible switch to TCP resources or whatever. |
| ||
Nice idea thanks ! |