diff --git a/PKHeX.Core/Editing/WurmpleUtil.cs b/PKHeX.Core/Editing/WurmpleUtil.cs index 40a455f43..947123380 100644 --- a/PKHeX.Core/Editing/WurmpleUtil.cs +++ b/PKHeX.Core/Editing/WurmpleUtil.cs @@ -1,5 +1,8 @@ namespace PKHeX.Core { + /// + /// Indicates or coerces values pertaining to and its branched evolutions. + /// public static class WurmpleUtil { /// @@ -52,4 +55,4 @@ return evoVal == wIndex; } } -} \ No newline at end of file +} diff --git a/PKHeX.Core/PKM/Strings/StringConverter.cs b/PKHeX.Core/PKM/Strings/StringConverter.cs index 5d81c4e6c..cd3dc8756 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter.cs @@ -33,15 +33,15 @@ public static class StringConverter /// /// Gets the bytes for a Generation specific string according to the input parameters. /// - /// + /// Span of bytes to write encoded string data /// Decoded string. /// Maximum length of the input - /// + /// Buffer pre-formatting option /// Generation string format /// Encoding is Japanese /// Encoding is Big Endian /// Language specific conversion (Chinese) - /// Encoded data. + /// Count of bytes written to the . public static int SetString(Span destBuffer, ReadOnlySpan value, int maxLength, StringConverterOption option, int generation, bool jp, bool isBigEndian, int language = 0) => generation switch { diff --git a/PKHeX.Core/PKM/Strings/StringConverter12.cs b/PKHeX.Core/PKM/Strings/StringConverter12.cs index bd3999062..829f05115 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter12.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter12.cs @@ -127,11 +127,11 @@ public static class StringConverter12 /// /// Converts a string to Generation 1 encoded data. /// - /// + /// Span of bytes to write encoded string data /// Decoded string. /// Maximum length of the input /// Data destination is Japanese. - /// + /// Buffer pre-formatting option /// Encoded data. public static int SetString(Span destBuffer, ReadOnlySpan value, int maxLength, bool jp, StringConverterOption option = StringConverterOption.Clear50) diff --git a/PKHeX.Core/PKM/Strings/StringConverter2KOR.cs b/PKHeX.Core/PKM/Strings/StringConverter2KOR.cs index 9b039e1a8..1d1a7b322 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter2KOR.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter2KOR.cs @@ -66,9 +66,9 @@ public static class StringConverter2KOR /// Converts a string to Generation 1 encoded data. /// /// Decoded string. - /// + /// Span of bytes to write encoded string data /// Maximum length of the input - /// + /// Buffer pre-formatting option /// Encoded data. public static int SetString(ReadOnlySpan value, Span destBuffer, int maxLength, StringConverterOption option = StringConverterOption.Clear50) { diff --git a/PKHeX.Core/PKM/Strings/StringConverter3.cs b/PKHeX.Core/PKM/Strings/StringConverter3.cs index 41cc5e83b..bd3270fec 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter3.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter3.cs @@ -38,7 +38,7 @@ public static class StringConverter3 /// Decoded string. /// Maximum length of the input /// String destination is Japanese font. - /// + /// Buffer pre-formatting option /// Encoded data. public static int SetString(Span buffer, ReadOnlySpan value, int maxLength, bool jp, StringConverterOption option = StringConverterOption.ClearFF) diff --git a/PKHeX.Core/PKM/Strings/StringConverter3GC.cs b/PKHeX.Core/PKM/Strings/StringConverter3GC.cs index c5d3b8422..b834537ec 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter3GC.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter3GC.cs @@ -3,6 +3,9 @@ using static System.Buffers.Binary.BinaryPrimitives; namespace PKHeX.Core; +/// +/// Logic for converting a for Generation 3 GameCube games. +/// public static class StringConverter3GC { private const char TerminatorBigEndian = (char)0; // GC @@ -31,7 +34,7 @@ public static class StringConverter3GC } /// Gets the bytes for a Big Endian string. - /// + /// Span of bytes to write encoded string data /// Decoded string. /// Maximum length of the input /// Option to clear the buffer. Only is recognized. diff --git a/PKHeX.Core/PKM/Strings/StringConverter4.cs b/PKHeX.Core/PKM/Strings/StringConverter4.cs index df330ebcb..22f123c0f 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter4.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter4.cs @@ -40,10 +40,10 @@ public static class StringConverter4 } /// Gets the bytes for a 4th Generation String - /// + /// Span of bytes to write encoded string data /// Decoded string. /// Maximum length of the input - /// + /// Buffer pre-formatting option /// Encoded data. public static int SetString(Span destBuffer, ReadOnlySpan value, int maxLength, StringConverterOption option = StringConverterOption.ClearZero) diff --git a/PKHeX.Core/PKM/Strings/StringConverter4GC.cs b/PKHeX.Core/PKM/Strings/StringConverter4GC.cs index af5b20708..db5af440b 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter4GC.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter4GC.cs @@ -4,6 +4,9 @@ using static System.Buffers.Binary.BinaryPrimitives; namespace PKHeX.Core; +/// +/// Logic for converting a for Generation 4 GameCube games. +/// public static class StringConverter4GC { private const ushort Terminator = 0xFFFF; @@ -41,10 +44,10 @@ public static class StringConverter4GC /// /// Converts a string to Generation 4 Big Endian encoded character data. /// - /// + /// Span of bytes to write encoded string data /// String to be converted. /// Maximum length of string - /// + /// Buffer pre-formatting option /// Byte array containing encoded character data public static int SetString(Span destBuffer, ReadOnlySpan value, int maxLength, StringConverterOption option = StringConverterOption.ClearZero) @@ -102,9 +105,9 @@ public static class StringConverter4GC /// /// Used by the Save File's internal strings. /// String to be converted. - /// + /// Span of bytes to write encoded string data /// Maximum length of string - /// + /// Buffer pre-formatting option /// Byte array containing encoded character data public static int SetStringUnicode(ReadOnlySpan value, Span destBuffer, int maxLength, StringConverterOption option = StringConverterOption.ClearZero) { diff --git a/PKHeX.Core/PKM/Strings/StringConverter4Util.cs b/PKHeX.Core/PKM/Strings/StringConverter4Util.cs index b0db0dd80..1ab3e7473 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter4Util.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter4Util.cs @@ -4,6 +4,9 @@ using System.Linq; namespace PKHeX.Core; +/// +/// Utility Logic for converting Generation 4 character encoding. +/// public static class StringConverter4Util { /// diff --git a/PKHeX.Core/PKM/Strings/StringConverter5.cs b/PKHeX.Core/PKM/Strings/StringConverter5.cs index 87684c6d2..c9a10c5c3 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter5.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter5.cs @@ -3,6 +3,9 @@ using static System.Buffers.Binary.BinaryPrimitives; namespace PKHeX.Core; +/// +/// Logic for converting a for Generation 5 games. +/// public static class StringConverter5 { private const char TerminatorFFFF = (char)0xFFFF; @@ -31,10 +34,10 @@ public static class StringConverter5 } /// Gets the bytes for a Generation 5 string. - /// + /// Span of bytes to write encoded string data /// Decoded string. /// Maximum length of the input - /// + /// Buffer pre-formatting option /// Encoded data. public static int SetString(Span destBuffer, ReadOnlySpan value, int maxLength, StringConverterOption option = StringConverterOption.ClearZero) diff --git a/PKHeX.Core/PKM/Strings/StringConverter6.cs b/PKHeX.Core/PKM/Strings/StringConverter6.cs index e7546b326..c42cc00be 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter6.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter6.cs @@ -3,6 +3,10 @@ using static System.Buffers.Binary.BinaryPrimitives; namespace PKHeX.Core; +/// +/// Logic for converting a for Generation 6 games. +/// +/// Customized Unicode glyph remapping for visual display public static class StringConverter6 { private const ushort TerminatorNull = 0; @@ -31,10 +35,10 @@ public static class StringConverter6 } /// Gets the bytes for a Generation 6 string. - /// + /// Span of bytes to write encoded string data /// Decoded string. /// Maximum length of the input - /// + /// Buffer pre-formatting option /// Encoded data. public static int SetString(Span destBuffer, ReadOnlySpan value, int maxLength, StringConverterOption option = StringConverterOption.ClearZero) diff --git a/PKHeX.Core/PKM/Strings/StringConverter7.cs b/PKHeX.Core/PKM/Strings/StringConverter7.cs index 52c5acf8c..233d354bb 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter7.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter7.cs @@ -3,6 +3,10 @@ using static System.Buffers.Binary.BinaryPrimitives; namespace PKHeX.Core; +/// +/// Logic for converting a for Generation 7 games. +/// +/// Customized Unicode glyph remapping for visual display. Chinese Species names use a special range of characters -- . public static class StringConverter7 { private const ushort TerminatorNull = 0; @@ -34,11 +38,11 @@ public static class StringConverter7 } /// Gets the bytes for a Generation 7 string. - /// + /// Span of bytes to write encoded string data /// Decoded string. /// Maximum length of the input /// Language specific conversion (Chinese) - /// + /// Buffer pre-formatting option /// Chinese string remapping should be attempted /// Encoded data. public static int SetString(Span destBuffer, ReadOnlySpan value, int maxLength, int language, diff --git a/PKHeX.Core/PKM/Strings/StringConverter8.cs b/PKHeX.Core/PKM/Strings/StringConverter8.cs index ec628b229..b221d0fdc 100644 --- a/PKHeX.Core/PKM/Strings/StringConverter8.cs +++ b/PKHeX.Core/PKM/Strings/StringConverter8.cs @@ -3,6 +3,10 @@ using static System.Buffers.Binary.BinaryPrimitives; namespace PKHeX.Core; +/// +/// Logic for converting a for Generation 8 games. +/// +/// Also used by LGP/E; this encoding is essentially the same as Generation 6's. public static class StringConverter8 { private const ushort TerminatorNull = 0; @@ -31,10 +35,10 @@ public static class StringConverter8 } /// Gets the bytes for a Generation 7-Beluga string. - /// + /// Span of bytes to write encoded string data /// Decoded string. /// Maximum length of the input - /// + /// Buffer pre-formatting option /// Encoded data. public static int SetString(Span destBuffer, ReadOnlySpan value, int maxLength, StringConverterOption option = StringConverterOption.ClearZero) diff --git a/PKHeX.Core/PKM/Strings/StringConverterOption.cs b/PKHeX.Core/PKM/Strings/StringConverterOption.cs index d91f61e0d..bcaa9c77e 100644 --- a/PKHeX.Core/PKM/Strings/StringConverterOption.cs +++ b/PKHeX.Core/PKM/Strings/StringConverterOption.cs @@ -1,10 +1,22 @@ namespace PKHeX.Core; +/// +/// String Buffer pre-formatting option +/// public enum StringConverterOption { + /// Does not do any operation on the buffer. None, + + /// Zeroes out the entire buffer. ClearZero, + + /// Fills the entire buffer with 0x50; used by Generation 1/2 string encoding. Clear50, + + /// Fills the entire buffer with 0x7F; used by Generation 1/2 Stadium to space over for the next line. Clear7F, + + /// Fills the entire buffer with 0xFF; used by Generation 3-5 which use 0xFF/0xFFFF as their terminator. ClearFF, }