diff --git a/CHANGELOG.md b/CHANGELOG.md index f7c54b10edb4fc9dd2192781dd2ab8a3dab06881..cef98f976f513c2651395ae50db6e62ffe04b221 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,28 +11,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `Tileset::columns`. - `Layer::id`, `Layer::width` and `Layer::height`. - Support for 'object'-type properties. +- Support for multiline string properties. - Documentation for map members. - Tests for `tiled_base64_zstandard.tmx`. - `.gitattributes` for line ending consistency. -- Support for multiline string properties. - MIT license file. ### Changed -- Reorganized crate: - - `parse_file`, `parse` -> `Map::parse_file` with optional path. - - `parse_with_path` -> `Map::parse_reader` - - `parse_tileset` -> `Tileset::parse` - - `Frame` has been moved to the `animation` module. - - `ParseTileError` & `TiledError` have been moved into the `error` module. - - `Image` has been moved into the `image` module. - - `LayerTile`, `Layer`, `LayerData`, `ImageLayer` & `Chunk` have been moved into the `layers` module. - - `Map` & `Orientation` have been moved into the `map` module. - - `ObjectGroup`, `ObjectShape` & `Object` have been moved into the `objects` module. - - `Colour`, `PropertyValue` & `Properties` have been moved into the `properties` module. - - All mentions of `Colour` have been changed to `Color` for consistency with the Tiled dataformat. - - `Tile` has been moved into the `tile` module. - - `Tileset` has been moved into the `tileset` module. - - `Map::get_tileset_by_gid` -> `Map::tileset_by_gid` +- `parse_file`, `parse` -> `Map::parse_file` with optional path. +- `parse_with_path` -> `Map::parse_reader`. +- `parse_tileset` -> `Tileset::parse`. +- All mentions of `Colour` have been changed to `Color` for consistency with the Tiled dataformat. +- `Map::get_tileset_by_gid` -> `Map::tileset_by_gid`. - `Layer::tiles` changed from `Vec<Vec<LayerTile>>` to `Vec<LayerTile>`. - Tile now has `image` instead of `images`. ([Issue comment](https://github.com/mapeditor/rs-tiled/issues/103#issuecomment-940773123)) - Tileset now has `image` instead of `images`. diff --git a/README.md b/README.md index 4b2eec07dfe57d9eeda2e3cb98b81eb3a3059768..fd40af5dd994e39fd60c3ebfe3aeddbf4cffe6c5 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ to the dependencies section of your Cargo.toml. ### Example ```rust -use tiled::map::Map; +use tiled::Map; fn main() { let map = Map::parse_file("assets/tiled_base64_zlib.tmx").unwrap(); diff --git a/examples/main.rs b/examples/main.rs index afdcb6d209980f26edeec11c2e21b7537d822815..d39dd5239372454e96562194133e769bf8e322bf 100644 --- a/examples/main.rs +++ b/examples/main.rs @@ -1,4 +1,4 @@ -use tiled::map::Map; +use tiled::Map; fn main() { let map = Map::parse_file("assets/tiled_base64_zlib.tmx").unwrap(); diff --git a/src/lib.rs b/src/lib.rs index 2033ef1188ba07f1a3501cfb2d3f1f5213cb5548..ff45bb162112bc1d4f6a7c04bfc07f0847bff013 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,10 +1,20 @@ -pub mod animation; -pub mod error; -pub mod image; -pub mod layers; -pub mod map; -pub mod objects; -pub mod properties; -pub mod tile; -pub mod tileset; +mod animation; +mod error; +mod image; +mod layers; +mod map; +mod objects; +mod properties; +mod tile; +mod tileset; mod util; + +pub use animation::*; +pub use error::*; +pub use image::*; +pub use layers::*; +pub use map::*; +pub use objects::*; +pub use properties::*; +pub use tile::*; +pub use tileset::*; diff --git a/tests/lib.rs b/tests/lib.rs index 061f4ed2a543d383dfce0f5c9659adb876ebc7ab..411996a34bf0afe2ecff3d5ad197581c085aa4f3 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -1,7 +1,7 @@ use std::path::Path; use std::{fs::File, path::PathBuf}; use tiled::{ - error::TiledError, layers::LayerData, map::Map, properties::PropertyValue, tileset::Tileset, + TiledError, LayerData, Map, PropertyValue, Tileset, }; fn parse_map_without_source(p: impl AsRef<Path>) -> Result<Map, TiledError> {