-
Hey there, version = "1.0"
transparent_colour = "000000"
[image.tetrominos]
filename = "tetrominos.png"
tile_size = "16x16" I then use it with let (background, mut vram) = gba.display.video.tiled0();
vram.set_background_palettes(tetrominos::PALETTES);
let tileset = TileSet::new(
tetrominos::tetrominos.tiles,
display::tiled::TileFormat::FourBpp,
);
let mut bg = background.background(
Priority::P0,
display::tiled::RegularBackgroundSize::Background64x32,
); However, when I use it for the background, it appears it still is splitting it into 4 8x8 pieces. So, for instance, the first color tile begins at index bg.set_tile(
&mut vram,
(0u16, 0u16).into(),
&tileset,
TileSetting::new(4, false, false, 0),
);
bg.set_tile(
&mut vram,
(0u16, 1u16).into(),
&tileset,
TileSetting::new(6, false, false, 0),
);
bg.set_tile(
&mut vram,
(1u16, 0u16).into(),
&tileset,
TileSetting::new(5, false, false, 0),
);
bg.set_tile(
&mut vram,
(1u16, 1u16).into(),
&tileset,
TileSetting::new(7, false, false, 0),
); My question is: is this the intended way to use the library, or should the background tiles respect the size given in the Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yeah, this is intended but badly documented. The tile size option was originally intended for sprites (until we got rid of the toml importing of sprites) and now makes the exporting worse but does change the order in which the tiles are exported. We're hoping to get rid of the |
Beta Was this translation helpful? Give feedback.
Yeah, this is intended but badly documented. The tile size option was originally intended for sprites (until we got rid of the toml importing of sprites) and now makes the exporting worse but does change the order in which the tiles are exported.
We're hoping to get rid of the
include_gfx!
macro with the toml definition in the future and replace it with something better, but I'll keep 16x16 tiles in mind because it would be quite nice to have an API for rendering those more easily.