Commit graph

17 commits

Author SHA1 Message Date
Kurt
681756caf1 Minor perf improvement to write 1x instead of 4x 2022-05-08 13:02:24 -07:00
Kurt
47071b41f3
Refactoring: Span-based value writes and method signatures (#3361)
Existing `get`/`set` logic is flawed in that it doesn't work on Big Endian operating systems, and it allocates heap objects when it doesn't need to.

`System.Buffers.Binary.BinaryPrimitives` in the `System.Memory` NuGet package provides both Little Endian and Big Endian methods to read and write data; all the `get`/`set` operations have been reworked to use this new API. This removes the need for PKHeX's manual `BigEndian` class, as all functions are already covered by the BinaryPrimitives API.

The `StringConverter` has now been rewritten to accept a Span to read from & write to, no longer requiring a temporary StringBuilder.

Other Fixes included:
- The Super Training UI for Gen6 has been reworked according to the latest block structure additions.
- Cloning a Stadium2 Save File now works correctly (opening from the Folder browser list).
- Checksum & Sanity properties removed from parent PKM class, and is now implemented via interface.
2022-01-02 21:35:59 -08:00
Kurt
aa968f56aa File scoped namespace for drawing projects
Extract color util to separate class as it's not entirely image related.
2021-12-10 00:15:04 -08:00
Kurt
b77a197b74 Add optional EXP stripe toggle for sprite draw
helps visual identification of suspect EXP values
2021-11-07 14:48:59 -08:00
Kurt
2a9f3585e5 Change background coloring to bottom-stripe 2021-08-24 16:11:48 -07:00
Kurt
a121f4d617 Add optional box slot coloring, add settings 2021-08-24 14:21:35 -07:00
Kurt
6e3bcd5b66 Encounter visualization: Show ball and differentiate visually 2021-08-24 14:03:20 -07:00
Kurt
997e0751f3 Minor clean
Handle remainder of c#9 sugar
Fix some spelling mistakes
2020-12-21 23:37:07 -08:00
Kurt
80a5d8e451 Remove layer null check
Move to the place that triggered the null
2020-10-30 19:56:16 -07:00
Kurt
993673f0de Minor clean
no functional change
2020-06-27 23:36:53 -05:00
Kurt
afa368823e Minor clean
handle some compiler messages
2020-05-26 16:59:47 -07:00
Kurt
dab57be918 Update ImageUtil.cs 2020-04-11 23:11:22 -07:00
Kurt
775e8a61d4 Remove unused method 2020-04-09 23:03:12 -07:00
Kurt
5435a5d93e Minor updates
Fix mark (ribbon) read for index > 64
Heal party stats on set detail import
Wipe HT Language for eggs/untraded
Extract BST total color logic
2019-11-25 17:32:10 -08:00
Kurt
cefb56a749 Sword/Shield Update 2019-11-15 17:52:08 -08:00
Kurt
72aee7540d Enable nullable for drawing project
Found one NRE: daycare slot graying
Found one missing reference: GO icon (due to netcore3 refactor)
2019-10-07 19:10:38 -07:00
Kurt
94baab1c45
Split off image generation to separate project (#2395)
With the approaching games, PKM sprites are a different size from the 3DS era (as already hinted by LGPE, which has 56x68). It'll be a little easier to manage with this portion of the library walled off from the rest of the codebase.

Eventually the net46 target will use fody or something to merge in these extra dependency dll's automatically to not disturb the usual exe/dll experience.
2019-09-29 09:47:06 -07:00
Renamed from PKHeX.WinForms/Util/ImageUtil.cs (Browse further)