protected void ResetAllData(ParseType parseType) { if ((parseType & ParseType.Header) == ParseType.Header) { title = ""; artist = ""; subArtist = ""; comments = ""; genre = ""; playerCount = 1; initialBPM = 130; minBpm = float.PositiveInfinity; playLevel = 0; rank = 0; volume = 1; metaResourceDatas.Clear(); } if ((parseType & ParseType.Resources) == ParseType.Resources) { resourceDatas.Clear(); foreach (var kv in metaResourceDatas) { resourceDatas[kv.Key] = kv.Value; } } if ((parseType & ParseType.Content) == ParseType.Content) { maxCombos = 0; bmsEvents.Clear(); allChannels.Clear(); OnDataRefresh(); layout = BMSKeyLayout.None; } else if ((parseType & ParseType.Content) == ParseType.Content) { maxCombos = 0; allChannels.Clear(); layout = BMSKeyLayout.None; } }
private void ParseLayout() { layout = BMSKeyLayout.None; foreach (int channel in allChannels) { if (channel > 10 && channel < 20) { layout |= (BMSKeyLayout)(1 << (channel - 11)); } else if (channel > 20 && channel < 30) { layout |= (BMSKeyLayout)(1 << (channel - 12)); } else if (channel > 50 && channel < 60) { layout |= (BMSKeyLayout)(1 << (channel - 51)); } else if (channel > 60 && channel < 70) { layout |= (BMSKeyLayout)(1 << (channel - 52)); } } }