Code cleanup

Added license stuff
This commit is contained in:
Flamefire committed 2013-08-22 00:56:58 +02:00
1 parent cd826bdafd
commit 762d2c80d2
66 files changed
+553 -357

No files matched your search

+21 -2
View File
@@ -1,7 +1,26 @@
namespace VocaluxeLib.Songs
#region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
namespace VocaluxeLib.Songs
{
/// <summary>
/// Base class for all note types
/// Base class for all note types
/// </summary>
public abstract class CBaseNote
{
+20 -1
View File
@@ -1,4 +1,23 @@
using System.Collections.Generic;
#region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
using System.Collections.Generic;
using System.Linq;
namespace VocaluxeLib.Songs
+8 -8
View File
@@ -149,7 +149,7 @@ namespace VocaluxeLib.Songs
public int DataBaseSongID = -1;
public string DateAdded = "";
public int NumPlayed = 0;
public int NumPlayed;
// Notes
public readonly CNotes Notes = new CNotes();
@@ -158,7 +158,7 @@ namespace VocaluxeLib.Songs
{
get
{
List<EGameMode> gms = new List<EGameMode> {IsDuet ? EGameMode.TR_GAMEMODE_DUET : EGameMode.TR_GAMEMODE_NORMAL};
var gms = new List<EGameMode> {IsDuet ? EGameMode.TR_GAMEMODE_DUET : EGameMode.TR_GAMEMODE_NORMAL};
if (Medley.Source != EMedleySource.None)
gms.Add(EGameMode.TR_GAMEMODE_MEDLEY);
gms.Add(EGameMode.TR_GAMEMODE_SHORTSONG);
@@ -172,7 +172,7 @@ namespace VocaluxeLib.Songs
public static CSong LoadSong(string filePath)
{
CSong song = new CSong();
var song = new CSong();
return song.ReadHeader(filePath) ? song : null;
}
@@ -289,7 +289,7 @@ namespace VocaluxeLib.Songs
FileName = Path.GetFileName(filePath);
EHeaderFlags headerFlags = new EHeaderFlags();
var headerFlags = new EHeaderFlags();
StreamReader sr = null;
try
{
@@ -737,7 +737,7 @@ namespace VocaluxeLib.Songs
private bool _ParseNote(int player, ENoteType noteType, int start, int length, int tone, string text)
{
CSongNote note = new CSongNote(start, length, tone, text, noteType);
var note = new CSongNote(start, length, tone, text, noteType);
CVoice voice = Notes.GetVoice(player);
return voice.AddNote(note);
}
@@ -745,7 +745,7 @@ namespace VocaluxeLib.Songs
private void _NewSentence(int player, int start)
{
CVoice voice = Notes.GetVoice(player);
CSongLine line = new CSongLine {StartBeat = start};
var line = new CSongLine {StartBeat = start};
voice.AddLine(line);
}
@@ -821,14 +821,14 @@ namespace VocaluxeLib.Songs
List<string> sentences = voice.Lines.Select(line => line.Points != 0 ? line.Lyrics : String.Empty).ToList();
// find equal sentences series
List<SSeries> series = new List<SSeries>();
var series = new List<SSeries>();
for (int i = 0; i < voice.NumLines - 1; i++)
{
for (int j = i + 1; j < voice.NumLines; j++)
{
if (sentences[i] != sentences[j] || sentences[i] == "")
continue;
SSeries tempSeries = new SSeries {Start = i, End = i};
var tempSeries = new SSeries {Start = i, End = i};
int max;
if (j + j - i > voice.NumLines)
+20 -1
View File
@@ -1,4 +1,23 @@
using System;
#region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
using System;
using System.Linq;
namespace VocaluxeLib.Songs
+21 -2
View File
@@ -1,7 +1,26 @@
namespace VocaluxeLib.Songs
#region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
namespace VocaluxeLib.Songs
{
/// <summary>
/// Class to represent a note in a song
/// Class to represent a note in a song
/// </summary>
public class CSongNote : CBaseNote
{
+20 -1
View File
@@ -1,4 +1,23 @@
using System.Linq;
#region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
using System.Linq;
namespace VocaluxeLib.Songs
{
+23 -4
View File
@@ -1,12 +1,31 @@
namespace VocaluxeLib.Songs
#region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
namespace VocaluxeLib.Songs
{
/// <summary>
/// Note that was sung by a player
/// Note that was sung by a player
/// </summary>
public class CSungNote : CBaseNote
{
/// <summary>
/// Constructor for a sung note that was not hit
/// Constructor for a sung note that was not hit
/// </summary>
/// <param name="startBeat"></param>
/// <param name="duration"></param>
@@ -18,7 +37,7 @@
}
/// <summary>
/// Constructor for a sung note that hit the given note
/// Constructor for a sung note that hit the given note
/// </summary>
/// <param name="startBeat"></param>
/// <param name="duration"></param>
+20 -1
View File
@@ -1,4 +1,23 @@
using System.Collections.Generic;
#region license
// /*
// This file is part of Vocaluxe.
//
// Vocaluxe is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Vocaluxe is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
// */
#endregion
using System.Collections.Generic;
using System.Linq;
namespace VocaluxeLib.Songs