#27459 - twistee - Wed Oct 13, 2004 9:43 am
Hi,
I recently found this program and it is basically what I need to do the backgrounds for my game. I was wondering how I would use this program as it outputs the file in RAW, also I am using mode 0. Does anyone know how I could include the RAW files in my game, and also the code to load the map, tiles and palette? Oh, and the program is here.
cheers.
#27475 - sajiimori - Wed Oct 13, 2004 7:57 pm
RAW is not the name of a format. You need to know how the program arranges its output. As far as getting the data in your ROM, read the FAQ (Q: How do I load assets such as audio and graphics from my program?).
#27495 - twistee - Thu Oct 14, 2004 3:38 am
I am attempting to convert the files to c code. I can convert the palette and the tileset since it saves the tileset as a bmp. The only problem is the map data, I tried the raw2c convertor, which converted it, but it didnt look like it worked (i.e. the picture is scrambled). Any ideas on how to convert the map data to c?
#27496 - sajiimori - Thu Oct 14, 2004 4:19 am
Apparently your map data was in C, because you could compile it, right?
You need to find out how the data is arranged, and that is determined by the tool you're using. Try reading its documentation. Then think about whether that arrangement is what you want, and if it isn't then think about what you'd like to be different.
If this all sounds vague, please understand that I can only go by what you tell me. There are basically 3 things you need to know about what you're trying to do
1) The format your tool's output is in (which you might find in its documentation).
2) The format that map data is in for GBA mode 0 (which is in the various GBA docs, but feel free to ask for extra help here).
3) If the formats are different, how to convert from the first to the second (but don't ask me until you understand each format).
#33337 - WillyWonka - Sun Jan 02, 2005 2:35 am
I got this information from the author of the program a long time ago. I never figured out how to use it but it may be of help to you.
"The palette file begins with a 32-bit entry count, and then continues with
the 16-bit entries.
The tile file begins with a 32-bit tile count, and then continues with the
tile data.
The map file begins with 32-bit width (in tiles), 32-bit height (in tiles),
and then 32-bit tile indices. The upper six bits contain the tile fliipping
flags. If I remember correctly, all you have to do is and the index with
0xFC000000 and shift right by sixteen to convert the flags to GBA format."