Crates.io | ct-tilemap |
lib.rs | ct-tilemap |
version | 1.1.2 |
source | src |
created_at | 2023-12-09 01:33:39.126784 |
updated_at | 2023-12-09 02:07:32.567221 |
description | A library to help parse ClickTeam Tilemap files. |
homepage | |
repository | https://github.com/balt-dev/ct_tilemap |
max_upload_size | |
id | 1063148 |
size | 74,918 |
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(
/* .. */
)?;
}
Licensed under either of
at your option.
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.