Merge branch 'develop' of github.com:Vocaluxe/Vocaluxe into develop
Conflicts: Output/Languages/Swedish.xml
This commit is contained in:
commit
f2b0fb7f6a
47 files changed
+476
-152
No files matched your search
@@ -1,6 +1,6 @@
|
||||
if($Env:APPVEYOR_PULL_REQUEST_NUMBER)
|
||||
{
|
||||
$Env:VersionTag = "PR_$Env:APPVEYOR_PULL_REQUEST_NUMBER"
|
||||
$Env:VersionTag = "0.0.0-na-PR_$Env:APPVEYOR_PULL_REQUEST_NUMBER"
|
||||
Return $Env:VersionTag
|
||||
}
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@ tx.exe
|
||||
*.vshost.*
|
||||
*.userprefs
|
||||
*.user
|
||||
*.VC.db
|
||||
*.VC.opendb
|
||||
/*.vsp
|
||||
/*.ctl
|
||||
/Output/Config.xml
|
||||
@@ -65,3 +67,5 @@ tx.exe
|
||||
/packages
|
||||
/Output/x64
|
||||
/Output/x86
|
||||
/PitchTracker/bin
|
||||
/PitchTracker/obj
|
||||
@@ -73,7 +73,7 @@
|
||||
<string name="TR_CONFIG_TIMERMODE_TOTAL">Totalt</string>
|
||||
<string name="TR_CONFIG_TIMERLOOK_NORMAL">Normal</string>
|
||||
<string name="TR_CONFIG_TIMERLOOK_EXPANDED">Utvidgad</string>
|
||||
<string name="TR_CONFIG_HIGHSCORE_LIST_ALL">Lista Alla</string>
|
||||
<string name="TR_CONFIG_HIGHSCORE_LIST_ALL">Lista alla</string>
|
||||
<string name="TR_CONFIG_HIGHSCORE_LIST_BEST">Lista bästa</string>
|
||||
<string name="TR_CONFIG_OWN_MUSIC">Egen musik och bakgrundsmusik</string>
|
||||
<string name="TR_CONFIG_NO_OWN_MUSIC">Ingen egen musik</string>
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
<ResizeAlign>Center</ResizeAlign>
|
||||
<Style>Bold</Style>
|
||||
<Font>Outline</Font>
|
||||
<Text>1)</Text>
|
||||
<Text />
|
||||
</Text>
|
||||
<Text Name="TextRoundPlayer">
|
||||
<X>0</X>
|
||||
|
||||
+1
-1
@@ -187,7 +187,7 @@
|
||||
<ResizeAlign>Center</ResizeAlign>
|
||||
<Style>Bold</Style>
|
||||
<Font>Outline</Font>
|
||||
<Text>1)</Text>
|
||||
<Text />
|
||||
</Text>
|
||||
<Text Name="TextRoundPlayer">
|
||||
<X>0</X>
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<X>120</X>
|
||||
<Y>160</Y>
|
||||
<Z>0</Z>
|
||||
<H>42</H>
|
||||
<H>35</H>
|
||||
<MaxW>0</MaxW>
|
||||
<Color Name="StaticColor" />
|
||||
<SelColor Name="TextSelColor" />
|
||||
@@ -792,4 +792,4 @@
|
||||
</ParticleEffect>
|
||||
</ParticleEffects>
|
||||
<ScreenSettings />
|
||||
</Screen>
|
||||
</Screen>
|
||||
@@ -2,7 +2,7 @@
|
||||
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Informations>
|
||||
<ScreenName>ScreenOptionsGame</ScreenName>
|
||||
<ScreenVersion>2</ScreenVersion>
|
||||
<ScreenVersion>3</ScreenVersion>
|
||||
</Informations>
|
||||
<Backgrounds>
|
||||
<Background Name="Background1">
|
||||
@@ -191,6 +191,20 @@
|
||||
<Font>Outline</Font>
|
||||
<Text>TR_SCREENOGAME_TIMERMODE</Text>
|
||||
</Text>
|
||||
<Text Name="Text8">
|
||||
<X>75</X>
|
||||
<Y>467</Y>
|
||||
<Z>0</Z>
|
||||
<H>27</H>
|
||||
<MaxW>0</MaxW>
|
||||
<Color Name="StaticColor" />
|
||||
<SelColor Name="TextSelColor" />
|
||||
<Align>Left</Align>
|
||||
<ResizeAlign>Center</ResizeAlign>
|
||||
<Style>Bold</Style>
|
||||
<Font>Outline</Font>
|
||||
<Text>TR_SCREENOGAME_HIGHSCORESTYLE</Text>
|
||||
</Text>
|
||||
</Texts>
|
||||
<Buttons>
|
||||
<Button Name="ButtonExit">
|
||||
@@ -519,6 +533,48 @@
|
||||
<TextStyle>Bold</TextStyle>
|
||||
<NumVisible>3</NumVisible>
|
||||
</SelectSlide>
|
||||
<SelectSlide Name="SelectSlideHighscoreStyle">
|
||||
<Skin/>
|
||||
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
|
||||
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
|
||||
<SkinSelected>SelectSlide</SkinSelected>
|
||||
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
|
||||
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
|
||||
<Rect>
|
||||
<X>500</X>
|
||||
<Y>460</Y>
|
||||
<W>700</W>
|
||||
<H>50</H>
|
||||
<Z>0</Z>
|
||||
</Rect>
|
||||
<RectArrowLeft>
|
||||
<X>505</X>
|
||||
<Y>465</Y>
|
||||
<W>40</W>
|
||||
<H>40</H>
|
||||
<Z>0</Z>
|
||||
</RectArrowLeft>
|
||||
<RectArrowRight>
|
||||
<X>1170</X>
|
||||
<Y>465</Y>
|
||||
<W>40</W>
|
||||
<H>40</H>
|
||||
<Z>0</Z>
|
||||
</RectArrowRight>
|
||||
<Color Name="SelectSlideColor" />
|
||||
<SelColor Name="SelectSlideSelColor" />
|
||||
<ArrowColor Name="ArrowColor" />
|
||||
<ArrowSelColor Name="ArrowSelColor" />
|
||||
<TextColor Name="TextColor" />
|
||||
<TextSelColor Name="TextSelColor" />
|
||||
<TextH>27</TextH>
|
||||
<TextRelativeX>50</TextRelativeX>
|
||||
<TextRelativeY>0</TextRelativeY>
|
||||
<TextMaxW>205.33</TextMaxW>
|
||||
<TextFont>Outline</TextFont>
|
||||
<TextStyle>Bold</TextStyle>
|
||||
<NumVisible>2</NumVisible>
|
||||
</SelectSlide>
|
||||
</SelectSlides>
|
||||
<SingNotes />
|
||||
<NameSelections />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Screen xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<Informations>
|
||||
<ScreenName>ScreenOptionsSound</ScreenName>
|
||||
<ScreenVersion>3</ScreenVersion>
|
||||
<ScreenVersion>4</ScreenVersion>
|
||||
</Informations>
|
||||
<Backgrounds>
|
||||
<Background Name="Background1">
|
||||
@@ -110,6 +110,20 @@
|
||||
<Style>Bold</Style>
|
||||
<Font>Outline</Font>
|
||||
<Text>TR_SCREENOSOUND_GAMEMUSICVOLUME</Text>
|
||||
</Text>
|
||||
<Text Name="Text7">
|
||||
<X>75</X>
|
||||
<Y>407</Y>
|
||||
<Z>0</Z>
|
||||
<H>27</H>
|
||||
<MaxW>0</MaxW>
|
||||
<Color Name="StaticColor" />
|
||||
<SelColor Name="TextSelColor" />
|
||||
<Align>Left</Align>
|
||||
<ResizeAlign>Center</ResizeAlign>
|
||||
<Style>Bold</Style>
|
||||
<Font>Outline</Font>
|
||||
<Text>TR_SCREENOSOUND_KARAOKEEFFECT</Text>
|
||||
</Text>
|
||||
</Texts>
|
||||
<Buttons>
|
||||
@@ -361,6 +375,48 @@
|
||||
<TextFont>Outline</TextFont>
|
||||
<TextStyle>Bold</TextStyle>
|
||||
<NumVisible>3</NumVisible>
|
||||
</SelectSlide>
|
||||
<SelectSlide Name="SelectSlideKaraokeEffect">
|
||||
<Skin/>
|
||||
<SkinArrowLeft>SelectSlideArrowLeft</SkinArrowLeft>
|
||||
<SkinArrowRight>SelectSlideArrowRight</SkinArrowRight>
|
||||
<SkinSelected>SelectSlide</SkinSelected>
|
||||
<SkinArrowLeftSelected>SelectSlideArrowLeft</SkinArrowLeftSelected>
|
||||
<SkinArrowRightSelected>SelectSlideArrowRight</SkinArrowRightSelected>
|
||||
<Rect>
|
||||
<X>500</X>
|
||||
<Y>400</Y>
|
||||
<W>700</W>
|
||||
<H>50</H>
|
||||
<Z>0</Z>
|
||||
</Rect>
|
||||
<RectArrowLeft>
|
||||
<X>505</X>
|
||||
<Y>405</Y>
|
||||
<W>40</W>
|
||||
<H>40</H>
|
||||
<Z>0</Z>
|
||||
</RectArrowLeft>
|
||||
<RectArrowRight>
|
||||
<X>1170</X>
|
||||
<Y>405</Y>
|
||||
<W>40</W>
|
||||
<H>40</H>
|
||||
<Z>0</Z>
|
||||
</RectArrowRight>
|
||||
<Color Name="SelectSlideColor" />
|
||||
<SelColor Name="SelectSlideSelColor" />
|
||||
<ArrowColor Name="ArrowColor" />
|
||||
<ArrowSelColor Name="ArrowSelColor" />
|
||||
<TextColor Name="TextColor" />
|
||||
<TextSelColor Name="TextSelColor" />
|
||||
<TextH>27</TextH>
|
||||
<TextRelativeX>50</TextRelativeX>
|
||||
<TextRelativeY>0</TextRelativeY>
|
||||
<TextMaxW>500</TextMaxW>
|
||||
<TextFont>Outline</TextFont>
|
||||
<TextStyle>Bold</TextStyle>
|
||||
<NumVisible>2</NumVisible>
|
||||
</SelectSlide>
|
||||
</SelectSlides>
|
||||
<SingNotes />
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
ScreenOptionsGame
|
||||
|
||||
++++++++++
|
||||
Version 3:
|
||||
|
||||
Add:
|
||||
<Text8>
|
||||
<SelectSlideHighscoreStyle>
|
||||
++++++++++
|
||||
Version 2:
|
||||
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
ScreenOptionsSound
|
||||
|
||||
++++++++++
|
||||
Version 4:
|
||||
|
||||
Add:
|
||||
|
||||
<SelectSlideKaraokeEffect>
|
||||
|
||||
and text for the description (Text7)
|
||||
"TR_SCREENOSOUND_KARAOKEEFFECT"
|
||||
|
||||
++++++++++
|
||||
Version 3:
|
||||
|
||||
|
||||
@@ -120,6 +120,8 @@ namespace Vocaluxe.Base
|
||||
[DefaultValue(EOffOn.TR_CONFIG_ON)] public EOffOn BackgroundMusicUseStart;
|
||||
[XmlRanged(0, 100), DefaultValue(50)] public int PreviewMusicVolume;
|
||||
[XmlRanged(0, 100), DefaultValue(80)] public int GameMusicVolume;
|
||||
[DefaultValue(EOffOn.TR_CONFIG_OFF)] public EOffOn KaraokeEffect;
|
||||
[XmlRanged(0, 1), DefaultValue(1.0f)] public float KaraokeEffectLevel;
|
||||
// ReSharper restore MemberHidesStaticFromOuterClass
|
||||
}
|
||||
|
||||
@@ -139,6 +141,7 @@ namespace Vocaluxe.Base
|
||||
[DefaultValue(ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM)] public ELyricsPosition LyricsPosition;
|
||||
[DefaultValue(0.1f)] public float MinLineBreakTime; //Minimum time to show the text before it is (to be) sung (if possible)
|
||||
[XmlArrayItem("Player"), XmlArray] public string[] Players;
|
||||
[DefaultValue(EHighscoreStyle.TR_CONFIG_HIGHSCORE_LIST_BEST)] public EHighscoreStyle HighscoreStyle;
|
||||
}
|
||||
|
||||
public struct SConfigVideo
|
||||
@@ -452,6 +455,10 @@ namespace Vocaluxe.Base
|
||||
return "Preview Volume from 0 to 100";
|
||||
case "GameMusicVolume":
|
||||
return "Game Volume from 0 to 100";
|
||||
case "KaraokeEffect":
|
||||
return "Apply a karaoke effect to song playback (EPlaybackLib.GstreamerSharp only)";
|
||||
case "KaraokeEffectLevel":
|
||||
return "The level of the karaoke effect [0-1] (EPlaybackLib.GstreamerSharp only)";
|
||||
case "Language":
|
||||
return "Game-Language";
|
||||
case "SongFolder":
|
||||
|
||||
@@ -85,9 +85,9 @@ namespace Vocaluxe.Base
|
||||
return _HighscoreDB.GetDataBaseSongInfos(artist, title, out numPlayed, out dateAdded, out highscoreID);
|
||||
}
|
||||
|
||||
public static List<SDBScoreEntry> LoadScore(int songID, EGameMode gameMode)
|
||||
public static List<SDBScoreEntry> LoadScore(int songID, EGameMode gameMode, EHighscoreStyle style)
|
||||
{
|
||||
return _HighscoreDB == null ? null : _HighscoreDB.LoadScore(songID, gameMode);
|
||||
return _HighscoreDB == null ? null : _HighscoreDB.LoadScore(songID, gameMode, style);
|
||||
}
|
||||
|
||||
public static int AddScore(SPlayer player)
|
||||
|
||||
@@ -91,6 +91,11 @@ namespace Vocaluxe.Base
|
||||
return CConfig.SongMenu;
|
||||
}
|
||||
|
||||
public EHighscoreStyle GetHighscoreStyle()
|
||||
{
|
||||
return CConfig.Config.Game.HighscoreStyle;
|
||||
}
|
||||
|
||||
public EOffOn GetVideosToBackground()
|
||||
{
|
||||
return CConfig.Config.Video.VideosToBackground;
|
||||
|
||||
@@ -283,7 +283,7 @@ namespace Vocaluxe.Base
|
||||
compilerParams.ReferencedAssemblies.Add("System.Windows.Forms.dll");
|
||||
compilerParams.ReferencedAssemblies.Add("System.dll");
|
||||
compilerParams.ReferencedAssemblies.Add("System.Core.dll");
|
||||
compilerParams.ReferencedAssemblies.Add("libs\\managed\\VocaluxeLib.dll");
|
||||
compilerParams.ReferencedAssemblies.Add(Path.Combine("libs","managed","VocaluxeLib.dll"));
|
||||
compilerParams.GenerateInMemory = true;
|
||||
#if DEBUG
|
||||
compilerParams.IncludeDebugInformation = true;
|
||||
|
||||
@@ -42,6 +42,11 @@ namespace Vocaluxe.Base
|
||||
get { return _Playlists.Select(t => t.Name).ToList(); }
|
||||
}
|
||||
|
||||
public static List<int> Ids
|
||||
{
|
||||
get { return _Playlists.Select(t => t.Id).ToList(); }
|
||||
}
|
||||
|
||||
public static int NumPlaylists
|
||||
{
|
||||
get { return _Playlists.Count; }
|
||||
|
||||
+44
-15
@@ -18,6 +18,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Windows.Forms;
|
||||
using VocaluxeLib;
|
||||
@@ -53,10 +54,44 @@ namespace Vocaluxe.Base
|
||||
public static EProgramState ProgramState = EProgramState.Start;
|
||||
|
||||
//Adjusting of programName and version now in the assembly config.
|
||||
//I'd use the major and minor for Main releases, build number for every public release and revision for every bugfix version without any features
|
||||
private const string _ProgramCodeName = "Shining Heaven";
|
||||
private static readonly Dictionary<string,string> _CodeNames = new Dictionary<string, string>()
|
||||
{
|
||||
{"0.3.", "Shining Heaven"},
|
||||
{"0.4.", "Blue Sunrise"}
|
||||
};
|
||||
|
||||
public const ERevision VersionRevision = ERevision.Beta;
|
||||
private static string _ProgramCodeName
|
||||
{
|
||||
get
|
||||
{
|
||||
var versionParts = Application.ProductVersion.Split('.');
|
||||
string name;
|
||||
_CodeNames.TryGetValue($"{versionParts[0]}.{versionParts[1]}.", out name);
|
||||
if (name != null)
|
||||
return name;
|
||||
return "Unnamed Version";
|
||||
}
|
||||
}
|
||||
|
||||
public static ERevision VersionRevision
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_Version.ToLower().Contains("alpha"))
|
||||
{
|
||||
return ERevision.Alpha;
|
||||
}
|
||||
if (_Version.ToLower().Contains("beta"))
|
||||
{
|
||||
return ERevision.Beta;
|
||||
}
|
||||
if (_Version.ToLower().Contains("rc"))
|
||||
{
|
||||
return ERevision.RC;
|
||||
}
|
||||
return ERevision.Release;
|
||||
}
|
||||
}
|
||||
|
||||
public const int DatabaseHighscoreVersion = 3;
|
||||
public const int DatabaseCoverVersion = 1;
|
||||
@@ -177,8 +212,7 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
get
|
||||
{
|
||||
Version v = _Assembly.Version;
|
||||
return "v" + v.Major + "." + v.Minor + "." + v.Build;
|
||||
return Application.ProductVersion.Split('-').First();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -186,11 +220,10 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
string version = _Version + " (" + _Arch + ")";
|
||||
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalse
|
||||
if (VersionRevision != ERevision.Release)
|
||||
string gitversion = Application.ProductVersion;
|
||||
|
||||
if (VersionRevision != ERevision.Release || gitversion.Split('-')[1] != "0")
|
||||
{
|
||||
// ReSharper restore ConditionIsAlwaysTrueOrFalse
|
||||
string gitversion = Application.ProductVersion;
|
||||
version += " " + _GetVersionStatus() + String.Format(" ({0})", gitversion);
|
||||
}
|
||||
|
||||
@@ -200,10 +233,8 @@ namespace Vocaluxe.Base
|
||||
public static string GetFullVersionText()
|
||||
{
|
||||
string version = ProgramName;
|
||||
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalse
|
||||
|
||||
if (_ProgramCodeName != "")
|
||||
// ReSharper restore ConditionIsAlwaysTrueOrFalse
|
||||
version += " \"" + _ProgramCodeName + "\"";
|
||||
|
||||
return version + " " + _GetVersionText();
|
||||
@@ -211,11 +242,9 @@ namespace Vocaluxe.Base
|
||||
|
||||
private static string _GetVersionStatus()
|
||||
{
|
||||
string result;
|
||||
string result = "";
|
||||
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalse
|
||||
if (VersionRevision != ERevision.Release)
|
||||
// ReSharper restore ConditionIsAlwaysTrueOrFalse
|
||||
result = Enum.GetName(typeof(ERevision), VersionRevision);
|
||||
|
||||
return result;
|
||||
|
||||
@@ -22,6 +22,7 @@ using Vocaluxe.Lib.Sound.Playback.OpenAL;
|
||||
using Vocaluxe.Lib.Sound.Playback.PortAudio;
|
||||
using VocaluxeLib;
|
||||
using System.Threading;
|
||||
using Vocaluxe.Lib.Sound;
|
||||
|
||||
namespace Vocaluxe.Base
|
||||
{
|
||||
@@ -88,9 +89,9 @@ namespace Vocaluxe.Base
|
||||
}
|
||||
|
||||
#region Stream Handling
|
||||
public static int Load(string media, bool loop = false, bool prescan = false)
|
||||
public static int Load(string media, bool loop = false, bool prescan = false, EAudioEffect effekt = EAudioEffect.None)
|
||||
{
|
||||
return _Playback.Load(media, loop, prescan);
|
||||
return _Playback.Load(media, loop, prescan, effekt);
|
||||
}
|
||||
|
||||
public static void Close(int stream)
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace Vocaluxe.Lib.Database
|
||||
return lastInsertID;
|
||||
}
|
||||
|
||||
public List<SDBScoreEntry> LoadScore(int songID, EGameMode gameMode)
|
||||
public List<SDBScoreEntry> LoadScore(int songID, EGameMode gameMode, EHighscoreStyle style)
|
||||
{
|
||||
var scores = new List<SDBScoreEntry>();
|
||||
using (var connection = new SQLiteConnection())
|
||||
@@ -304,9 +304,37 @@ namespace Vocaluxe.Lib.Database
|
||||
if (dataBaseSongID < 0)
|
||||
return scores;
|
||||
|
||||
command.CommandText = "SELECT PlayerName, Score, Date, Difficulty, LineNr, id FROM Scores " +
|
||||
"WHERE [SongID] = @SongID AND [Medley] = @Medley AND [Duet] = @Duet AND [ShortSong] = @ShortSong " +
|
||||
"ORDER BY [Score] DESC";
|
||||
switch (style)
|
||||
{
|
||||
case EHighscoreStyle.TR_CONFIG_HIGHSCORE_LIST_BEST:
|
||||
command.CommandText = "SELECT os.PlayerName, os.Score, os.Date, os.Difficulty, os.LineNr, os.id " +
|
||||
"FROM Scores os " +
|
||||
"INNER JOIN ( " +
|
||||
"SELECT sc.PlayerName, sc.Score, sc.Difficulty, sc.LineNr, MIN(sc.Date) AS Date " +
|
||||
"FROM Scores sc " +
|
||||
"INNER JOIN ( " +
|
||||
"SELECT Playername, MAX(Score) AS Score, Difficulty, LineNr " +
|
||||
"FROM Scores " +
|
||||
"WHERE [SongID] = @SongID AND [Medley] = @Medley AND [Duet] = @Duet AND [ShortSong] = @ShortSong " +
|
||||
"GROUP BY PlayerName, Difficulty, LineNr " +
|
||||
") AS mc " +
|
||||
"ON sc.PlayerName = mc.PlayerName AND sc.Difficulty = mc.Difficulty AND sc.LineNr = mc.LineNr AND sc.Score = mc.Score " +
|
||||
"WHERE [SongID] = @SongID AND [Medley] = @Medley AND [Duet] = @Duet AND [ShortSong] = @ShortSong " +
|
||||
"GROUP BY sc.PlayerName, sc.Difficulty, sc.LineNr, sc.Score " +
|
||||
") AS iq " +
|
||||
"ON os.PlayerName = iq.PlayerName AND os.Difficulty = iq.Difficulty AND os.LineNr = iq.LineNr AND os.Score = iq.Score AND os.Date = iq.Date " +
|
||||
"WHERE [SongID] = @SongID AND [Medley] = @Medley AND [Duet] = @Duet AND [ShortSong] = @ShortSong " +
|
||||
"GROUP BY os.PlayerName, os.Difficulty, os.LineNr, os.Score " +
|
||||
"ORDER BY os.Score DESC, os.Date ASC";
|
||||
break;
|
||||
case EHighscoreStyle.TR_CONFIG_HIGHSCORE_LIST_ALL:
|
||||
command.CommandText = "SELECT PlayerName, Score, Date, Difficulty, LineNr, id " +
|
||||
"FROM Scores " +
|
||||
"WHERE [SongID] = @SongID AND [Medley] = @Medley AND [Duet] = @Duet AND [ShortSong] = @ShortSong " +
|
||||
"ORDER BY [Score] DESC, [Date] ASC";
|
||||
break;
|
||||
}
|
||||
|
||||
command.Parameters.Add("@SongID", DbType.Int32, 0).Value = dataBaseSongID;
|
||||
command.Parameters.Add("@Medley", DbType.Int32, 0).Value = medley;
|
||||
command.Parameters.Add("@Duet", DbType.Int32, 0).Value = duet;
|
||||
@@ -475,7 +503,7 @@ namespace Vocaluxe.Lib.Database
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
command.CommandText = "CREATE TABLE IF NOT EXISTS Songs ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " +
|
||||
"Artist TEXT NOT NULL, Title TEXT NOT NULL, NumPlayed INTEGER, DateAdded BIGING);";
|
||||
"Artist TEXT NOT NULL, Title TEXT NOT NULL, NumPlayed INTEGER, DateAdded BIGINT);";
|
||||
command.ExecuteNonQuery();
|
||||
|
||||
command.CommandText = "CREATE TABLE IF NOT EXISTS Scores ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " +
|
||||
|
||||
@@ -161,7 +161,7 @@ namespace Vocaluxe.Lib.Input
|
||||
key = Keys.Space;
|
||||
else if (buttonStates.Buttons.A == OpenTK.Input.ButtonState.Pressed && _OldButtonStates.Buttons.A == OpenTK.Input.ButtonState.Released)
|
||||
key = Keys.Enter;
|
||||
else if (buttonStates.Buttons.X == OpenTK.Input.ButtonState.Pressed && _OldButtonStates.Buttons.X == OpenTK.Input.ButtonState.Released)
|
||||
else if (buttonStates.Buttons.B == OpenTK.Input.ButtonState.Pressed && _OldButtonStates.Buttons.B == OpenTK.Input.ButtonState.Released)
|
||||
key = Keys.Escape;
|
||||
else if (buttonStates.Buttons.Back == OpenTK.Input.ButtonState.Pressed && _OldButtonStates.Buttons.Back == OpenTK.Input.ButtonState.Released)
|
||||
key = Keys.Back;
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Vocaluxe.Lib.Sound
|
||||
{
|
||||
[Flags]
|
||||
public enum EAudioEffect
|
||||
{
|
||||
None = 0,
|
||||
Karaoke = 1
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ namespace Vocaluxe.Lib.Sound.Playback
|
||||
private readonly int _ID;
|
||||
protected readonly string _Medium;
|
||||
protected readonly bool _Loop;
|
||||
protected readonly EAudioEffect _Effect;
|
||||
|
||||
protected ICloseStreamListener _CloseStreamListener;
|
||||
|
||||
@@ -48,11 +49,12 @@ namespace Vocaluxe.Lib.Sound.Playback
|
||||
public abstract bool IsPaused { get; set; }
|
||||
public abstract bool IsFinished { get; }
|
||||
|
||||
protected CAudioStreamBase(int id, string medium, bool loop)
|
||||
protected CAudioStreamBase(int id, string medium, bool loop, EAudioEffect effect = EAudioEffect.None)
|
||||
{
|
||||
_ID = id;
|
||||
_Medium = medium;
|
||||
_Loop = loop;
|
||||
_Effect = effect;
|
||||
}
|
||||
|
||||
~CAudioStreamBase()
|
||||
|
||||
@@ -113,13 +113,13 @@ namespace Vocaluxe.Lib.Sound.Playback
|
||||
|
||||
#region Stream Handling
|
||||
//Factory method to get a stream instance
|
||||
protected abstract IAudioStream _CreateStream(int id, string media, bool loop);
|
||||
protected abstract IAudioStream _CreateStream(int id, string media, bool loop, EAudioEffect effect = EAudioEffect.None);
|
||||
|
||||
public int Load(string medium, bool loop = false, bool prescan = false)
|
||||
public int Load(string medium, bool loop = false, bool prescan = false, EAudioEffect effect = EAudioEffect.None)
|
||||
{
|
||||
if (!_Initialized)
|
||||
return -1;
|
||||
IAudioStream stream = _CreateStream(_NextID++, medium, loop);
|
||||
IAudioStream stream = _CreateStream(_NextID++, medium, loop, effect);
|
||||
|
||||
if (stream.Open(prescan))
|
||||
{
|
||||
|
||||
@@ -35,26 +35,29 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
|
||||
#if ARCH_X64
|
||||
const string varName = "GSTREAMER_1_0_ROOT_X86_64";
|
||||
#endif
|
||||
string gstreamerEnvVar = Environment.GetEnvironmentVariable(varName, EnvironmentVariableTarget.User);
|
||||
string dllDirectory;
|
||||
if (gstreamerEnvVar == null || !Directory.Exists(gstreamerEnvVar))
|
||||
{
|
||||
|
||||
#if ARCH_X86
|
||||
dllDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "libs\\unmanaged\\gstreamer86\\bin\\");
|
||||
dllDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "libs\\unmanaged\\gstreamer86\\bin\\");
|
||||
#endif
|
||||
#if ARCH_X64
|
||||
dllDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "libs\\unmanaged\\gstreamer64\\bin\\");
|
||||
dllDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "libs\\unmanaged\\gstreamer64\\bin\\");
|
||||
#endif
|
||||
if (!Directory.Exists(dllDirectory))
|
||||
if (!Directory.Exists(dllDirectory))
|
||||
{
|
||||
string gstreamerEnvVar = Environment.GetEnvironmentVariable(varName, EnvironmentVariableTarget.User);
|
||||
|
||||
if (gstreamerEnvVar == null || !Directory.Exists(gstreamerEnvVar))
|
||||
{
|
||||
CLog.LogError("Gstreamer not found! Make sure you installed it correctly and if it set the environment variable '" + varName + "'!", true);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
dllDirectory = gstreamerEnvVar + "bin\\";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dllDirectory = gstreamerEnvVar + "bin\\";
|
||||
}
|
||||
|
||||
|
||||
COSFunctions.AddEnvironmentPath(dllDirectory);
|
||||
#endif
|
||||
@@ -72,9 +75,9 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
|
||||
Application.Deinit();
|
||||
}
|
||||
|
||||
protected override IAudioStream _CreateStream(int id, string media, bool loop)
|
||||
protected override IAudioStream _CreateStream(int id, string media, bool loop, EAudioEffect effect = EAudioEffect.None)
|
||||
{
|
||||
return new CGstreamerSharpAudioStream(id, media, loop);
|
||||
return new CGstreamerSharpAudioStream(id, media, loop, effect);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,7 @@ using System;
|
||||
using GLib;
|
||||
using Gst;
|
||||
using Vocaluxe.Base;
|
||||
using VocaluxeLib;
|
||||
|
||||
namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
|
||||
{
|
||||
@@ -101,7 +102,7 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
|
||||
}
|
||||
}
|
||||
|
||||
public CGstreamerSharpAudioStream(int id, string medium, bool loop) : base(id, medium, loop) {}
|
||||
public CGstreamerSharpAudioStream(int id, string medium, bool loop, EAudioEffect effect = EAudioEffect.None) : base(id, medium, loop, effect) {}
|
||||
|
||||
public override bool Open(bool prescan)
|
||||
{
|
||||
@@ -123,9 +124,29 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
|
||||
}
|
||||
|
||||
var audioSinkBin = new Bin("Audiosink");
|
||||
audioSinkBin.Add(convert);
|
||||
audioSinkBin.Add(audiosink);
|
||||
convert.Link(audiosink);
|
||||
Element audiokaraoke = null;
|
||||
if (_Effect.HasFlag(EAudioEffect.Karaoke))
|
||||
{
|
||||
audiokaraoke = ElementFactory.Make("audiokaraoke", "karaoke");
|
||||
audioSinkBin.Add(audiokaraoke);
|
||||
audioSinkBin.Add(convert);
|
||||
audioSinkBin.Add(audiosink);
|
||||
|
||||
audiokaraoke.Link(audiosink);
|
||||
audiokaraoke["level"] = CConfig.Config.Sound.KaraokeEffectLevel;
|
||||
audiokaraoke["mono-level"] = CConfig.Config.Sound.KaraokeEffectLevel;
|
||||
|
||||
convert.Link(audiokaraoke);
|
||||
}
|
||||
else
|
||||
{
|
||||
audioSinkBin.Add(convert);
|
||||
audioSinkBin.Add(audiosink);
|
||||
convert.Link(audiosink);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Pad pad = convert.GetStaticPad("sink");
|
||||
GhostPad ghostpad = new GhostPad("sink", pad);
|
||||
|
||||
@@ -135,6 +156,10 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
|
||||
convert.Dispose();
|
||||
audiosink.Dispose();
|
||||
audioSinkBin.Dispose();
|
||||
if (audiokaraoke != null)
|
||||
{
|
||||
audiokaraoke.Dispose();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -145,6 +170,10 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
|
||||
audiosink.Dispose();
|
||||
audioSinkBin.Dispose();
|
||||
ghostpad.Dispose();
|
||||
if (audiokaraoke != null)
|
||||
{
|
||||
audiokaraoke.Dispose();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!audioSinkBin.AddPad(ghostpad))
|
||||
@@ -154,6 +183,10 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
|
||||
audiosink.Dispose();
|
||||
audioSinkBin.Dispose();
|
||||
ghostpad.Dispose();
|
||||
if (audiokaraoke != null)
|
||||
{
|
||||
audiokaraoke.Dispose();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -165,6 +198,10 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
|
||||
audiosink.Dispose();
|
||||
audioSinkBin.Dispose();
|
||||
ghostpad.Dispose();
|
||||
if (audiokaraoke != null)
|
||||
{
|
||||
audiokaraoke.Dispose();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
_Element["audio-sink"] = audioSinkBin;
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Vocaluxe.Lib.Sound.Playback
|
||||
void CloseAll();
|
||||
|
||||
#region stream Handling
|
||||
int Load(string medium, bool loop = false, bool prescan = false);
|
||||
int Load(string medium, bool loop = false, bool prescan = false, EAudioEffect effekt= EAudioEffect.None);
|
||||
void Close(int streamID);
|
||||
|
||||
void Play(int streamID);
|
||||
|
||||
@@ -44,9 +44,9 @@ namespace Vocaluxe.Lib.Sound.Playback.OpenAL
|
||||
_Context = null;
|
||||
}
|
||||
|
||||
protected override IAudioStream _CreateStream(int id, string media, bool loop)
|
||||
protected override IAudioStream _CreateStream(int id, string media, bool loop, EAudioEffect effect = EAudioEffect.None)
|
||||
{
|
||||
return new COpenAlStream(id, media, loop);
|
||||
return new COpenAlStream(id, media, loop, effect);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -122,7 +122,7 @@ namespace Vocaluxe.Lib.Sound.Playback.OpenAL
|
||||
}
|
||||
}
|
||||
|
||||
public COpenAlStream(int id, string medium, bool loop) : base(id, medium, loop) {}
|
||||
public COpenAlStream(int id, string medium, bool loop, EAudioEffect effect = EAudioEffect.None) : base(id, medium, loop, effect) {}
|
||||
|
||||
protected override void _Dispose(bool disposing)
|
||||
{
|
||||
|
||||
@@ -29,9 +29,9 @@ namespace Vocaluxe.Lib.Sound.Playback.PortAudio
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override IAudioStream _CreateStream(int id, string media, bool loop)
|
||||
protected override IAudioStream _CreateStream(int id, string media, bool loop, EAudioEffect effect = EAudioEffect.None)
|
||||
{
|
||||
return new CPortAudioStream(id, media, loop);
|
||||
return new CPortAudioStream(id, media, loop, effect);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -131,7 +131,7 @@ namespace Vocaluxe.Lib.Sound.Playback.PortAudio
|
||||
}
|
||||
}
|
||||
|
||||
public CPortAudioStream(int id, string medium, bool loop) : base(id, medium, loop) {}
|
||||
public CPortAudioStream(int id, string medium, bool loop, EAudioEffect effect = EAudioEffect.None) : base(id, medium, loop, effect) {}
|
||||
|
||||
public override bool Open(bool prescan)
|
||||
{
|
||||
|
||||
@@ -2,4 +2,6 @@
|
||||
PROJECT=$1
|
||||
cd $PROJECT
|
||||
sed -i -r -e 's/AssemblyInformationalVersion\(".*?"\)/AssemblyInformationalVersion("GITVERSION")/' $PROJECT/Properties/AssemblyInfo.cs
|
||||
sed -i -r -e 's/AssemblyVersion\(".*?"\)/AssemblyVersion("SHORTVERSION")/' $PROJECT/Properties/AssemblyInfo.cs
|
||||
sed -i -r -e 's/AssemblyFileVersion\(".*?"\)/AssemblyFileVersion("SHORTVERSION")/' $PROJECT/Properties/AssemblyInfo.cs
|
||||
sed -i -e 's/var matchingServerVersion = "";/var matchingServerVersion = "'$(git describe --long)'";/' $PROJECT/../Output/Website/js/main.js
|
||||
@@ -2,3 +2,5 @@
|
||||
PROJECT=$1
|
||||
cd $PROJECT
|
||||
sed -i -e s/GITVERSION/$(git describe --long)/ $PROJECT/Properties/AssemblyInfo.cs
|
||||
shortv=$(git describe --abbrev=0 | sed -e 's/alpha/0/' -e 's/beta/1/' -e 's/rc/2/')
|
||||
sed -i -e s/SHORTVERSION/${shortv}/ $PROJECT/Properties/AssemblyInfo.cs
|
||||
@@ -27,7 +27,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Vocaluxe")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2013")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2016")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -49,6 +49,6 @@ using System.Runtime.InteropServices;
|
||||
// Revision
|
||||
//
|
||||
|
||||
[assembly: AssemblyVersion("0.3.0.83")]
|
||||
[assembly: AssemblyFileVersion("0.3.0.83")]
|
||||
[assembly: AssemblyVersion("SHORTVERSION")]
|
||||
[assembly: AssemblyFileVersion("SHORTVERSION")]
|
||||
[assembly: AssemblyInformationalVersion("GITVERSION")]
|
||||
@@ -177,7 +177,7 @@ namespace Vocaluxe.Screens
|
||||
name += " (P" + (_Scores[_Round][_Pos + p].VoiceNr + 1) + ")";
|
||||
_Texts[_TextName[p]].Text = name;
|
||||
|
||||
_Texts[_TextScore[p]].Text = _Scores[_Round][_Pos + p].Score.ToString("00000");
|
||||
_Texts[_TextScore[p]].Text = _Scores[_Round][_Pos + p].Score.ToString("D");
|
||||
_Texts[_TextDate[p]].Text = _Scores[_Round][_Pos + p].Date;
|
||||
|
||||
_ParticleEffects[_ParticleEffectNew[p]].Visible = _IsNewEntry(_Scores[_Round][_Pos + p].ID);
|
||||
@@ -239,7 +239,8 @@ namespace Vocaluxe.Screens
|
||||
{
|
||||
int songID = CGame.GetSong(round).ID;
|
||||
EGameMode gameMode = CGame.GetGameMode(round);
|
||||
_Scores[round] = CDataBase.LoadScore(songID, gameMode);
|
||||
EHighscoreStyle style = CBase.Config.GetHighscoreStyle();
|
||||
_Scores[round] = CDataBase.LoadScore(songID, gameMode, style);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,9 +54,7 @@ namespace Vocaluxe.Screens
|
||||
base.LoadTheme(xmlPath);
|
||||
|
||||
_Texts[_TextRelease].Text = CSettings.GetFullVersionText();
|
||||
// ReSharper disable ConditionIsAlwaysTrueOrFalse
|
||||
_Texts[_TextRelease].Visible = CSettings.VersionRevision != ERevision.Release;
|
||||
// ReSharper restore ConditionIsAlwaysTrueOrFalse
|
||||
_Texts[_TextRelease].Visible = true;
|
||||
_Statics[_StaticWarningProfiles].Visible = false;
|
||||
_Texts[_TextWarningProfiles].Visible = false;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Vocaluxe.Screens
|
||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||
protected override int _ScreenVersion
|
||||
{
|
||||
get { return 2; }
|
||||
get { return 3; }
|
||||
}
|
||||
|
||||
private const string _SelectSlideLanguage = "SelectSlideLanguage";
|
||||
@@ -36,6 +36,7 @@ namespace Vocaluxe.Screens
|
||||
private const string _SelectSlideSongSorting = "SelectSlideSongSorting";
|
||||
private const string _SelectSlideTabs = "SelectSlideTabs";
|
||||
private const string _SelectSlideTimerMode = "SelectSlideTimerMode";
|
||||
private const string _SelectSlideHighscoreStyle = "SelectSlideHighscoreStyle";
|
||||
|
||||
private const string _ButtonExit = "ButtonExit";
|
||||
private const string _ButtonServer = "ButtonServer";
|
||||
@@ -45,7 +46,7 @@ namespace Vocaluxe.Screens
|
||||
base.Init();
|
||||
|
||||
_ThemeButtons = new string[] {_ButtonExit, _ButtonServer};
|
||||
_ThemeSelectSlides = new string[] {_SelectSlideLanguage, _SelectSlideDebugLevel, _SelectSlideSongMenu, _SelectSlideSongSorting, _SelectSlideTabs, _SelectSlideTimerMode};
|
||||
_ThemeSelectSlides = new string[] {_SelectSlideLanguage, _SelectSlideDebugLevel, _SelectSlideSongMenu, _SelectSlideSongSorting, _SelectSlideTabs, _SelectSlideTimerMode, _SelectSlideHighscoreStyle};
|
||||
}
|
||||
|
||||
public override void LoadTheme(string xmlPath)
|
||||
@@ -60,6 +61,7 @@ namespace Vocaluxe.Screens
|
||||
_SelectSlides[_SelectSlideSongSorting].SetValues<ESongSorting>((int)CConfig.Config.Game.SongSorting);
|
||||
_SelectSlides[_SelectSlideTabs].SetValues<EOffOn>((int)CConfig.Config.Game.Tabs);
|
||||
_SelectSlides[_SelectSlideTimerMode].SetValues<ETimerMode>((int)CConfig.Config.Game.TimerMode);
|
||||
_SelectSlides[_SelectSlideHighscoreStyle].SetValues<EHighscoreStyle>((int)CConfig.Config.Game.HighscoreStyle);
|
||||
}
|
||||
|
||||
public override bool HandleInput(SKeyEvent keyEvent)
|
||||
@@ -140,6 +142,7 @@ namespace Vocaluxe.Screens
|
||||
CConfig.Config.Game.SongSorting = (ESongSorting)_SelectSlides[_SelectSlideSongSorting].Selection;
|
||||
CConfig.Config.Game.Tabs = (EOffOn)_SelectSlides[_SelectSlideTabs].Selection;
|
||||
CConfig.Config.Game.TimerMode = (ETimerMode)_SelectSlides[_SelectSlideTimerMode].Selection;
|
||||
CConfig.Config.Game.HighscoreStyle = (EHighscoreStyle)_SelectSlides[_SelectSlideHighscoreStyle].Selection;
|
||||
|
||||
CConfig.SaveConfig();
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Vocaluxe.Screens
|
||||
// Version number for theme files. Increment it, if you've changed something on the theme files!
|
||||
protected override int _ScreenVersion
|
||||
{
|
||||
get { return 3; }
|
||||
get { return 4; }
|
||||
}
|
||||
|
||||
private const string _SelectSlideBackgroundMusic = "SelectSlideBackgroundMusic";
|
||||
@@ -35,6 +35,7 @@ namespace Vocaluxe.Screens
|
||||
private const string _SelectSlideBackgroundMusicSource = "SelectSlideBackgroundMusicSource";
|
||||
private const string _SelectSlidePreviewMusicVolume = "SelectSlidePreviewMusicVolume";
|
||||
private const string _SelectSlideGameMusicVolume = "SelectSlideGameMusicVolume";
|
||||
private const string _SelectSlideKaraokeEffect = "SelectSlideKaraokeEffect";
|
||||
|
||||
private const string _ButtonExit = "ButtonExit";
|
||||
|
||||
@@ -46,7 +47,7 @@ namespace Vocaluxe.Screens
|
||||
|
||||
_ThemeButtons = new string[] {_ButtonExit};
|
||||
_ThemeSelectSlides = new string[]
|
||||
{_SelectSlideBackgroundMusic, _SelectSlideBackgroundMusicVolume, _SelectSlideBackgroundMusicSource, _SelectSlidePreviewMusicVolume, _SelectSlideGameMusicVolume};
|
||||
{_SelectSlideBackgroundMusic, _SelectSlideBackgroundMusicVolume, _SelectSlideBackgroundMusicSource, _SelectSlidePreviewMusicVolume, _SelectSlideGameMusicVolume, _SelectSlideKaraokeEffect};
|
||||
}
|
||||
|
||||
public override void LoadTheme(string xmlPath)
|
||||
@@ -64,6 +65,11 @@ namespace Vocaluxe.Screens
|
||||
_SelectSlides[_SelectSlideGameMusicVolume].AddValues(new string[]
|
||||
{"0", "5", "10", "15", "20", "25", "30", "35", "40", "45", "50", "55", "60", "65", "70", "75", "80", "85", "90", "95", "100"});
|
||||
_SelectSlides[_SelectSlideGameMusicVolume].Selection = CConfig.GameMusicVolume / 5;
|
||||
if (CConfig.Config.Sound.PlayBackLib == EPlaybackLib.GstreamerSharp)
|
||||
{
|
||||
_SelectSlides[_SelectSlideKaraokeEffect].SetValues<EOffOn>((int)CConfig.Config.Sound.KaraokeEffect);
|
||||
_SelectSlides[_SelectSlideBackgroundMusicSource].Selection = (int)CConfig.Config.Sound.KaraokeEffect;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool HandleInput(SKeyEvent keyEvent)
|
||||
@@ -147,6 +153,10 @@ namespace Vocaluxe.Screens
|
||||
CConfig.Config.Sound.BackgroundMusic = (EBackgroundMusicOffOn)_SelectSlides[_SelectSlideBackgroundMusic].Selection;
|
||||
CConfig.Config.Sound.BackgroundMusicSource = (EBackgroundMusicSource)_SelectSlides[_SelectSlideBackgroundMusicSource].Selection;
|
||||
CConfig.BackgroundMusicVolume = _SelectSlides[_SelectSlideBackgroundMusicVolume].Selection * 5;
|
||||
if (CConfig.Config.Sound.PlayBackLib == EPlaybackLib.GstreamerSharp)
|
||||
{
|
||||
CConfig.Config.Sound.KaraokeEffect = (EOffOn)_SelectSlides[_SelectSlideKaraokeEffect].Selection;
|
||||
}
|
||||
CConfig.SaveConfig();
|
||||
|
||||
CBackgroundMusic.SetMusicSource(CConfig.Config.Sound.BackgroundMusicSource);
|
||||
|
||||
@@ -24,6 +24,7 @@ using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using Vocaluxe.Base;
|
||||
using Vocaluxe.Base.Fonts;
|
||||
using Vocaluxe.Lib.Sound;
|
||||
using VocaluxeLib;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Menu;
|
||||
@@ -525,7 +526,7 @@ namespace Vocaluxe.Screens
|
||||
songname += " (" + CGame.RoundNr + "/" + rounds + ")";
|
||||
_Texts[_TextSongName].Text = songname;
|
||||
|
||||
_CurrentStream = CSound.Load(song.GetMP3(), false, true);
|
||||
_CurrentStream = CSound.Load(song.GetMP3(), false, true, CConfig.Config.Sound.KaraokeEffect == EOffOn.TR_CONFIG_ON ? EAudioEffect.Karaoke : EAudioEffect.None);
|
||||
CSound.SetStreamVolume(_CurrentStream, 100);
|
||||
CSound.SetPosition(_CurrentStream, song.Start);
|
||||
_CurrentTime = song.Start;
|
||||
|
||||
@@ -372,9 +372,9 @@ namespace Vocaluxe.Screens
|
||||
else if (_Buttons[_ButtonOptionsOpenSelectedItem].Selected)
|
||||
_HandleSelectButton();
|
||||
else if (_SelectSlides[_SelectSlideOptionsPlaylistOpen].Selected)
|
||||
_OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistOpen].Selection);
|
||||
_OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistOpen].SelectedTag);
|
||||
else if (_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selected)
|
||||
_OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1);
|
||||
_OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag);
|
||||
else if (_Buttons[_ButtonOptionsRandomMedley].Selected)
|
||||
_ToggleSongOptions(ESongOptionsView.Medley);
|
||||
else if (_Buttons[_ButtonOptionsStartMedley].Selected)
|
||||
@@ -533,12 +533,12 @@ namespace Vocaluxe.Screens
|
||||
}
|
||||
else if (_SelectSlides[_SelectSlideOptionsPlaylistOpen].IsValueSelected)
|
||||
{
|
||||
_OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistOpen].Selection);
|
||||
_OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistOpen].SelectedTag);
|
||||
return true;
|
||||
}
|
||||
else if (_SelectSlides[_SelectSlideOptionsPlaylistAdd].IsValueSelected)
|
||||
{
|
||||
_OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1);
|
||||
_OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag);
|
||||
return true;
|
||||
}
|
||||
else if (_Buttons[_ButtonOptionsRandomMedley].Selected)
|
||||
@@ -1279,16 +1279,16 @@ namespace Vocaluxe.Screens
|
||||
private void _UpdatePlaylistNames()
|
||||
{
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistAdd].Clear();
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistAdd].AddValue("TR_SCREENSONG_NEWPLAYLIST");
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistAdd].AddValues(CPlaylists.Names);
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistAdd].AddValue("TR_SCREENSONG_NEWPLAYLIST", tag: -1);
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistAdd].AddValues(CPlaylists.Names, CPlaylists.Ids);
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistOpen].Clear();
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistOpen].AddValues(CPlaylists.Names);
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistOpen].AddValues(CPlaylists.Names, CPlaylists.Ids);
|
||||
}
|
||||
|
||||
private void _OpenAndAddPlaylistAction()
|
||||
{
|
||||
if (_Playlist.ActivePlaylistID != (_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1) &&
|
||||
(_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1) != -1)
|
||||
if (_Playlist.ActivePlaylistID != (_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag) &&
|
||||
(_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag) != -1)
|
||||
{
|
||||
//Open an existing playlist and add song
|
||||
//Check selected game-mode
|
||||
@@ -1301,9 +1301,9 @@ namespace Vocaluxe.Screens
|
||||
gm = EGameMode.TR_GAMEMODE_NORMAL;
|
||||
|
||||
//Check if Playlist really exists
|
||||
if (_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1 >= 0)
|
||||
if (_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag >= 0)
|
||||
{
|
||||
_Playlist.ActivePlaylistID = _SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1;
|
||||
_Playlist.ActivePlaylistID = _SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag;
|
||||
|
||||
//Add song to playlist
|
||||
CPlaylists.AddSong(_Playlist.ActivePlaylistID, CSongs.VisibleSongs[_SongMenu.GetPreviewSongNr()].ID, gm);
|
||||
@@ -1314,7 +1314,7 @@ namespace Vocaluxe.Screens
|
||||
_Playlist.ScrollToBottom();
|
||||
}
|
||||
}
|
||||
else if ((_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1) == -1)
|
||||
else if ((_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag) == -1)
|
||||
{
|
||||
//Create a new playlist and add song
|
||||
//Check selected game-mode
|
||||
@@ -1336,8 +1336,8 @@ namespace Vocaluxe.Screens
|
||||
_OpenPlaylist(_Playlist.ActivePlaylistID);
|
||||
|
||||
//Add new playlist to select-slide
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistAdd].AddValue(CPlaylists.GetName(_Playlist.ActivePlaylistID));
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistOpen].AddValue(CPlaylists.GetName(_Playlist.ActivePlaylistID));
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistAdd].AddValue(CPlaylists.GetName(_Playlist.ActivePlaylistID), _Playlist.ActivePlaylistID);
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistOpen].AddValue(CPlaylists.GetName(_Playlist.ActivePlaylistID), _Playlist.ActivePlaylistID);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1359,7 +1359,7 @@ namespace Vocaluxe.Screens
|
||||
private void _SetSelectSlidePlaylistToCurrentPlaylist()
|
||||
{
|
||||
if (_Playlist.ActivePlaylistID > -1)
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection = _Playlist.ActivePlaylistID + 1;
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistAdd].SelectedTag = _Playlist.ActivePlaylistID;
|
||||
else
|
||||
_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection = 0;
|
||||
}
|
||||
|
||||
+15
-14
@@ -185,6 +185,7 @@
|
||||
<Compile Include="Lib\Draw\CTextureBase.cs" />
|
||||
<Compile Include="Lib\Draw\CTextureProvider.cs" />
|
||||
<Compile Include="Lib\Input\CGamePad.cs" />
|
||||
<Compile Include="Lib\Sound\EAudioEffect.cs" />
|
||||
<Compile Include="Lib\Sound\Playback\CAudioStreamBase.cs" />
|
||||
<Compile Include="Lib\Sound\Playback\CPlaybackBase.cs" />
|
||||
<Compile Include="Lib\Sound\Playback\CRingBuffer.cs" />
|
||||
@@ -478,12 +479,12 @@
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">xcopy /E /D /Y "$(ProjectDir)\Website" "$(SolutionDir)\PhoneGap"
|
||||
powershell -command "if($Env:GIT_VERSION_TAG) {$version = $Env:GIT_VERSION_TAG;} else {$version = git describe --long;}(Get-Content -Encoding UTF8 '$(ProjectDir)..\Output\Website\js\main.js') | Foreach-Object {$_ -replace '(?<=var *matchingServerVersion * = *\")\w*(?=\" *;)', "$version"} | Set-Content -Encoding UTF8 '$(ProjectDir)..\Output\Website\js\main.js'"
|
||||
powershell -command "(Get-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs') | Foreach-Object {$_ -replace '(?<=AssemblyInformationalVersion\()(.*)(?=\))', '\"GITVERSION\"'} | Set-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs'"</PostBuildEvent>
|
||||
powershell -command "(Get-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs') | Foreach-Object {$_ -replace '(?<=AssemblyInformationalVersion\(\").*(?=\")', 'GITVERSION'} | Foreach-Object {$_ -replace '(?<=(AssemblyVersion|AssemblyFileVersion)\(\").*(?=\")', 'SHORTVERSION'} | Set-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs' "</PostBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">cp -ruT "$(ProjectDir)Website" "$(SolutionDir)/PhoneGap"</PostBuildEvent>
|
||||
<PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">$(ProjectDir)Linux/Build/PostBuildEvent.sh $(ProjectDir)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">powershell -command "if($Env:GIT_VERSION_TAG) {$version = $Env:GIT_VERSION_TAG;} else {$version = git describe --long;} (Get-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs') | Foreach-Object {$_ -replace 'GITVERSION', $version} | Set-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs'"</PreBuildEvent>
|
||||
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">powershell -command " if($Env:GIT_VERSION_TAG) {$version = $Env:GIT_VERSION_TAG;} else {$version = git describe --long;} (Get-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs') | Foreach-Object {$_ -replace '(?<=AssemblyInformationalVersion\(\").*(?=\")', $version} | Foreach-Object {$_ -replace '(?<=(AssemblyVersion|AssemblyFileVersion)\(\").*(?=\")', $version.Split('-')[0].replace('alpha','0').replace('beta','1').replace('rc','2')} | Foreach-Object {$_ -replace '(?<=AssemblyCopyright\(\".*)[0-9]+(?=\")', (Get-Date).Year} | Set-Content -Encoding UTF8 '$(ProjectDir)Properties\AssemblyInfo.cs' "</PreBuildEvent>
|
||||
<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">$(ProjectDir)Linux/Build/PreBuildEvent.sh $(ProjectDir)</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
@@ -535,31 +536,31 @@ powershell -command "(Get-Content -Encoding UTF8 '$(ProjectDir)Properties\Assemb
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Rebuild for automatic package restore. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.1\build\vocaluxe.dependencies.acinerella.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.acinerella.1.0.1\build\vocaluxe.dependencies.acinerella.targets'))" />
|
||||
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.3\build\vocaluxe.dependencies.acinerella.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.acinerella.1.0.3\build\vocaluxe.dependencies.acinerella.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.csharpsqlite.1.0.1\build\vocaluxe.dependencies.csharpsqlite.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.csharpsqlite.1.0.1\build\vocaluxe.dependencies.csharpsqlite.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.ffmpeg.1.0.1\build\vocaluxe.dependencies.ffmpeg.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.ffmpeg.1.0.1\build\vocaluxe.dependencies.ffmpeg.targets'))" />
|
||||
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.ffmpeg.1.0.3\build\vocaluxe.dependencies.ffmpeg.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.ffmpeg.1.0.3\build\vocaluxe.dependencies.ffmpeg.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.3\build\vocaluxe.dependencies.hidapi.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.hidapi.1.0.3\build\vocaluxe.dependencies.hidapi.targets'))" />
|
||||
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.1\build\vocaluxe.dependencies.portaudiosharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.portaudiosharp.1.0.1\build\vocaluxe.dependencies.portaudiosharp.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.2\build\vocaluxe.dependencies.portaudiosharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.portaudiosharp.1.0.2\build\vocaluxe.dependencies.portaudiosharp.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.1\build\vocaluxe.dependencies.gstreamer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamer.1.0.1\build\vocaluxe.dependencies.gstreamer.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.1.0.8\build\vocaluxe.dependencies.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.1.0.8\build\vocaluxe.dependencies.targets'))" />
|
||||
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.1.0.10\build\vocaluxe.dependencies.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.1.0.10\build\vocaluxe.dependencies.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\vocaluxe.dependencies.acinerella.1.0.1\build\vocaluxe.dependencies.acinerella.targets" Condition="Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.1\build\vocaluxe.dependencies.acinerella.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.acinerella.1.0.3\build\vocaluxe.dependencies.acinerella.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.3\build\vocaluxe.dependencies.acinerella.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets" Condition="Exists('..\packages\vocaluxe.dependencies.aforgevideo.1.0.1\build\vocaluxe.dependencies.aforgevideo.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.csharpsqlite.1.0.1\build\vocaluxe.dependencies.csharpsqlite.targets" Condition="Exists('..\packages\vocaluxe.dependencies.csharpsqlite.1.0.1\build\vocaluxe.dependencies.csharpsqlite.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.ffmpeg.1.0.1\build\vocaluxe.dependencies.ffmpeg.targets" Condition="Exists('..\packages\vocaluxe.dependencies.ffmpeg.1.0.1\build\vocaluxe.dependencies.ffmpeg.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.ffmpeg.1.0.3\build\vocaluxe.dependencies.ffmpeg.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.ffmpeg.1.0.3\build\vocaluxe.dependencies.ffmpeg.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.gstreamersharp.1.0.1\build\vocaluxe.dependencies.gstreamersharp.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.hidapi.1.0.3\build\vocaluxe.dependencies.hidapi.targets" Condition="Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.3\build\vocaluxe.dependencies.hidapi.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.hidapi.1.0.4\build\vocaluxe.dependencies.hidapi.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets" Condition="Exists('..\packages\vocaluxe.dependencies.opentk.1.0.1\build\vocaluxe.dependencies.opentk.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.portaudiosharp.1.0.1\build\vocaluxe.dependencies.portaudiosharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.1\build\vocaluxe.dependencies.portaudiosharp.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.portaudiosharp.1.0.2\build\vocaluxe.dependencies.portaudiosharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.2\build\vocaluxe.dependencies.portaudiosharp.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets" Condition="Exists('..\packages\vocaluxe.dependencies.qrcoder.1.0.1\build\vocaluxe.dependencies.qrcoder.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets" Condition="Exists('..\packages\vocaluxe.dependencies.slimdx.1.0.1\build\vocaluxe.dependencies.slimdx.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets" Condition="Exists('..\packages\vocaluxe.dependencies.sqlite.1.0.1\build\vocaluxe.dependencies.sqlite.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.gstreamer.1.0.1\build\vocaluxe.dependencies.gstreamer.targets" Condition="Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.1\build\vocaluxe.dependencies.gstreamer.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.1.0.8\build\vocaluxe.dependencies.targets" Condition="Exists('..\packages\vocaluxe.dependencies.1.0.8\build\vocaluxe.dependencies.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.2\build\vocaluxe.dependencies.gstreamer.targets')" />
|
||||
<Import Project="..\packages\vocaluxe.dependencies.1.0.10\build\vocaluxe.dependencies.targets" Condition="Exists('..\packages\vocaluxe.dependencies.1.0.10\build\vocaluxe.dependencies.targets')" />
|
||||
</Project>
|
||||
@@ -1,15 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="vocaluxe.dependencies" version="1.0.8" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.acinerella" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies" version="1.0.10" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.acinerella" version="1.0.3" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.aforgevideo" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.csharpsqlite" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.ffmpeg" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.gstreamer" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.ffmpeg" version="1.0.3" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.gstreamer" version="1.0.2" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.gstreamersharp" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.hidapi" version="1.0.3" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.hidapi" version="1.0.4" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.opentk" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.portaudiosharp" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.portaudiosharp" version="1.0.2" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.qrcoder" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.slimdx" version="1.0.1" targetFramework="net40" />
|
||||
<package id="vocaluxe.dependencies.sqlite" version="1.0.1" targetFramework="net40" />
|
||||
|
||||
@@ -369,6 +369,12 @@ namespace VocaluxeLib
|
||||
Game
|
||||
}
|
||||
|
||||
public enum EHighscoreStyle
|
||||
{
|
||||
TR_CONFIG_HIGHSCORE_LIST_ALL,
|
||||
TR_CONFIG_HIGHSCORE_LIST_BEST
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Base screens
|
||||
/// </summary>
|
||||
|
||||
@@ -46,6 +46,8 @@ namespace VocaluxeLib
|
||||
|
||||
ESongMenu GetSongMenuType();
|
||||
|
||||
EHighscoreStyle GetHighscoreStyle();
|
||||
|
||||
EOffOn GetDrawNoteLines();
|
||||
EOffOn GetDrawToneHelper();
|
||||
|
||||
|
||||
@@ -618,6 +618,7 @@ namespace VocaluxeLib.Menu
|
||||
_UpdatePlayerSlide();
|
||||
}
|
||||
_UpdateButtonState();
|
||||
_UpdateNextButtonVisibility();
|
||||
}
|
||||
|
||||
public void DecreasePlayerNum(int team)
|
||||
@@ -633,6 +634,7 @@ namespace VocaluxeLib.Menu
|
||||
_UpdatePlayerSlide();
|
||||
}
|
||||
_UpdateButtonState();
|
||||
_UpdateNextButtonVisibility();
|
||||
}
|
||||
|
||||
#region private methods
|
||||
@@ -725,7 +727,7 @@ namespace VocaluxeLib.Menu
|
||||
{
|
||||
if (_NumPlayerTeams[team] == _TeamList[team].Count && !_ChangePlayerNumDynamic)
|
||||
return;
|
||||
if (_NumPlayerTeams[team] == _PartyMode.MaxPlayersPerTeam)
|
||||
if (_NumPlayerTeams[team] > _PartyMode.MaxPlayersPerTeam)
|
||||
return;
|
||||
|
||||
_NameSelections[_NameSelection].UseProfile(profileID);
|
||||
@@ -774,7 +776,8 @@ namespace VocaluxeLib.Menu
|
||||
for (int p = 0; p < _NumPlayerTeams[t]; p++)
|
||||
{
|
||||
int profileID = _NameSelections[_NameSelection].GetRandomUnusedProfile();
|
||||
_AddPlayer(t, profileID);
|
||||
if(profileID >= 0) //only add valid profiles
|
||||
_AddPlayer(t, profileID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -465,23 +465,11 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public int GetRandomUnusedProfile()
|
||||
{
|
||||
int id = -1;
|
||||
|
||||
if (_VisibleProfiles.Count == 0)
|
||||
return id;
|
||||
return -1;
|
||||
|
||||
if (_VisibleProfiles.Count == _UsedProfiles.Count)
|
||||
return id;
|
||||
|
||||
while (id == -1)
|
||||
{
|
||||
int rand = CBase.Game.GetRandom(_VisibleProfiles.Count);
|
||||
if (_UsedProfiles.Contains(_VisibleProfiles[rand]))
|
||||
continue;
|
||||
id = _VisibleProfiles[rand];
|
||||
}
|
||||
|
||||
return id;
|
||||
int rand = CBase.Game.GetRandom(_VisibleProfiles.Count);
|
||||
return _VisibleProfiles[rand];
|
||||
}
|
||||
|
||||
private void _PrepareTiles()
|
||||
|
||||
@@ -1087,6 +1087,7 @@ namespace VocaluxeLib.Menu
|
||||
};
|
||||
_PlaylistElementContents.Add(pec);
|
||||
}
|
||||
_SetSelectionToFirstEntry();
|
||||
_Update();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -436,6 +436,22 @@ namespace VocaluxeLib.Menu
|
||||
AddValue(value);
|
||||
}
|
||||
|
||||
public void AddValues(IEnumerable<string> values, IEnumerable<int> tags)
|
||||
{
|
||||
using (var e1 = values.GetEnumerator())
|
||||
using (var e2 = tags.GetEnumerator())
|
||||
{
|
||||
while (e1.MoveNext() && e2.MoveNext())
|
||||
{
|
||||
AddValue(e1.Current, tag: e2.Current);
|
||||
}
|
||||
if (e1.MoveNext() || e2.MoveNext())
|
||||
{
|
||||
throw new ArgumentException("the lists must have the same length");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void AddValues(string[] values, CTextureRef[] textures)
|
||||
{
|
||||
Debug.Assert(values.Length == textures.Length);
|
||||
@@ -566,10 +582,10 @@ namespace VocaluxeLib.Menu
|
||||
for (int i = 0; i < numvis; i++)
|
||||
{
|
||||
var el = new CElement
|
||||
{
|
||||
Text = new CText(0, 0, 0, _TextH, _MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, _TextColor, "T", _PartyModeID),
|
||||
Img = new CStatic(_PartyModeID)
|
||||
};
|
||||
{
|
||||
Text = new CText(0, 0, 0, _TextH, _MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, _TextColor, "T", _PartyModeID),
|
||||
Img = new CStatic(_PartyModeID)
|
||||
};
|
||||
_VisibleElements.Add(el);
|
||||
}
|
||||
}
|
||||
|
||||
+49
-22
@@ -11,47 +11,72 @@ environment:
|
||||
GitHubKey:
|
||||
secure: JSlN/em0JdspVn8jwaQ4IjugY6OQi0au4Qq0rhctJmcfGMaEGnUAOmDFULI48REW
|
||||
install:
|
||||
- ps: >-
|
||||
- ps: |
|
||||
$Env:CurrentCommitSha = "$(git rev-parse --verify HEAD)"
|
||||
|
||||
$Env:githubRepoApiUri = "https://api.github.com/repos/Vocaluxe/Vocaluxe/"
|
||||
if((-not $Env:githubRepoApiUri) -or ($Env:APPVEYOR_ACCOUNT_NAME -eq "VocaluxeBuildBot")){
|
||||
$Env:githubRepoApiUri = "https://api.github.com/repos/Vocaluxe/Vocaluxe/"
|
||||
}
|
||||
|
||||
Write-Host "GitHub api url: $Env:githubRepoApiUri"
|
||||
|
||||
./.appveyor/gitDescribe.ps1
|
||||
|
||||
$Env:GIT_VERSION_TAG = $Env:VersionTag
|
||||
|
||||
$Env:GIT_VERSION_TAG = $Env:VersionTag
|
||||
Write-Host "GIT_VERSION_TAG: $Env:GIT_VERSION_TAG"
|
||||
|
||||
if($Env:APPVEYOR_REPO_TAG -eq "true"){
|
||||
|
||||
$Env:TAG_NAME_WITH_BRANCH_NAME_FALLBACK = $Env:APPVEYOR_REPO_TAG_NAME
|
||||
|
||||
$Env:TAG_NAME_WITH_BRANCH_NAME_FALLBACK = $Env:APPVEYOR_REPO_TAG_NAME
|
||||
}
|
||||
|
||||
else{
|
||||
|
||||
$Env:TAG_NAME_WITH_BRANCH_NAME_FALLBACK = $Env:APPVEYOR_REPO_BRANCH
|
||||
|
||||
}
|
||||
|
||||
./.appveyor/moveTagForSpecialBranches.ps1
|
||||
$Env:TAG_NAME_WITH_BRANCH_NAME_FALLBACK = $Env:APPVEYOR_REPO_BRANCH
|
||||
}
|
||||
before_build:
|
||||
- ps: >-
|
||||
- ps: |
|
||||
Try
|
||||
{
|
||||
Start-FileDownload 'https://github.com/lukeIam/VocaluxeDependencies/blob/master/zips/themes/vocaluxe.themes.ambient.video.zip?raw=true'
|
||||
& 7z x '-aoa' '-oOutput/' './vocaluxe.themes.ambient.video.zip'
|
||||
Remove-Item './vocaluxe.themes.ambient.video.zip'
|
||||
}
|
||||
Catch
|
||||
{
|
||||
Write-Warning "Ambient-Video download failed"
|
||||
}
|
||||
nuget restore -DisableParallelProcessing
|
||||
|
||||
#(Get-Content -Encoding UTF8 'PitchTracker\PitchTracker.vcxproj') | Foreach-Object {$_ -replace 'v110_xp', 'v120_xp'} | Set-Content -Encoding UTF8 'PitchTracker\PitchTracker.vcxproj'
|
||||
build:
|
||||
project: Vocaluxe.sln
|
||||
verbosity: normal
|
||||
after_build:
|
||||
- ps: >-
|
||||
- ps: |
|
||||
cd Output
|
||||
|
||||
7z a "Vocaluxe_$($Env:TAG_NAME_WITH_BRANCH_NAME_FALLBACK)_Windows_$($Env:PLATFORM).zip" *
|
||||
$Env:MAIN_REPO = $False
|
||||
|
||||
appveyor PushArtifact "Vocaluxe_$($Env:TAG_NAME_WITH_BRANCH_NAME_FALLBACK)_Windows_$($Env:PLATFORM).zip" -FileName "Vocaluxe_$($Env:TAG_NAME_WITH_BRANCH_NAME_FALLBACK)_Windows_$($Env:PLATFORM).zip" -DeploymentName ReleaseZip
|
||||
if($Env:APPVEYOR_REPO_NAME -eq "Vocaluxe/Vocaluxe"){
|
||||
$Env:MAIN_REPO = $True
|
||||
Write-Host "Main repo Vocaluxe/Vocaluxe detected"
|
||||
}
|
||||
|
||||
$forkBuildTag = ""
|
||||
if(($Env:MAIN_REPO -ne $True) -or ($Env:APPVEYOR_ACCOUNT_NAME -ne "VocaluxeBuildBot")){
|
||||
$forkBuildTag = "_non-official-by-$Env:APPVEYOR_ACCOUNT_NAME"
|
||||
Write-Host "Non official build detected: $Env:APPVEYOR_REPO_NAME by $Env:APPVEYOR_ACCOUNT_NAME"
|
||||
}
|
||||
|
||||
7z a "Vocaluxe_$($Env:TAG_NAME_WITH_BRANCH_NAME_FALLBACK)_Windows_$($Env:PLATFORM)$forkBuildTag.zip" *
|
||||
|
||||
appveyor PushArtifact "Vocaluxe_$($Env:TAG_NAME_WITH_BRANCH_NAME_FALLBACK)_Windows_$($Env:PLATFORM)$forkBuildTag.zip" -FileName "Vocaluxe_$($Env:TAG_NAME_WITH_BRANCH_NAME_FALLBACK)_Windows_$($Env:PLATFORM)$forkBuildTag.zip" -DeploymentName ReleaseZip
|
||||
|
||||
cd ..
|
||||
|
||||
.\.appveyor\nightlyDetect.ps1
|
||||
|
||||
Write-Host "Created artifact: Vocaluxe_$($Env:TAG_NAME_WITH_BRANCH_NAME_FALLBACK)_Windows_$($Env:PLATFORM)$forkBuildTag.zip"
|
||||
|
||||
if($Env:MAIN_REPO -eq $True){
|
||||
.\.appveyor\nightlyDetect.ps1
|
||||
.\.appveyor\moveTagForSpecialBranches.ps1
|
||||
}
|
||||
test: off
|
||||
before_deploy:
|
||||
- ps: ./.appveyor/prepareDeploy.ps1
|
||||
@@ -67,6 +92,7 @@ deploy:
|
||||
on:
|
||||
APPVEYOR_REPO_TAG: true
|
||||
NIGHTLY_BUILD: false
|
||||
MAIN_REPO: true
|
||||
- provider: GitHub
|
||||
tag: $(APPVEYOR_REPO_TAG_NAME)
|
||||
release: Latest Nightly build
|
||||
@@ -76,4 +102,5 @@ deploy:
|
||||
artifact: ReleaseZip
|
||||
on:
|
||||
APPVEYOR_REPO_TAG: true
|
||||
NIGHTLY_BUILD: true
|
||||
NIGHTLY_BUILD: true
|
||||
MAIN_REPO: true
|
||||
Reference in new issue
Block a user