diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b55f1c..6d06bd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,78 @@ As of v1.0.4, version numbers are shared between esplugin and esplugin-ffi. +## [6.0.0] - 2024-06-27 + +### Added + +- Support for the new medium plugin type introduced by Starfield 1.12.30.0. +- Support for comparing FormIDs between Starfield plugins. +- Support for counting the number of override records in Morrowind and Starfield + plugins. +- `Plugin::is_medium_plugin()`, which checks if the given plugin is a medium + plugin. +- `Plugin::is_valid_as_medium_plugin()`, which checks if the given plugin's + FormIDs fall within the valid range for a medium plugin. +- `Error::UnresolvedFormIds` as a new error variant. +- `Error::PluginMetadataNotFound` as a new error variant. +- `plugins_metadata()`, which outputs an opaque struct that holds + metadata for all the given plugins that can be passed to + `Plugin::resolve_record_ids()`. +- `PluginMetadata` as an opaque struct that holds metadata about a plugin. +- `Plugin::resolve_record_ids()`, which is used to resolve Morrowind and + Starfield records using the metadata of their masters, which is provided by + the output of `plugins_metadata()`. +- `Plugin::parse_reader()` as a more generic replacement for `Plugin::parse()` + and `Plugin::parse_open_file()`. +- `ParseOptions` as an opaque struct holding configuration options for parsing a + plugin. + +### Changed + +- `Plugin::count_override_records()` now returns a `Result`. It + will error if called on a Morrowind or Starfield plugin that has not had + `Plugin::resolve_record_ids()` run on it. +- `Plugin::overlaps_with()` now returns a `Result`. It will error + if called on a Starfield plugin that has not had + `Plugin::resolve_record_ids()` run on it. +- `Plugin::overlap_size()` now returns a `Result`. It will error + if called on a Starfield plugin that has not had + `Plugin::resolve_record_ids()` run on it. +- `Plugin::is_valid_as_light_plugin()` now returns a `Result`. It + will error if called on a Starfield plugin that has not had + `Plugin::resolve_record_ids()` run on it. +- `Plugin::is_valid_as_override_plugin()` now returns a `Result`. + It will error if called on a Starfield plugin that has not had + `Plugin::resolve_record_ids()` run on it. +- `Plugin::game_id()` now returns a `GameId` instead of a `&GameId`. +- `Plugin::is_override_plugin()` has been renamed to + `Plugin::is_update_plugin()` to reflect the terminology used by Starfield's + Creation Kit. +- `Plugin::is_valid_as_override_plugin()` has been renamed to + `Plugin::is_valid_as_update_plugin()` to reflect the terminology used by + Starfield's Creation Kit. +- `Plugin::parse_file()` and `Plugin::is_valid()` now take a `ParseOptions` + parameter object instead of a boolean indicating whether or not to only load + the plugin's header. +- `Error::ParsingError`'s first field is now a `Box<[u8]>` instead of a + `Vec`. +- `Error::DecodeError`'s first field is now a `Box<[u8]>` instead of a + `Vec`. + +### Fixed + +- `Plugin::is_master_file()` incorrectly used the file extension instead of the +header flag for Morrowind plugins. + +### Removed + +- `Plugin::is_light_master()`: use `Plugin::is_light_plugin()` instead. +- `Plugin::is_valid_as_light_master()`: use `Plugin::is_valid_as_light_plugin()` + instead. +- `Plugin::parse()`: use `Plugin::parse_reader()` with a `std::io::Cursor` + instead. +- `Plugin::parse_open_file()`: use `Plugin::parse_reader()` instead. + ## [5.0.1] - 2024-05-02 ### Changed diff --git a/Cargo.lock b/Cargo.lock index a5add06..353c242 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -214,7 +214,7 @@ dependencies = [ [[package]] name = "esplugin" -version = "5.0.1" +version = "6.0.0" dependencies = [ "criterion", "encoding_rs", @@ -226,7 +226,7 @@ dependencies = [ [[package]] name = "esplugin-ffi" -version = "5.0.1" +version = "6.0.0" dependencies = [ "esplugin", "libc", diff --git a/Cargo.toml b/Cargo.toml index 77c200e..b2ddccc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "esplugin" -version = "5.0.1" +version = "6.0.0" authors = ["Oliver Hamlet "] description = "A free software library for reading Elder Scrolls plugin (.esp/.esm/.esl) files." documentation = "https://docs.rs/esplugin" diff --git a/ffi/CHANGELOG.md b/ffi/CHANGELOG.md index 824ddcc..ddb759e 100644 --- a/ffi/CHANGELOG.md +++ b/ffi/CHANGELOG.md @@ -2,6 +2,49 @@ After v1.0.3, version numbers are shared between esplugin and esplugin-ffi. +## [6.0.0] - 2024-06-27 + +### Added + +- `esp_get_error_message()`, which outputs a thread-local error message string + for the last error that occurred. +- `esp_plugin_is_medium_plugin()`, which checks if the given plugin is a medium + plugin (as introduced by Starfield 1.12.30.0). +- `esp_plugin_is_valid_as_medium_plugin()`, which checks if the given plugin's + FormIDs fall within the valid range for a medium plugin. +- `esp_get_plugins_metadata()`, which outputs an opaque struct that holds + metadata for all the given plugins that can be passed to + `esp_plugin_resolve_record_ids()`. +- `esp_plugins_metadata_free()`, which frees objects allocated by + `esp_get_plugins_metadata()`. +- `esp_plugin_resolve_record_ids()`, which is used to resolve Morrowind and + Starfield records using the metadata of their masters, which is provided by + the output of `esp_get_plugins_metadata()`. +- `ESP_ERROR_UNRESOLVED_RECORD_IDS` as a new error code. +- `ESP_ERROR_PLUGIN_METADATA_NOT_FOUND` as a new error code. + +### Changed + +- Strings that contain null bytes now cause errors instead of being silently + truncated when read from: + - Plugin filenames + - Plugin masters + - Plugin descriptions (excluding Morrowind plugins, which still have their + descriptions truncated to the first null byte) +- `esp_plugin_is_override_plugin()` has been renamed to + `esp_plugin_is_update_plugin()` to reflect the terminology used by Starfield's + Creation Kit. +- `esp_plugin_is_valid_as_override_plugin()` has been renamed to + `esp_plugin_is_valid_as_update_plugin()` to reflect the terminology used by + Starfield's Creation Kit. +- Updated to esplugin v6.0.0. + +### Removed + +- `esp_plugin_is_light_master()`: use `esp_plugin_is_light_plugin()` instead. +- `esp_plugin_is_valid_as_light_master()`: use + `esp_plugin_is_valid_as_light_plugin()` instead. + ## [5.0.1] - 2024-05-02 ### Changed @@ -17,7 +60,8 @@ After v1.0.3, version numbers are shared between esplugin and esplugin-ffi. ### Removed -- The `ffi-headers` build feature: if you want to generate C or C++ headers, install and run cbindgen separately. +- The `ffi-headers` build feature: if you want to generate C or C++ headers, + install and run cbindgen separately. ## [4.1.1] - 2023-12-06 diff --git a/ffi/Cargo.toml b/ffi/Cargo.toml index 8c4a97f..d9d269b 100644 --- a/ffi/Cargo.toml +++ b/ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "esplugin-ffi" -version = "5.0.1" +version = "6.0.0" authors = ["Oliver Hamlet "] description = "A wrapper library providing a C FFI for esplugin." documentation = "https://docs.rs/esplugin-ffi" @@ -16,7 +16,7 @@ exclude = [ ] [dependencies] -esplugin = { version = "5.0.1", path = ".." } +esplugin = { version = "6.0.0", path = ".." } libc = "0.2" [lib]