private void addDialog(int DlgIndex, int DlgEndIndex, string[] Script) { string Dialogue = ""; for (int ind = DlgIndex + 2; ind < DlgEndIndex; ind += 2) { Dialogue += Script[ind] + Script[ind + 1] + "-"; } string breakline = Tools.UnicodeHexToUnicodeString("0A 00"); Dialogue = Tools.UnicodeHexToUnicodeString(Dialogue.Replace("-", "")).Replace(breakline, @"\n").Replace("\r", ""); Dialog[] temp = new Dialog[Dialogues.Length + 1]; Dialogues.CopyTo(temp, 0); Dialog dialog = new Dialog(); dialog.Content = Dialogue; dialog.StartPos = DlgIndex; dialog.EndPos = DlgEndIndex; if (dialog.Content.EndsWith(@"\n")) { dialog.AppendLineBreak = true; dialog.Content = dialog.Content.Substring(0, dialog.Content.Length - 2); } if (dialog.Content.EndsWith(@"\n<CLT>")) { dialog.AppendCLTLineBreak = true; dialog.Content = dialog.Content.Substring(0, dialog.Content.Length - 7) + "<CLT>"; } temp[Dialogues.Length] = dialog; Dialogues = temp; }