ct-tilemap

Crates.ioct-tilemap
lib.rsct-tilemap
version1.1.2
sourcesrc
created_at2023-12-09 01:33:39.126784
updated_at2023-12-09 02:07:32.567221
descriptionA library to help parse ClickTeam Tilemap files.
homepage
repositoryhttps://github.com/balt-dev/ct_tilemap
max_upload_size
id1063148
size74,918
Balt (balt-dev)

documentation

README

Simple library to handle Clickteam TileMap files.

use ct_tilemap::{TileMap, Tile};

fn main() {
    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(
        /* .. */
    )?;
}

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 10

cargo fmt