Fix another crash and reintroduce the E slot for notes by changing a command check function
This commit is contained in:
parent
2d07f77005
commit
1fb8b24849
@ -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
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user