From 75451a0a17ff4b794a808a2e5e8d9ae460ed96f7 Mon Sep 17 00:00:00 2001 From: Flamefire Date: Mon, 11 Feb 2013 17:49:17 +0100 Subject: [PATCH 1/2] Support relative songs --- VocaluxeLib/Menu/SongMenu/CSong.cs | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/VocaluxeLib/Menu/SongMenu/CSong.cs b/VocaluxeLib/Menu/SongMenu/CSong.cs index 98012fdc..70bcf77e 100644 --- a/VocaluxeLib/Menu/SongMenu/CSong.cs +++ b/VocaluxeLib/Menu/SongMenu/CSong.cs @@ -562,12 +562,6 @@ namespace Vocaluxe.Menu.SongMenu return false; } - if (this.Relative == EOffOn.TR_CONFIG_ON) - { - _Base.Log.LogError("Relative songs are not supported by Vocaluxe (perhaps later)! (" + FilePath + ")"); - return false; - } - #region check medley tags if ((HeaderFlags & EHeaderFlags.MedleyStartBeat) != 0 && (HeaderFlags & EHeaderFlags.MedleyEndBeat) != 0) { @@ -637,6 +631,7 @@ namespace Vocaluxe.Menu.SongMenu int Param1 = 0; int Param2 = 0; int Param3 = 0; + int currentPos = 0; string ParamS = String.Empty; bool isNewSentence = false; @@ -703,14 +698,17 @@ namespace Vocaluxe.Menu.SongMenu chr = (char)sr.Read(); ParamS = sr.ReadLine(); - ENoteType NoteType = ENoteType.Normal; + ENoteType NoteType; if (TempC.CompareTo('*') == 0) NoteType = ENoteType.Golden; - - if (TempC.CompareTo('F') == 0) + else if (TempC.CompareTo('F') == 0) NoteType = ENoteType.Freestyle; - + else + NoteType = ENoteType.Normal; + + if (this.Relative == EOffOn.TR_CONFIG_ON) + Param1 += currentPos; if (Player != 2) // one singer @@ -734,6 +732,14 @@ namespace Vocaluxe.Menu.SongMenu char chr = (char)sr.Read(); Param1 = CHelper.TryReadInt(sr); + + if (this.Relative == EOffOn.TR_CONFIG_ON) + { + Param1 += currentPos; + chr = (char)sr.Read(); + Param2 = CHelper.TryReadInt(sr); + currentPos += Param2; + } if(Player != 2) // one singer From 84796993c168384f2a907ecffa3b8f974adb1d96 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Mon, 11 Feb 2013 20:47:24 +0100 Subject: [PATCH 2/2] full path for party mode textures and videos --- Vocaluxe/Base/CParty.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vocaluxe/Base/CParty.cs b/Vocaluxe/Base/CParty.cs index ed64339d..1b661582 100644 --- a/Vocaluxe/Base/CParty.cs +++ b/Vocaluxe/Base/CParty.cs @@ -311,7 +311,7 @@ namespace Vocaluxe.Base } pm.PartyMode.Initialize(CMain.Base); - if (!CTheme.AddTheme(Path.Combine(Path.Combine(CSettings.sFolderPartyModes, pm.Folder), "Theme.xml"), pm.PartyModeID)) + if (!CTheme.AddTheme(Path.Combine(Directory.GetCurrentDirectory(), Path.Combine(Path.Combine(CSettings.sFolderPartyModes, pm.Folder), "Theme.xml")), pm.PartyModeID)) return pm; int ThemeIndex = CTheme.GetThemeIndex(pm.PartyModeID);