|
June 1st, 2006, 07:38 Posted By: wraggster
News from PataterSoft:
Hay kiddies! Guess what? I made you this special little app that helps you break that nasty habit of yours. Do you want to convert some data out of a .c, .cpp, or .h file into REAL, ACTUAL binary data? Does everybody on #dsdev yell at you for using .h files for your graphics instead of .bin files, but your graphic converter only converts graphics into .h? Enter hConvert. The hero of smashing text based binary data. It'll parse through a (currently limited) hex based, comma delimited, "{" starting, "};", terminated dump of binary data and spit out a little .bin file. Super useful! You know you want it oh so badly.
Using bin files, devkitARM, and the default makefile for devkitARM (which uses bin2o) is the recommened way of linking binary data into your program. However, the most portable way of including binary data in your program is through an isolated translation unit, ie a .c file a textual representation of the data to be linked. Many kiddies would make the mistake of then including this file, "#include "my_gfx_thingy.c", which is bad bad bad. NEVER DO IT. The proper way to make it a truly isolated and portable translation unit is to make a .h file that will refer to it using the extern keyword. That would look like this in the .h file (not the .c) which we include from where ever we want to referece the graphic, continuing our previous example, "extern const uint16 my_gfx_thingy[];".
hConvert would be useful, if you are concerned about portability and would never use devkitARM's bin2o makefile rule that wouldn't exist in another toolchain, in converting a .c isolated translation unit into binary data for use with a filesystem, such as GBA_NDS_FAT lib from chishm or Nintendo's filesystem (using their tools).
hConvert is a an application for x86 Linux and Macintosh OS X (and Windows at a later date, probably tomorrow).
More Info --> http://www.patatersoft.info/hconvert.html
For more information and downloads, click here!
There are 0 comments - Join In and Discuss Here
|
|