Code: Select all
ind = TILE_USERINDEX;
...
u16 ind1= ind ;
VDP_loadTileSet(rebrol.tileset, ind, TRUE); // tileset for first background is located at ind1
map1 = unpackMap(rebrol.map, NULL);
ind += rebrol.tileset->numTile;
u16 ind2 = ind ;
VDP_loadTileSet(rebror.tileset, ind, TRUE); // tileset for second background is loaded at ind2
map2 = unpackMap(rebror.map, NULL);
ind += rebror.tileset->numTile;
// you only need these lines
VDP_setMap(VDP_PLAN_B, map1, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, ind1), 33,0 );
VDP_setMap(VDP_PLAN_A, map2, TILE_ATTR_FULL(PAL0, FALSE, FALSE, FALSE, ind2), 0,0 );
So now you can use tiles starting at 'ind' to store the sprites tiles (using 30000+ as index is crazy as it actually takes a tile index position and not a VRAM address )