Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to a much more recent branch of CommonLibSSE-NG (#97)
There are four major changes in this PR, because one thing led to another. 1. Updated my fork of CommonLibSSE-NG to track the `ng` branch of the alandtse/CommonLibVR fork. This might make it work with 1.6.1130, but I have not yet tested. There are some problems that might prevent me from releasing this immediately-- input contexts changed enough to cause trouble with my checks for whether the HUD should be drawn or not. E.g., in the opening scene when the player cannot control movement or attack, the HUD should never be shown. These checks now depend on detecting 1130 and changing offsets correctly. Introduced the namespace `soulsy` for types shared between Rust and C++, to avoid the `Color` type name conflict with some dx things pulled in by the newer clib. There were other adaptations made for the newer clib, but they were uninteresting. 2. Reworked how we equip items to handle extra data better. There are now three functions for finding bound objects for a form: the pre-existing first-match function, a variant that filters for only items currently being worn, and a variant that looks for exact name matches. These implementations currently repeat code, but I'm not ready to clean that up with any refactors until I'm sure they work. Updated all code paths that equip or un-equip items to use the path most appropriate for them. This work is intended to make sure we equip the correct variation of an object: the iron dagger with the correct temper level, or the dagger with the correct enchant. We then pass the appropriate extra data through to the `EquipObject()` call. This seems to work as expected. I'm still not sure how to test bug #81 reliably. (I mean, soul trap on a dagger works. This might be a sign that it's fixed.) 3. Added support for every single shout variant in vanilla, Stormcrown, and Thunderchild. (The other shout remakes don't add new shouts.) Also worked shout KID distributions to use shout spells (three per shout) instead of effects (too many). Komegaki's icon packs should work when he releases them. Wrote a number of tests to make sure that my claims about coverage are correct. Less importantly, demoted a lot of logging to trace level. Tuned up log lines that are sticking around. Now that the logs are unified I have less tolerance for repeated information. 4. Added the `textcode` crate to handle converting Windows code page text encodings-- aka ISO-8859 encodings-- to UTF-8. This should *correctly* handle all cases of item names that contain invalid UTF-8 characters. I was doing lazy lossy conversions before, which had the virtue of preventing the mod from crashing on encountering these strings. However, when I unified logging, I re-introduced the crash scenario for every log line that mentioned an item name with this problem. The fix has two parts: First, write two convenience functions for getting item names (one for the form base name, and one for the full display name) and have them return utf8 strings. Second, wrap every single use of item names in log strings with one or the other of these functions.
- Loading branch information