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

  • A single layer of a tilemap.
  • A sublayer within a layer of a tilemap.
  • A link to a sublayer within a layer.
  • A representation of a tilemap file.
  • A tileset in the image.

Enums

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

Unions

  • A union representing a tile in a tilemap.