fixed notes count
This commit is contained in:
parent
ff3c80a572
commit
f02044b8ec
14
MainForm.cs
14
MainForm.cs
@ -257,10 +257,10 @@ namespace TaikoSoundEditor
|
|||||||
ns.WordSub = new Word { Key = $"song_sub_{songName}", JapaneseText = tja.Headers.Subtitle };
|
ns.WordSub = new Word { Key = $"song_sub_{songName}", JapaneseText = tja.Headers.Subtitle };
|
||||||
ns.WordDetail = new Word { Key = $"song_detail_{songName}", JapaneseText = tja.Headers.TitleJa };
|
ns.WordDetail = new Word { Key = $"song_detail_{songName}", JapaneseText = tja.Headers.TitleJa };
|
||||||
|
|
||||||
mi.EasyOnpuNum = tja.Courses[0].Converted.Notes.Length;
|
mi.EasyOnpuNum = tja.Courses[0].NotesCount;
|
||||||
mi.NormalOnpuNum = tja.Courses[1].Converted.Notes.Length;
|
mi.NormalOnpuNum = tja.Courses[1].NotesCount;
|
||||||
mi.HardOnpuNum = tja.Courses[2].Converted.Notes.Length;
|
mi.HardOnpuNum = tja.Courses[2].NotesCount;
|
||||||
mi.ManiaOnpuNum = tja.Courses[3].Converted.Notes.Length;
|
mi.ManiaOnpuNum = tja.Courses[3].NotesCount;
|
||||||
|
|
||||||
mi.StarEasy = tja.Courses[0].Headers.Level;
|
mi.StarEasy = tja.Courses[0].Headers.Level;
|
||||||
mi.StarNormal = tja.Courses[1].Headers.Level;
|
mi.StarNormal = tja.Courses[1].Headers.Level;
|
||||||
@ -270,7 +270,7 @@ namespace TaikoSoundEditor
|
|||||||
if (tja.Courses.ContainsKey(4))
|
if (tja.Courses.ContainsKey(4))
|
||||||
{
|
{
|
||||||
FeedbackBox.AppendText("URA course detected\r\n");
|
FeedbackBox.AppendText("URA course detected\r\n");
|
||||||
mi.UraOnpuNum = tja.Courses[4].Converted.Notes.Length;
|
mi.UraOnpuNum = tja.Courses[4].NotesCount;
|
||||||
mi.StarUra = tja.Courses[4].Headers.Level;
|
mi.StarUra = tja.Courses[4].Headers.Level;
|
||||||
ma.CanPlayUra = true;
|
ma.CanPlayUra = true;
|
||||||
|
|
||||||
@ -294,6 +294,8 @@ namespace TaikoSoundEditor
|
|||||||
|
|
||||||
if (ma.CanPlayUra)
|
if (ma.CanPlayUra)
|
||||||
{
|
{
|
||||||
|
mi.ShinutiScoreUra = 1002320;
|
||||||
|
mi.ShinutiScoreUraDuet = 1002320;
|
||||||
mi.ShinutiUra = (mi.ShinutiScoreUra / mi.UraOnpuNum) / 10 * 10;
|
mi.ShinutiUra = (mi.ShinutiScoreUra / mi.UraOnpuNum) / 10 * 10;
|
||||||
mi.ShinutiUraDuet = (mi.ShinutiScoreUraDuet / mi.UraOnpuNum) / 10 * 10;
|
mi.ShinutiUraDuet = (mi.ShinutiScoreUraDuet / mi.UraOnpuNum) / 10 * 10;
|
||||||
}
|
}
|
||||||
@ -350,6 +352,7 @@ namespace TaikoSoundEditor
|
|||||||
{
|
{
|
||||||
var mi = new MusicInfos();
|
var mi = new MusicInfos();
|
||||||
mi.Items.AddRange(MusicInfos.Items);
|
mi.Items.AddRange(MusicInfos.Items);
|
||||||
|
mi.Items.AddRange(AddedMusic.Select(_ => _.MusicInfo));
|
||||||
|
|
||||||
var ma = new MusicAttributes();
|
var ma = new MusicAttributes();
|
||||||
ma.Items.AddRange(MusicAttributes.Items);
|
ma.Items.AddRange(MusicAttributes.Items);
|
||||||
@ -381,6 +384,7 @@ namespace TaikoSoundEditor
|
|||||||
var jwl = Json.Serialize(wl);
|
var jwl = Json.Serialize(wl);
|
||||||
|
|
||||||
jma = jma.Replace("\"new\": true,", "\"new\":true,");
|
jma = jma.Replace("\"new\": true,", "\"new\":true,");
|
||||||
|
jma = jma.Replace("\"new\": false,", "\"new\":false,");
|
||||||
|
|
||||||
File.WriteAllText(Path.Combine(path,"musicinfo"), jmi);
|
File.WriteAllText(Path.Combine(path,"musicinfo"), jmi);
|
||||||
File.WriteAllText(Path.Combine(path,"music_attribute"), jma);
|
File.WriteAllText(Path.Combine(path,"music_attribute"), jma);
|
||||||
|
20
TJA.cs
20
TJA.cs
@ -338,7 +338,19 @@ namespace TaikoSoundEditor
|
|||||||
public override string ToString()
|
public override string ToString()
|
||||||
=> $"C({CourseN},{Headers},{string.Join("|",Measures)})";
|
=> $"C({CourseN},{Headers},{string.Join("|",Measures)})";
|
||||||
|
|
||||||
public ConvertedCourse Converted => ConvertToTimes(this);
|
public ConvertedCourse Converted => ConvertToTimed(this);
|
||||||
|
|
||||||
|
private static readonly List<string> typeNote = new List<string> { "don", "kat", "donBig", "katBig" };
|
||||||
|
|
||||||
|
public int NotesCount
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
Debug.WriteLine(string.Join("", Measures.Select(_ => _.MeasureData)));
|
||||||
|
return string.Join("", Measures.Select(_ => _.MeasureData)).Where(c => "1234".Contains(c)).Count();
|
||||||
|
}
|
||||||
|
//get => Converted.Notes.Where(n => typeNote.Contains(n.Type)).Count();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Measure
|
public class Measure
|
||||||
@ -450,7 +462,8 @@ namespace TaikoSoundEditor
|
|||||||
public override string ToString() => $"{Headers}\n{string.Join("\n", Courses)}";
|
public override string ToString() => $"{Headers}\n{string.Join("\n", Courses)}";
|
||||||
|
|
||||||
|
|
||||||
public static ConvertedCourse ConvertToTimes(Course course)
|
|
||||||
|
public static ConvertedCourse ConvertToTimed(Course course)
|
||||||
{
|
{
|
||||||
List<TimedEvent> events=new List<TimedEvent>();
|
List<TimedEvent> events=new List<TimedEvent>();
|
||||||
List<Note> notes = new List<Note>();
|
List<Note> notes = new List<Note>();
|
||||||
@ -458,6 +471,8 @@ namespace TaikoSoundEditor
|
|||||||
int balloon=0;
|
int balloon=0;
|
||||||
bool imo = false;
|
bool imo = false;
|
||||||
|
|
||||||
|
//Debug.WriteLine("-----------------------------------------");
|
||||||
|
|
||||||
for (int m = 0; m < course.Measures.Count; m++)
|
for (int m = 0; m < course.Measures.Count; m++)
|
||||||
{
|
{
|
||||||
var measure = course.Measures[m];
|
var measure = course.Measures[m];
|
||||||
@ -474,6 +489,7 @@ namespace TaikoSoundEditor
|
|||||||
|
|
||||||
for(int d=0;d<measure.MeasureData.Length;d++)
|
for(int d=0;d<measure.MeasureData.Length;d++)
|
||||||
{
|
{
|
||||||
|
//Debug.WriteLine(measure.MeasureData[d]);
|
||||||
var ch = measure.MeasureData[d];
|
var ch = measure.MeasureData[d];
|
||||||
var nBeat = length / measure.MeasureData.Length * d;
|
var nBeat = length / measure.MeasureData.Length * d;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user