#9090 - RaBBi - Mon Jul 28, 2003 12:06 pm
Hello,
Like nobody seems to have a script to export map/tiles from TileStudio, I'll try this week to code my own.
This script will export map/tiles/palette/bounds/layers data from TileStudio to a .c file that HAM can use in this functions, for example.
I hope I'll manage to.
But I'd need to know how the .pal.c, raw.c and map.c (created by gfx2gba) are structured, and how arrays entries are corresponding between us.
If someone can give me a brief explantation, I'll win some time ^^
Also If someone is interested in doing it with me, here comes my msn : rabbikimto@hotmail.com
I'll post my result here when finished.
Good week to all of you ! lol
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^
#9097 - niltsair - Mon Jul 28, 2003 3:04 pm
I did one some time ago, but lost it amidst Windows reformat :-p
You'll need to use the 'tiny tiles' option in the export.
As for the format, you don't need the '.raw" or '.pal" export, those are just the binaries values of the palettes and tiles and if some people want to use that format, then a separate export file should be created.
#9105 - RaBBi - Mon Jul 28, 2003 4:16 pm
yeah I know it (tiny tiles....) niltsair :)
In fact I have a .tsd used for the "DirectGBA" librabry (from a french comptatriot author ^^), but it seems to not be adapted to HAM unlike the file generated by gfx2gba.
So I would like to find a way to create an unique .c file, with info about palette, tiles and map, plus layers/bounds and other.
But I need to understand the values in the array entries of pal/tiles/map from gfx2gba files.
Did you fint it difficult to code the script ?
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^
#9106 - niltsair - Mon Jul 28, 2003 4:33 pm
Yeah, i found out about Tile Studio from that french guy's tutorial too ;-)
Mmm, not to difficult, I mostly builded it out of the DirectGba tutorial one and others export files examples from tile studio to get myself started.
A trick I used for sprites exports, was to actually build a map of your sprites, so they get exported in the order you wanted them.
There was some options that i found lacking that i think they added, in particular the detection of flipped tiles (instead of the creation of a new one) and layer support. But overall, i think that this is a very nice program, the best i've used so far for tiles creation.
#9114 - RaBBi - Mon Jul 28, 2003 5:45 pm
yeah I find it good too
and I want to take the more power of it I can ^^
did you still use this soft ?
In fact, for the moment, I don't manage to identify what are the difference between what is generated by TileStudio (from french guy's .tsd) and what is generated by gfx2gba.
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^
#9117 - niltsair - Mon Jul 28, 2003 5:59 pm
gfx2gba only generate arrays of data while the other export, generate the arrays of data and code to initialize structure containing info about them tiles and map, that he use in his library.
Right now i'm working on a raycast engine so i don't use it. But when i go back to working with tiles, i'll get around writing an export file again.
#9118 - RaBBi - Mon Jul 28, 2003 6:11 pm
yeah I know for the structures, but it's not really the matter.
Perhaps I will use the defined, but I think I'd use the ones I'd create ^^
In fact, it seems that the arrays in gfx2gba files and the arrays in the TS Exporter aren't similar.
So I wanted to know if they store the information (tiles, maps) by the same way.
Cos when I put pointers to my tile array or map array in HAM functions, the result is too weird...
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^
#9119 - niltsair - Mon Jul 28, 2003 6:15 pm
I don't know about the specific format used by Ham, but you can see the format expected by the GBA on pern project or the french guy tutorial. Ham might expect a structutre that contains info about the Maps/Tiles which contains a pointer to the actual data.
#9120 - RaBBi - Mon Jul 28, 2003 6:28 pm
yes
but like I said, structures doesn't matter for the moment.
If I know how is stored and how are linked the array of tiles and map and palette in gfx2gba files, which works in ham, whithout any structures defined in gfx2gba files,
so if I know that and if I can re-create/generate the same information with the TS exporter, my arrays will be working on HAM too.
won't they ? ^^
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^
#9122 - niltsair - Mon Jul 28, 2003 6:38 pm
It should, like i said I never used Ham.
But gfx2gba generates GBA specific code, so by having this format (gba format) you should be fine :
-Palette : 256 u16 entries representing each colors.
-Tiles : 8x8 u8 entries containing the index of the color used
-Map : 32x32 u16 entries containing :
............................... bits 0-9: Tile number
............................... bit 10: Horizontal flip flag
............................... bit 11: Vertical flip flag
This is for 256colors mode, and a 256x256 map.
When using the tiles values in your program, you need to cast it to u16.
#9127 - Geno - Mon Jul 28, 2003 10:56 pm
Actually, I believe the latest version of TileStudio contains a file for exporting for the GBA format.
_________________
Out of Order.
#9128 - RaBBi - Mon Jul 28, 2003 11:00 pm
THANK U NILTSAIR !
The info that I was missing was the map format ^^
So can I paste some code generated by the french export script here ?
And you should tell me if it's gba-formated, cause I suppose it doesn't.
Geno>Yes the lastest version has an export script for GBA, but it seems to be in ASM ;)
(I say "it seems" cause I'm not familiar with ASM yet)
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^
#9154 - niltsair - Tue Jul 29, 2003 2:46 pm
It was GBA format.
You basicly only needed to keep the code producing arrays. The rest was code to initialize structure containing infos about the Tiles/Maps and some boundaries maps.
#9176 - RaBBi - Tue Jul 29, 2003 11:19 pm
ok niltsair
but that was what I do the first and ham doesn't seems to understand data array that I put in function parameters.
_________________
Sorry for my poor english, but it would be worst for you to understand me if I speak in my native language, French ^^