#6884 - einhaender - Wed Jun 04, 2003 5:52 am
Hi, iam having a little difficulties here. I have a very large tileset and every tile is different.
#define BG_WIDTH 160
#define BG_HEIGHT 128
const u16 BgData[] = { .... }
Now with Map Editor Beta I built my Background and exported it to a
.c file. However, since the the Editor builds something like
const u8 map[ 64 * 64 ] = { .. } , and there are so many tiles, the map
array will hold illegal integer values like:
const u8 map[ 64 * 64 ] = {
... 0x104,0x105,0x106 ...
}
There seems to be no posibility to change the datatype in Map Editor beta.
Then I tried Mappy with Fmp2Gba but the output is different and there are no good examples on how to use it. Since Iam coming from gbajunkies tutorial which uses Map Editor beta, my code reading the mapdata array looks like:
typedef struct Bg
{ ... }Bg;
Bg bg0;
// load Background Palette
for(loop = 0; loop < 256; loop++) {
BGPaletteMem[loop] = BgPalette[loop];
}
// load background tile data
for(loop = 0; loop < BG_WIDTH * BG_HEIGHT /2; loop++) {
bg0.tileData[loop] = BgData[loop];
}
temp = (u16*)maparray;
for(loop = 0; loop < 32*8/2; loop++)
bg0.mapData[loop] = temp[loop];
So if anyone found a solution for Map Editor beta to deal with large tilesets and the exported Maps, or has easy to understand explaination on how to use Mappy with the above code, that would be nice.
Thanks in advance
#define BG_WIDTH 160
#define BG_HEIGHT 128
const u16 BgData[] = { .... }
Now with Map Editor Beta I built my Background and exported it to a
.c file. However, since the the Editor builds something like
const u8 map[ 64 * 64 ] = { .. } , and there are so many tiles, the map
array will hold illegal integer values like:
const u8 map[ 64 * 64 ] = {
... 0x104,0x105,0x106 ...
}
There seems to be no posibility to change the datatype in Map Editor beta.
Then I tried Mappy with Fmp2Gba but the output is different and there are no good examples on how to use it. Since Iam coming from gbajunkies tutorial which uses Map Editor beta, my code reading the mapdata array looks like:
typedef struct Bg
{ ... }Bg;
Bg bg0;
// load Background Palette
for(loop = 0; loop < 256; loop++) {
BGPaletteMem[loop] = BgPalette[loop];
}
// load background tile data
for(loop = 0; loop < BG_WIDTH * BG_HEIGHT /2; loop++) {
bg0.tileData[loop] = BgData[loop];
}
temp = (u16*)maparray;
for(loop = 0; loop < 32*8/2; loop++)
bg0.mapData[loop] = temp[loop];
So if anyone found a solution for Map Editor beta to deal with large tilesets and the exported Maps, or has easy to understand explaination on how to use Mappy with the above code, that would be nice.
Thanks in advance