New escape sequence found in files

This commit is contained in:
2021-11-29 12:23:14 +01:00
parent f02b14bceb
commit 4c33901c1f

View File

@@ -1239,6 +1239,7 @@ namespace BMGEditor
public UInt16 binValue3; public UInt16 binValue3;
public UInt16 binValue4; public UInt16 binValue4;
public UInt16 binValue5; public UInt16 binValue5;
public List<Byte> bigBinValue;
} }
public List<Byte> BytesFromEscapeSequence(EscapeSequence escSeq) public List<Byte> BytesFromEscapeSequence(EscapeSequence escSeq)
@@ -1275,6 +1276,9 @@ namespace BMGEditor
byte[] binVal5caseE = BitConverter.GetBytes(escSeq.binValue5); byte[] binVal5caseE = BitConverter.GetBytes(escSeq.binValue5);
foreach (byte by in binVal5caseE) ret.Add(by); foreach (byte by in binVal5caseE) ret.Add(by);
break; break;
case 0x36: //TODO: Implement this
break;
} }
return ret; return ret;
} }
@@ -1413,8 +1417,12 @@ namespace BMGEditor
escSeq.binValue5 = UInt16.Parse(String.Concat(strToWrite[i + 21], strToWrite[i + 22], strToWrite[i + 23], strToWrite[i + 24]), NumberStyles.HexNumber); escSeq.binValue5 = UInt16.Parse(String.Concat(strToWrite[i + 21], strToWrite[i + 22], strToWrite[i + 23], strToWrite[i + 24]), NumberStyles.HexNumber);
break; break;
case 0x36:
//escSeq.bigBinValue =
break;
default: default:
System.Windows.Forms.MessageBox.Show("Error, please report this issue to Bussun#0586 on Discord. What went wrong: Unknown escape sequence"); System.Windows.Forms.MessageBox.Show($"Error, please report this issue to Bussun#0586 on Discord. What went wrong: Unknown escape sequence\nMessage name: {entry.entryName} {entry.entryNo}");
break; break;
} }
@@ -1423,7 +1431,7 @@ namespace BMGEditor
{ {
m_File.Writer.Write(b); m_File.Writer.Write(b);
} }
i += escSeq.length * 2 + 1; i += escSeq.length * 2 - 3;
} }
} }
else else