diff --git a/TJAPlayer3/Songs/CDTX.cs b/TJAPlayer3/Songs/CDTX.cs index 9c1fb3b4..a2aaaed9 100644 --- a/TJAPlayer3/Songs/CDTX.cs +++ b/TJAPlayer3/Songs/CDTX.cs @@ -2841,14 +2841,14 @@ namespace TJAPlayer3 { if (nMode == 0) { - if (!string.IsNullOrEmpty(input[n]) && this.CharConvertNote(input[n].Substring(0, 1)) != -1) + if (!string.IsNullOrEmpty(input[n]) && NotesManager.FastFlankedParsing(input[n]))//this.CharConvertNote(input[n].Substring(0, 1)) != -1) { sb.Append(input[n] + "\n"); } } else if (nMode == 1) { - if (!string.IsNullOrEmpty(input[n]) && (input[n].Substring(0, 1) == "#" || this.CharConvertNote(input[n].Substring(0, 1)) != -1)) + if (!string.IsNullOrEmpty(input[n]) && (input[n].Substring(0, 1) == "#" || NotesManager.FastFlankedParsing(input[n])))//this.CharConvertNote(input[n].Substring(0, 1)) != -1)) { if (input[n].StartsWith("BALLOON") || input[n].StartsWith("BPM")) { @@ -2862,7 +2862,7 @@ namespace TJAPlayer3 } else if (nMode == 2) { - if (!string.IsNullOrEmpty(input[n]) && this.CharConvertNote(input[n].Substring(0, 1)) != -1) + if (!string.IsNullOrEmpty(input[n]) && NotesManager.FastFlankedParsing(input[n]))//this.CharConvertNote(input[n].Substring(0, 1)) != -1) { if (input[n].StartsWith("BALLOON") || input[n].StartsWith("BPM")) { @@ -3224,7 +3224,7 @@ namespace TJAPlayer3 this.t1小節の文字数をカウントしてリストに追加する(str + str命令消去譜面[i]); } - if (this.CharConvertNote(str命令消去譜面[i].Substring(0, 1)) != -1) + if (NotesManager.FastFlankedParsing(str命令消去譜面[i]))//this.CharConvertNote(str命令消去譜面[i].Substring(0, 1)) != -1) str += str命令消去譜面[i]; } else diff --git a/TJAPlayer3/Stages/07.Game/Taiko/NotesManager.cs b/TJAPlayer3/Stages/07.Game/Taiko/NotesManager.cs index ee0a9b6c..712dd015 100644 --- a/TJAPlayer3/Stages/07.Game/Taiko/NotesManager.cs +++ b/TJAPlayer3/Stages/07.Game/Taiko/NotesManager.cs @@ -31,13 +31,27 @@ namespace TJAPlayer3 ["B"] = 11, // Joint Big Ka (2P) ["C"] = 12, // Mine (Coming soon) ["D"] = 0, // Unused - //["E"] = 5, // Removed, makes dans crash + ["E"] = 5, // Unused ["F"] = 15, // ADLib ["G"] = 0xF1, // Green (Purple) double hit note (Coming soon) ["H"] = 5, // Konga clap roll (Coming soon) ["I"] = 5, // Konga yellow roll (Coming soon) }; + public static bool FastFlankedParsing(string s) + { + if (s[0] >= '0' && s[0] <= '9') + return true; + + for (int i = 0; i < s.Length; i++) + { + if (GetNoteValueFromChar(s.Substring(i, 1)) == -1) + return false; + } + + return true; + } + public static int GetNoteValueFromChar(string chr) { if (NoteCorrespondanceDictionnary.ContainsKey(chr))