Merge remote-tracking branch 'remotes/flokuep/release-0.3' into develop
Conflicts: Vocaluxe/Base/CDataBase.cs
This commit is contained in:
commit
cd826bdafd
20 files changed
+267
-126
No files matched your search
@@ -262,6 +262,7 @@ namespace VocaluxeLib
|
||||
public interface IDataBase
|
||||
{
|
||||
bool GetCover(string fileName, ref CTexture texture, int coverSize);
|
||||
bool GetDataBaseSongInfos(string artist, string title, out int numPlayed, out string dateAdded, out int highscoreID);
|
||||
}
|
||||
|
||||
public interface IControllers
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace VocaluxeLib.PartyModes
|
||||
{
|
||||
public abstract class CPartyMode : IPartyMode
|
||||
{
|
||||
protected string _Folder;
|
||||
private string _Folder;
|
||||
protected SScreenSongOptions _ScreenSongOptions;
|
||||
protected readonly Dictionary<string, CMenuParty> _Screens;
|
||||
|
||||
|
||||
@@ -147,6 +147,10 @@ namespace VocaluxeLib.Songs
|
||||
|
||||
public readonly List<string> Language = new List<string>();
|
||||
|
||||
public int DataBaseSongID = -1;
|
||||
public string DateAdded = "";
|
||||
public int NumPlayed = 0;
|
||||
|
||||
// Notes
|
||||
public readonly CNotes Notes = new CNotes();
|
||||
|
||||
@@ -240,6 +244,10 @@ namespace VocaluxeLib.Songs
|
||||
foreach (string value in song.Language)
|
||||
Language.Add(value);
|
||||
|
||||
DataBaseSongID = song.DataBaseSongID;
|
||||
DateAdded = song.DateAdded;
|
||||
NumPlayed = song.NumPlayed;
|
||||
|
||||
Notes = new CNotes(song.Notes);
|
||||
}
|
||||
|
||||
@@ -353,10 +361,12 @@ namespace VocaluxeLib.Songs
|
||||
if (value != "")
|
||||
ArtistSorting = value;
|
||||
break;
|
||||
case "DUETSINGERP1":
|
||||
case "P1":
|
||||
if (value != "")
|
||||
DuetPart1 = value;
|
||||
break;
|
||||
case "DUETSINGERP2":
|
||||
case "P2":
|
||||
if (value != "")
|
||||
DuetPart2 = value;
|
||||
@@ -528,6 +538,8 @@ namespace VocaluxeLib.Songs
|
||||
sr.Dispose();
|
||||
_CheckFiles();
|
||||
|
||||
CBase.DataBase.GetDataBaseSongInfos(Artist, Title, out NumPlayed, out DateAdded, out DataBaseSongID);
|
||||
|
||||
//Before saving this tags to .txt: Check, if ArtistSorting and Artist are equal, then don't save this tag.
|
||||
if (ArtistSorting == "")
|
||||
ArtistSorting = Artist;
|
||||
|
||||
@@ -12,16 +12,11 @@
|
||||
Text = note.Text;
|
||||
}
|
||||
|
||||
public CSongNote(int startBeat, int duration, int tone, string text) : base(startBeat, duration, tone)
|
||||
{
|
||||
NoteType = ENoteType.Normal;
|
||||
Text = text;
|
||||
}
|
||||
|
||||
public CSongNote(int startBeat, int duration, int tone, string text, ENoteType noteType)
|
||||
: this(startBeat, duration, tone, text)
|
||||
: base(startBeat, duration, tone)
|
||||
{
|
||||
NoteType = noteType;
|
||||
Text = text;
|
||||
}
|
||||
#endregion Constructors
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
{
|
||||
get { return HitNote != null; }
|
||||
}
|
||||
public CSongNote HitNote { get; set; }
|
||||
public CSongNote HitNote { get; private set; }
|
||||
// for drawing perfect note effect
|
||||
public bool Perfect { get; set; }
|
||||
#endregion
|
||||
|
||||
@@ -34,10 +34,7 @@ namespace VocaluxeLib.Songs
|
||||
if (_Lines.Count == 0)
|
||||
return 0;
|
||||
|
||||
int startbeat = _Lines.Max(line => line.FirstNoteBeat);
|
||||
int endbeat = _Lines.Min(line => line.LastNoteBeat);
|
||||
|
||||
int result = endbeat - startbeat;
|
||||
int result = _Lines[_Lines.Count - 1].EndBeat - _Lines[0].StartBeat;
|
||||
return result > 0 ? result : 0;
|
||||
}
|
||||
}
|
||||
@@ -111,7 +108,7 @@ namespace VocaluxeLib.Songs
|
||||
if (lineIndex < 0)
|
||||
{
|
||||
//Note is before ALL lines
|
||||
CSongLine line = new CSongLine {StartBeat = note.StartBeat};
|
||||
var line = new CSongLine {StartBeat = note.StartBeat};
|
||||
line.AddNote(note);
|
||||
_Lines.Insert(0, line);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user