Crate ct_tilemap

Source
Expand description

Simple library to handle Clickteam TileMap files.

let mut tilemap = TileMap::read(
    /* .. */
)?;

for layer in tilemap.layers.iter_mut() {
    layer.resize(8, 8);
    layer[(0, 0)] = Tile {id: 0x1234};
    layer[(0, 1)] = Tile {position: [5, 3]};
    let sublayer = layer.add_sublayer(b"YES");
    sublayer[(3, 3)].copy_from_slice(b"NO!");
}

tilemap.write(
    /* .. */
)?;

Structs§

Layer
A single layer of a tilemap.
SubLayer
A sublayer within a layer of a tilemap.
SubLayerLink
A link to a sublayer within a layer.
TileMap
A representation of a tilemap file.
TileSet
A tileset in the image.

Enums§

Property
A value of a property in a layer of a tilemap.
ReadError
A reason why reading a tilemap failed.

Unions§

Tile
A union representing a tile in a tilemap.