mirror of
https://github.com/kwsch/pk3DS.git
synced 2026-10-01 21:36:43 -05:00
Disable empty string => [~#] conversion
PKM Form text file has many empty ("") lines, do not replace by default.
Looks like § ingame.
This commit is contained in:
@@ -16,7 +16,7 @@ public class TextFile
|
||||
private const ushort KEY_TEXTCLEAR = 0xBE01;
|
||||
private const ushort KEY_TEXTWAIT = 0xBE02;
|
||||
private const ushort KEY_TEXTNULL = 0xBDFF;
|
||||
private const bool SETEMPTYTEXT = true;
|
||||
private const bool SETEMPTYTEXT = false;
|
||||
private static readonly byte[] emptyTextFile = { 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00 };
|
||||
|
||||
public TextFile(byte[] data = null)
|
||||
@@ -98,7 +98,7 @@ public string[] Lines
|
||||
int bytesUsed = 0;
|
||||
for (int i = 0; i < lines.Length; i++)
|
||||
{
|
||||
string text = (value[i] ?? "").Trim(); // ReSharper disable once RedundantLogicalConditionalExpressionOperand
|
||||
string text = (value[i] ?? "").Trim();
|
||||
if (text.Length == 0 && SETEMPTYTEXT)
|
||||
text = $"[~ {i}]";
|
||||
byte[] DecryptedLineData = getLineData(text);
|
||||
|
||||
Reference in New Issue
Block a user