61 Commits
Author SHA1 Message Date
Stefan 81c323363a Release 0.4.1
Release 0.4.1
2020-03-10 07:52:34 +01:00
Stefan 1356b61383 Merge pull request #507 from lukeIam/release-0.4.1
Fix: replace invalid github tokens in 0.4.1 branch
2020-03-09 19:17:58 +01:00
Stefan 3806c77d98 Merge branch 'release-0.4.1' into release-0.4.1 2020-03-09 19:02:37 +01:00
lukeIam a6c5766138 Fix: replace invalid github tokens in 0.4.1 branch 2020-03-09 18:24:20 +01:00
Stefan 3bbcb2d56a Merge pull request #328 from Vocaluxe/release-0.4.1
Bugfix release 0.4.1
2020-03-08 17:24:28 +01:00
daggeg 25fd140b3e Merge pull request #497 from Vocaluxe/Readme-patch-1
Update Readme.txt
2020-02-11 13:01:00 +01:00
Stefan 5e481878f5 Update Readme.txt 2020-02-11 06:32:26 +01:00
Stefan c05f2ab548 Merge pull request #495 from Vocaluxe/FixSubLineAlphaCalculation_release-0.4.1
Fix alpha calculation for last sub line (release-0.4.1)
2020-02-09 20:23:54 +01:00
Stefan 919ab803d1 Fix alpha calculation for last sub line (release-0.4.1)
Sub line was displayed wrong, if the last lyric line has a bigger distance to the second last line. Alpha calculation for sub lines stopped one line to early and might be visible even if it shouldn't be.
2020-02-09 20:02:59 +01:00
daggeg dd7be5c575 Merge pull request #489 from Vocaluxe/FixPlaylistScrollOffset_release-0.4.1
Scroll offset was ignored while singing a single playlist song (fix #487 for release-0.4.1)
2020-02-08 11:19:50 +01:00
Stefan 546ccf4748 Scroll offset was ignored while singing a single playlist song (fix #487 for release-0.4.1) 2020-02-07 21:17:36 +01:00
Stefan d457c6c66f Merge pull request #481 from Vocaluxe/RelativeSongPathFix-0.4.1
Relative song paths will now be converted to absolute song paths (release-0.4.1)
2020-02-04 14:10:09 +01:00
Stefan cfc6bfa738 Relative song paths will now be converted to absolute song paths
Same fix from GaryCXJk for release-0.4.1
2020-02-04 08:46:48 +01:00
daggeg de80eeb823 Merge pull request #448 from Vocaluxe/VideoPreviewFix-release0.4.1
Fix release-0.4.1: Config.Video.VideoPreview is ignored (fixes #391)
2020-01-17 17:32:28 +01:00
Stefan 2bb2819b33 Merge branch 'release-0.4.1' into VideoPreviewFix-release0.4.1 2020-01-16 22:01:16 +01:00
daggeg c0e2281b74 Merge pull request #451 from Vocaluxe/JumpTo_FolderSort-fix0.4.1
Fix release-0.4.1: JumpTo not working correctly on folder sort (fix #449)
2020-01-16 08:28:43 +01:00
Stefan 9e8952157a Fix release-0.4.1: JumpTo not working correctly on folder sort (fix #449) 2020-01-16 07:15:23 +01:00
Stefan e2dcbc2ecf Fix release-0.4.1: Config.Video.VideoPreview is ignored (fixes #391) 2020-01-15 23:46:01 +01:00
Stefan 4c76c88074 Fix release-0.4.1: Config.Video.VideoPreview is ignored (fixes #391) 2020-01-15 23:44:49 +01:00
lukeIam 890e6d84fb Merge pull request #380 from lukeIam/release-0.4.1
Use TLS 1.2 for downloading GStreamer
2018-03-01 17:21:29 +01:00
lukeIam cd5ab37afd Use TLS 1.2 for downloading GStreamer
(cherry picked from commit 617cf70bf8)
2018-03-01 11:24:50 +01:00
Florian Küpper 5adde7b9c4 Merge pull request #373 from lukeIam/release-0.4.1
New PortAudio
2018-02-04 16:24:11 +01:00
lukeIam 61dcfc3aeb Upgrade PortAudio to version pa_stable_v190600_20161030
(cherry picked from commit 16f9ef2c88)
2018-02-04 16:04:16 +01:00
lukeIam 342123dc4e Removed useless metapackage vocaluxe.dependencies
(cherry picked from commit 20d13d9f06)

# Conflicts:
#	Vocaluxe/packages.config
2018-02-04 16:04:14 +01:00
Florian Küpper c55f779dba Merge pull request #358 from flokuep/release-0.4.1
Release 0.4.1
2017-12-26 16:33:49 +01:00
Florian Küpper 675edce193 Fix: winner calc in tic-tac-toe mode (closes #349) 2017-12-26 15:46:21 +01:00
Florian Küpper f9e71693ea Fix: Winner in challenge mode wasn't calculated properly 2017-12-26 12:51:16 +01:00
Florian Küpper e99f1adfae Fixed exception on task dispose (fix #357) 2017-12-26 11:37:00 +01:00
Florian Küpper 330f755c44 Merge pull request #352 from lukeIam/CouldNotQueryPos
Meaningless "Could not query position" messages in the log
2017-12-22 16:31:27 +01:00
lukeIam 4ceac098ab Merge branch 'release-0.4.1' of https://github.com/Vocaluxe/Vocaluxe into CouldNotQueryPos 2017-12-21 15:13:51 +01:00
lukeIam 9599c1a616 Fix: meaningless "Could not query position" messages in the log 2017-12-21 15:08:12 +01:00
Florian Küpper 5ec3f9a8a7 Merge pull request #347 from lukeIam/release-0.4.1
_PreviewStartHelperTask null check from @Pr3di
2017-12-19 11:12:47 +01:00
Pr3di 60a6f8d347 NullPointerException abgefangen
(cherry picked from commit 6782f5104a)
2017-12-19 10:43:35 +01:00
Florian Küpper 533a7e64d2 Merge pull request #345 from flokuep/release-0.4.1
Minor fixes.
2017-12-05 17:11:51 +01:00
Florian Küpper 2d13c3a834 Merge branch 'release-0.4.1' into release-0.4.1 2017-12-05 16:54:04 +01:00
Florian Küpper 064b5412a6 Fix: Increase team number in PartyNameSelction 2017-12-03 12:38:50 +01:00
Florian Küpper 2f4067c374 Merge pull request #346 from Jiiniasu/0.4.1-Button-Fix
Fix: Button SelColor
2017-12-02 22:22:39 +01:00
Jiiniasu 7f3d9c5f41 Fix: Button SelColor
Correctly set Selcolor when creating one based on an existing button.
2017-12-02 22:12:58 +01:00
Florian Küpper e9abec565d Removed unused tables after converting Ultrastar.db 2017-12-02 21:57:22 +01:00
Florian Küpper 5296627f8d Fixed converting Ultrastar.db 2017-12-02 16:45:41 +01:00
Florian Küpper 7fdbd8780b Fixed updating team-slide in PartyNameSelection 2017-12-01 17:14:28 +01:00
Florian Küpper feb5c1eaed Fix: PartyNameSelection visibility of team increase/decrease button 2017-12-01 16:41:21 +01:00
Florian Küpper 1baed149af Updated AdvancedInstaller version 2017-11-23 16:54:30 +01:00
Florian Küpper d7e924b72b Fixed installer file names 2017-11-23 16:50:07 +01:00
Florian Küpper b8fb0d7549 Make reading HighscoreDB more robust if song entries are incomplete 2017-11-22 20:14:31 +01:00
Florian Küpper 7dbd2363db Fix: Points were assigned to not sung songs 2017-11-21 09:49:45 +01:00
Florian Küpper 081ca63d85 Merge branch 'release-0.4.1' of github.com:Vocaluxe/Vocaluxe into release-0.4.1 2017-11-16 12:27:31 +01:00
Florian Küpper 06d6be528a Fixed wrong song folder path that leads to not working folder-sorting 2017-11-16 12:26:38 +01:00
lukeIam ce4529325b Fix: exception when intro video is missing 2017-11-06 10:08:06 +01:00
lukeIam 52f1b8f546 Fix: Vocaluxe crashes when _CopyDecodedFrameToBuffer() fails 2017-11-04 20:13:19 +01:00
lukeIam 79bbcbdccb Try to close the other modules correctly if a single one fails to close ( on program shutdown) 2017-11-04 19:47:47 +01:00
lukeIam a92353c9a2 Try to fix exceptions while closing Vocaluxe (during closing bg video) (may fixes #320) 2017-11-04 19:34:55 +01:00
lukeIam 3e0eec8294 Synchronize access to _PreviewStartHelperTask object (may fixes #330) 2017-11-04 14:58:48 +01:00
Florian Küpper ceaa77ffe7 Merge pull request #326 from flokuep/0.4.0-fixes
Small fixes
2017-10-30 18:29:06 +01:00
Florian Küpper c87016c4f8 Merge pull request #325 from lukeIam/PACloaseStreamHandling
PortAudio close-stream-handling
2017-10-30 18:28:43 +01:00
Florian Küpper 4d754c0876 Forget to remove a function... 2017-10-08 12:59:46 +02:00
Florian Küpper 8244fd638b Log missing avatar as error instead of throwing exceptions 2017-10-08 12:56:37 +02:00
Florian Küpper 85ad6050f8 Fixed lyrics visibility (closes #322) 2017-10-08 12:56:16 +02:00
Florian Küpper df34766f35 Fixed aspect of avatars 2017-10-08 12:40:59 +02:00
lukeIam ad5ffd7578 Catch potential errors from PortAudio Close() and Dispose() 2017-10-04 14:20:31 +02:00
lukeIam 4784e57370 Refactored mutex use while closing streams in CPortAudioHandle (should fix #320) 2017-10-04 13:12:14 +02:00
31 changed files with 559 additions and 187 deletions

No files matched your search

+8 -8
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DOCUMENT Type="Advanced Installer" CreateVersion="14.2.1" version="14.2.1" Modules="professional" RootPath="." Language="en" Id="{0664D363-F696-4E25-87C5-DE348E591191}">
<DOCUMENT Type="Advanced Installer" CreateVersion="14.2.1" version="14.4.2" Modules="professional" RootPath="." Language="en" Id="{0664D363-F696-4E25-87C5-DE348E591191}">
<COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
<ROW Name="HiddenItems" Value="AppXProductDetailsComponent;AppXDependenciesComponent;AppXAppDetailsComponent;AppXVisualAssetsComponent;AppXCapabilitiesComponent;AppXAppDeclarationsComponent;AppXUriRulesComponent;MsiJavaComponent;MsiDriverPackagesComponent;UserAccountsComponent;ScheduledTasksComponent;SqlConnectionComponent;AutorunComponent;FirewallExceptionComponent;GameUxComponent;MsiDirectEditorComponent;SharePointSlnComponent;SilverlightSlnComponent;MultipleInstancesComponent;SccmComponent;ActSyncAppComponent"/>
</COMPONENT>
@@ -18,7 +18,7 @@
<ROW Property="ALLUSERS" Value="1"/>
<ROW Property="ARPCOMMENTS" Value="This installs Vocaluxe. Vocaluxe is an open source singing game inspired by SingStar™ and Ultrastar Deluxe." ValueLocId="*"/>
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1#x64_1:1"/>
<ROW Property="ARPNOREPAIR" Value="1"/>
<ROW Property="ARPNOREPAIR" Value="1" MultiBuildValue="DefaultBuild:1#x64_1:1"/>
<ROW Property="ARPPRODUCTICON" Value="Vocaluxe.exe" Type="8"/>
<ROW Property="ARPURLINFOABOUT" Value="https://vocaluxe.org"/>
<ROW Property="BannerBitmap" Value="banner" MultiBuildValue="DefaultBuild:banner.jpg#x64_1:banner.jpg" Type="1" MsiKey="BannerBitmap"/>
@@ -28,7 +28,7 @@
<ROW Property="ProductCode" Value="1029:{DCDF3A8D-05B4-4CBF-8128-0BD10FDE4BDB} 1031:{3A3B2184-E965-4A08-8864-8B59990F963A} 1033:{756FABFA-4336-40AE-9245-60AB2D2C38F9} 1036:{ABCA971F-E153-4014-AC14-FF305678F6DE} 1038:{4345A445-5D72-4C8D-BB34-98C8B5D152E4} 1040:{D060F8C3-D29E-442F-B13C-B132B29C58BF} 1043:{5C0D700A-45AC-4616-94F6-2CAF8FA7E8AA} 1053:{0CAB03D2-183F-4680-970F-07F7EFAB0373} 1055:{307D49D0-9D47-409F-A3D1-92630CAE5C7E} 2070:{87BE9C14-3781-4EE9-871C-15E8F220A4E0} 3082:{F262F983-9F34-4201-B38B-0D45D2879E23} " Type="16"/>
<ROW Property="ProductLanguage" Value="1055"/>
<ROW Property="ProductName" Value="Vocaluxe"/>
<ROW Property="ProductVersion" Value="0.4.0.11" Type="32" TargetFile="Vocaluxe.exe"/>
<ROW Property="ProductVersion" Value="0.4.0.12" Type="32" TargetFile="Vocaluxe.exe"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR"/>
<ROW Property="UpgradeCode" Value="{4254D936-CC8F-4E52-B79B-A6C733ABEC96}"/>
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME#x64_1:Windows 9x/ME" ValueLocId="-"/>
@@ -3765,8 +3765,8 @@
<ROW Action="AI_DetectSoftware" Sequence="101"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
<ROW BuildKey="DefaultBuild" BuildName="x64" BuildOrder="1" BuildType="0" PackageFolder="Setup Files" Languages="en;cs;pt;fr;de;es;sv;hu;it;nl;tr" LangOpt="1" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="Files\Output\Vocaluxe.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" UseLargeSchema="true" ExeName="[|ProductName]-[|ProductVersion]-x64" MsiPackageType="x64"/>
<ROW BuildKey="x64_1" BuildName="x86" BuildOrder="2" BuildType="0" PackageFolder="Setup Files" Languages="en;cs;pt;fr;de;es;sv;hu;it;nl;tr" LangOpt="1" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="Files\Output\Vocaluxe.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" UseLargeSchema="true" ExeName="[|ProductName]-[|ProductVersion]-x86"/>
<ROW BuildKey="DefaultBuild" BuildName="x64" BuildOrder="1" BuildType="0" PackageFolder="Setup Files" Languages="en;cs;pt;fr;de;es;sv;hu;it;nl;tr" LangOpt="1" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="Files\Output\Vocaluxe.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" UseLargeSchema="true" ExeName="[|ProductName]_[|ProductVersion]_Windows_x64" MsiPackageType="x64"/>
<ROW BuildKey="x64_1" BuildName="x86" BuildOrder="2" BuildType="0" PackageFolder="Setup Files" Languages="en;cs;pt;fr;de;es;sv;hu;it;nl;tr" LangOpt="1" InstallationType="4" CabsLocation="1" PackageType="1" FilesInsideExe="true" ExeIconPath="Files\Output\Vocaluxe.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" UseLargeSchema="true" ExeName="[|ProductName]_[|ProductVersion]_Windows_x86"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
<ROW Path="&lt;AI_DICTS&gt;ui.ail"/>
@@ -4032,8 +4032,8 @@
<ATTRIBUTE name="PrereqsOrder" value="B63_41B8_9CB7_8C5E07C0FC18_ CB585686_DAA3_4384_BDDF_08ABA631E9F3_ C673FE9433B49AFAC9592AB26B8F8E4"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.PreReqSearchComponent">
<ROW SearchKey="B63_41B8_9CB7_8C5E07C0FC18_Version" Prereq="B63_41B8_9CB7_8C5E07C0FC18_" SearchType="2" SearchString="HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\10.0\red\amd64\1033\Version" VerMin="40219.325" Order="1" Property="PreReqSearch_B63_41B8_9CB7_8C5E07C0FC18_"/>
<ROW SearchKey="C673FE9433B49AFAC9592AB26B8F8E4Install" Prereq="C673FE9433B49AFAC9592AB26B8F8E4" SearchType="9" SearchString="HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Install" RefContent="M1" Order="1" Property="PreReqSearch_C673FE9433B49AFAC9592AB26B8F8E4"/>
<ROW SearchKey="CB585686_DAA3_4384_BDDF_08ABA631E9F3_Version" Prereq="CB585686_DAA3_4384_BDDF_08ABA631E9F3_" SearchType="2" SearchString="HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\10.0\red\x86\1033\Version" VerMin="40219.325" Order="1" Property="PreReqSearch_CB585686_DAA3_4384_BDDF_08ABA631E9F3_"/>
<ROW SearchKey="B63_41B8_9CB7_8C5E07C0FC18_Version" Prereq="B63_41B8_9CB7_8C5E07C0FC18_" SearchType="2" SearchString="HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\10.0\red\amd64\1033\Version" VerMin="40219.325" Order="1" Property="PreReqSearch_B63_41B8_9CB7_8C5E07C0"/>
<ROW SearchKey="C673FE9433B49AFAC9592AB26B8F8E4Install" Prereq="C673FE9433B49AFAC9592AB26B8F8E4" SearchType="9" SearchString="HKLM\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\Install" RefContent="M1" Order="1" Property="PreReqSearch_C673FE9433B49AFAC9592A"/>
<ROW SearchKey="CB585686_DAA3_4384_BDDF_08ABA631E9F3_Version" Prereq="CB585686_DAA3_4384_BDDF_08ABA631E9F3_" SearchType="2" SearchString="HKLM\SOFTWARE\Microsoft\DevDiv\VC\Servicing\10.0\red\x86\1033\Version" VerMin="40219.325" Order="1" Property="PreReqSearch_CB585686_DAA3_4384_BDD"/>
</COMPONENT>
</DOCUMENT>
+1 -2
View File
@@ -1,4 +1,4 @@
Vocaluxe 0.4 README
Vocaluxe 0.4.1 README
----------------------------
=================================
@@ -168,7 +168,6 @@ Vocaluxe Homepage: https://vocaluxe.org
Bug Tracker: https://github.com/Vocaluxe/Vocaluxe/issues
Translations: https://www.transifex.com/projects/p/vocaluxe/
GitHub Wiki: https://github.com/Vocaluxe/Vocaluxe/wiki
Support Forum (German): http://www.ultra-star.de
Song-DataBase (USDB): http://usdb.animux.de/
@@ -18,6 +18,7 @@
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using VocaluxeLib.Game;
using VocaluxeLib.Menu;
[assembly: ComVisible(false)]
@@ -430,39 +431,62 @@ namespace VocaluxeLib.PartyModes.Challenge
private void _UpdateScores()
{
//Prepare results table
if (GameData.ResultTable.Count == 0)
{
for (int i = 0; i < GameData.NumPlayer; i++)
{
var row = new CResultTableRow {PlayerID = GameData.ProfileIDs[i], NumPlayed = 0, NumWon = 0, NumSingPoints = 0, NumGamePoints = 0};
var row = new CResultTableRow { PlayerID = GameData.ProfileIDs[i], NumPlayed = 0, NumWon = 0, NumSingPoints = 0, NumGamePoints = 0 };
GameData.ResultTable.Add(row);
}
GameData.Results = new int[GameData.NumRounds,GameData.NumPlayerAtOnce];
GameData.Results = new int[GameData.NumRounds, GameData.NumPlayerAtOnce];
for (int i = 0; i < GameData.NumRounds; i++)
{
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
GameData.Results[i, j] = 0;
}
}
SPlayer[] results = CBase.Game.GetPlayers();
if (results == null)
return;
if (results.Length < GameData.NumPlayerAtOnce)
return;
//Get points from game
CPoints points = CBase.Game.GetPoints();
SPlayer[] players = CBase.Game.GetPlayers();
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
GameData.Results[GameData.CurrentRoundNr - 2, j] = (int)Math.Round(results[j].Points);
//Go over all rounds and sum up points
for (int round = 0; round < points.NumRounds; round++)
{
SPlayer[] res = points.GetPlayer(round, GameData.NumPlayerAtOnce);
List<SStats> points = _GetPointsForPlayer(results);
if (res == null || res.Length < GameData.NumPlayerAtOnce)
return;
for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
{
players[p].Points += res[p].Points;
players[p].PointsGoldenNotes += res[p].PointsGoldenNotes;
players[p].PointsLineBonus += res[p].PointsLineBonus;
}
}
//Calculate average points
for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
{
players[p].Points /= points.NumRounds;
players[p].PointsGoldenNotes /= points.NumRounds;
players[p].PointsLineBonus /= points.NumRounds;
//Save points in GameData
GameData.Results[GameData.CurrentRoundNr - 2, p] = (int)Math.Round(players[p].Points);
}
List<SStats> stats = _GetPointsForPlayer(players);
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
{
//Find matching row in results table
int index = -1;
for (int j = 0; j < GameData.ResultTable.Count; j++)
{
if (points[i].ProfileID == GameData.ResultTable[j].PlayerID)
if (stats[i].ProfileID == GameData.ResultTable[j].PlayerID)
{
index = j;
break;
@@ -473,14 +497,14 @@ namespace VocaluxeLib.PartyModes.Challenge
continue;
CResultTableRow row = GameData.ResultTable[index];
//Update results entry
row.NumPlayed++;
row.NumWon += points[i].Won;
row.NumSingPoints += points[i].SingPoints;
row.NumGamePoints += points[i].GamePoints;
row.NumWon += stats[i].Won;
row.NumSingPoints += stats[i].SingPoints;
row.NumGamePoints += stats[i].GamePoints;
GameData.ResultTable[index] = row;
}
GameData.ResultTable.Sort();
@@ -125,6 +125,7 @@ namespace VocaluxeLib.PartyModes.Challenge
_AddText(_NextPlayerTexts[_NextPlayerTexts.Count - 1]);
_NextPlayerStatics.Add(GetNewStatic(_Statics[_StaticNextPlayer]));
_AddStatic(_NextPlayerStatics[_NextPlayerStatics.Count - 1]);
_NextPlayerStatics[_NextPlayerStatics.Count - 1].Aspect = EAspect.Crop;
}
_Statics[_StaticNextPlayer].Visible = false;
}
@@ -411,74 +411,79 @@ namespace VocaluxeLib.PartyModes.ChallengeMedley
private void _UpdateScores()
{
//Prepare results table
if (GameData.ResultTable.Count == 0)
{
for (int i = 0; i < GameData.NumPlayer; i++)
{
CResultTableRow row = new CResultTableRow {PlayerID = GameData.ProfileIDs[i], NumPlayed = 0, NumWon = 0, NumSingPoints = 0, NumGamePoints = 0};
var row = new CResultTableRow { PlayerID = GameData.ProfileIDs[i], NumPlayed = 0, NumWon = 0, NumSingPoints = 0, NumGamePoints = 0 };
GameData.ResultTable.Add(row);
}
GameData.Results = new int[GameData.NumRounds,GameData.NumPlayerAtOnce];
GameData.Results = new int[GameData.NumRounds, GameData.NumPlayerAtOnce];
for (int i = 0; i < GameData.NumRounds; i++)
{
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
GameData.Results[i, j] = 0;
}
}
CPoints gamePoints = CBase.Game.GetPoints();
if (gamePoints == null || gamePoints.NumPlayer < GameData.NumPlayerAtOnce)
return;
SPlayer[] results = gamePoints.GetPlayer(0, GameData.NumPlayerAtOnce);
if (results == null)
return;
//Get points from game
CPoints points = CBase.Game.GetPoints();
SPlayer[] players = CBase.Game.GetPlayers();
if (results.Length < GameData.NumPlayerAtOnce)
return;
if (gamePoints.NumRounds == 0)
return;
for (int i = 1; i < gamePoints.NumRounds; i++)
//Go over all rounds and sum up points
for (int round = 0; round < points.NumRounds; round++)
{
SPlayer[] temp = gamePoints.GetPlayer(i, GameData.NumPlayerAtOnce);
SPlayer[] res = points.GetPlayer(round, GameData.NumPlayerAtOnce);
if (res == null || res.Length < GameData.NumPlayerAtOnce)
return;
for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
results[p].Points += temp[p].Points;
{
players[p].Points += res[p].Points;
players[p].PointsGoldenNotes += res[p].PointsGoldenNotes;
players[p].PointsLineBonus += res[p].PointsLineBonus;
}
}
for (int j = 0; j < GameData.NumPlayerAtOnce; j++)
//Calculate average points
for (int p = 0; p < GameData.NumPlayerAtOnce; p++)
{
results[j].Points = results[j].Points / gamePoints.NumRounds;
GameData.Results[GameData.CurrentRoundNr - 2, j] = (int)Math.Round(results[j].Points);
players[p].Points /= points.NumRounds;
players[p].PointsGoldenNotes /= points.NumRounds;
players[p].PointsLineBonus /= points.NumRounds;
//Save points in GameData
GameData.Results[GameData.CurrentRoundNr - 2, p] = (int)Math.Round(players[p].Points);
}
List<SStats> points = _GetPointsForPlayer(results);
List<SStats> stats = _GetPointsForPlayer(players);
for (int i = 0; i < GameData.NumPlayerAtOnce; i++)
{
//Find matching row in results table
int index = -1;
for (int j = 0; j < GameData.ResultTable.Count; j++)
{
if (points[i].ProfileID == GameData.ResultTable[j].PlayerID)
if (stats[i].ProfileID == GameData.ResultTable[j].PlayerID)
{
index = j;
break;
}
}
if (index != -1)
{
CResultTableRow row = GameData.ResultTable[index];
if (index == -1)
continue;
CResultTableRow row = GameData.ResultTable[index];
row.NumPlayed++;
row.NumWon += points[i].Won;
row.NumSingPoints += points[i].SingPoints;
row.NumGamePoints += points[i].GamePoints;
//Update results entry
row.NumPlayed++;
row.NumWon += stats[i].Won;
row.NumSingPoints += stats[i].SingPoints;
row.NumGamePoints += stats[i].GamePoints;
GameData.ResultTable[index] = row;
}
GameData.ResultTable[index] = row;
}
GameData.ResultTable.Sort();
@@ -20,6 +20,7 @@ using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.InteropServices;
using VocaluxeLib.Game;
using VocaluxeLib.Menu;
using VocaluxeLib.Songs;
@@ -530,13 +531,33 @@ namespace VocaluxeLib.PartyModes.TicTacToe
if (!GameData.Rounds[GameData.FieldNr].Finished)
GameData.CurrentRoundNr++;
CPoints points = CBase.Game.GetPoints();
SPlayer[] results = CBase.Game.GetPlayers();
if (results == null)
if (results == null || results.Length < 2)
return;
if (results.Length < 2)
return;
//Sum up all points
for (int r = 0; r < points.NumRounds; r++)
{
SPlayer[] player = points.GetPlayer(r, 2);
for (int i = 0; i < 2; i++)
{
results[i].Points += player[i].Points;
results[i].PointsGoldenNotes += player[i].PointsGoldenNotes;
results[i].PointsLineBonus += player[i].PointsLineBonus;
}
}
//Calc average of points
for (int i = 0; i < 2; i++)
{
results[i].Points /= points.NumRounds;
results[i].PointsGoldenNotes /= points.NumRounds;
results[i].PointsLineBonus /= points.NumRounds;
}
//Decide who has won
GameData.Rounds[GameData.FieldNr].PointsTeam1 = (int)Math.Round(results[0].Points);
GameData.Rounds[GameData.FieldNr].PointsTeam2 = (int)Math.Round(results[1].Points);
GameData.Rounds[GameData.FieldNr].Finished = true;
@@ -98,6 +98,9 @@ namespace VocaluxeLib.PartyModes.TicTacToe
_CreateFields();
_Buttons[_ButtonField].Visible = false;
_Statics[_StaticAvatarT1].Aspect = EAspect.Crop;
_Statics[_StaticAvatarT2].Aspect = EAspect.Crop;
}
public override bool HandleInput(SKeyEvent keyEvent)
+39 -20
View File
@@ -51,6 +51,7 @@ namespace Vocaluxe.Base
private static Task _PreviewStartHelperTask;
private static int _PreviewStartWaitCounter;
private const int _PreviewStartWaitMaxTries = 10;
private static readonly object _PreviewStartHelperTaskLock = new Object();
public static bool VideoEnabled
{
@@ -256,10 +257,16 @@ namespace Vocaluxe.Base
{
if (_PreviewStartHelperTask != null && ( _PreviewPlayer.Length > 0 || _PreviewStartWaitCounter++ >= _PreviewStartWaitMaxTries))
{
_PreviewStartHelperTask.RunSynchronously(TaskScheduler.FromCurrentSynchronizationContext());
_PreviewStartHelperTask.Dispose();
_PreviewStartHelperTask = null;
_PreviewStartWaitCounter = 0;
lock (_PreviewStartHelperTaskLock)
{
// Recheck the condition as it cloud have change before we got the lock
if (_PreviewStartHelperTask != null && (_PreviewPlayer.Length > 0 || _PreviewStartWaitCounter++ >= _PreviewStartWaitMaxTries))
{
_PreviewStartHelperTask.RunSynchronously(TaskScheduler.FromCurrentSynchronizationContext());
_PreviewStartHelperTask = null;
_PreviewStartWaitCounter = 0;
}
}
}
if (!IsPlaying)
@@ -315,30 +322,42 @@ namespace Vocaluxe.Base
//Change song position only if song is changed or near to end
if (songChanged || _CurPlayer.Position + 30 < _CurPlayer.Length)
if (songChanged || _CurPlayer.Position + 30 < _CurPlayer.Length || _PreviewStartHelperTask == null)
{
_PreviewStartHelperTask = new Task(() =>
lock (_PreviewStartHelperTaskLock)
{
float length = _PreviewPlayer.Length;
if (length < 1)
length = 30; // If length is unknow or invalid assume a length of 30s
_PreviewStartHelperTask = new Task(() =>
{
float length = _PreviewPlayer.Length;
if (length < 1)
length = 30; // If length is unknow or invalid assume a length of 30s
if (start < 0)
start = (song.Preview.Source == EDataSource.None) ? length / 4f : song.Preview.StartTime;
if (start > length - 5f)
start = Math.Max(0f, Math.Min(length / 4f, length - 5f));
if (start >= 0.5f)
start -= 0.5f;
if (start < 0)
start = (song.Preview.Source == EDataSource.None) ? length / 4f : song.Preview.StartTime;
if (start > length - 5f)
start = Math.Max(0f, Math.Min(length / 4f, length - 5f));
if (start >= 0.5f)
start -= 0.5f;
_PreviewPlayer.Position = start;
Play();
});
_PreviewPlayer.Position = start;
Play();
});
}
_CurPlayer = _PreviewPlayer;
}
else
{
_PreviewStartHelperTask.Dispose();
_PreviewStartHelperTask = null;
if (_PreviewStartHelperTask != null)
{
lock (_PreviewStartHelperTaskLock)
{
// Recheck the condition as it cloud have change before we got the lock
if (_PreviewStartHelperTask != null)
{
_PreviewStartHelperTask = null;
}
}
}
_PreviewPlayer.Position = _CurPlayer.Position;
_CurPlayer = _PreviewPlayer;
Play();
+29 -12
View File
@@ -191,13 +191,14 @@ namespace Vocaluxe.Base
public static event OnSongMenuChanged SongMenuChanged;
//Folders
//We need full path for folders for matching folder path with textfile path when loading
public static readonly List<string> SongFolders = new List<string>
{
#if INSTALLER
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs),
CSettings.FolderNameSongs
Path.Combine(CSettings.ProgramFolder, FolderNameSongs)
#elif WIN
CSettings.FolderNameSongs
Path.Combine(CSettings.ProgramFolder, CSettings.FolderNameSongs)
#elif LINUX
Path.Combine(CSettings.DataFolder, CSettings.FolderNameSongs)
#endif
@@ -335,15 +336,8 @@ namespace Vocaluxe.Base
else
Config = xml.DeserializeString<SConfig>("<root />");
if (Config.Game.SongFolder.Length > 0 && Config.Game.SongFolder[0] != "")
{
SongFolders.Clear();
SongFolders.AddRange(Config.Game.SongFolder);
}
else
{
Config.Game.SongFolder = SongFolders.ToArray();
}
NormalizeSongPaths();
if ((Config.Game.ScoreAnimationTime > 0 && Config.Game.ScoreAnimationTime < 1) || Config.Game.ScoreAnimationTime < 0)
Config.Game.ScoreAnimationTime = 1;
@@ -625,6 +619,29 @@ namespace Vocaluxe.Base
return false;
}
/// <summary>
/// Set song path if none is find in config and check if every path exists
/// </summary>
public static void NormalizeSongPaths()
{
//Check if there are configured songfolders
if (Config.Game.SongFolder.Length > 0 && Config.Game.SongFolder[0] != "")
{
SongFolders.Clear();
foreach (string folder in Config.Game.SongFolder)
{
//Check if folder exists
if (Directory.Exists(folder))
SongFolders.Add(Path.GetFullPath(folder));
}
}
//Test if songfolders are still empty or now empty
if(Config.Game.SongFolder.Length == 0)
Config.Game.SongFolder = SongFolders.ToArray();
}
/// <summary>
/// Load command-line-parameters and their values to lists.
/// </summary>
@@ -786,4 +803,4 @@ namespace Vocaluxe.Base
}
}
}
}
}
+24 -3
View File
@@ -822,7 +822,14 @@ namespace Vocaluxe.Base
public void Close(ref CVideoStream stream)
{
CVideo.Close(ref stream);
try
{
CVideo.Close(ref stream);
}
catch (NotSupportedException e)
{
CLog.LogError($"Clould not close the background video: {e.Message}");
}
}
public void SetLoop(CVideoStream stream, bool loop = true)
@@ -832,12 +839,26 @@ namespace Vocaluxe.Base
public void Pause(CVideoStream stream)
{
CVideo.Pause(stream);
try
{
CVideo.Pause(stream);
}
catch (NotSupportedException e)
{
CLog.LogError($"Clould not pause the background video: {e.Message}");
}
}
public void Resume(CVideoStream stream)
{
CVideo.Resume(stream);
try
{
CVideo.Resume(stream);
}
catch (NotSupportedException e)
{
CLog.LogError($"Clould not resume the background video: {e.Message}");
}
}
}
+73
View File
@@ -15,6 +15,7 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using Vocaluxe.Lib.Video;
using VocaluxeLib;
@@ -61,6 +62,10 @@ namespace Vocaluxe.Base
public static CVideoStream Load(string videoFileName)
{
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
return _VideoDecoder.Load(videoFileName);
}
@@ -73,41 +78,109 @@ namespace Vocaluxe.Base
public static float GetLength(CVideoStream stream)
{
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
return _VideoDecoder.GetLength(stream);
}
public static bool GetFrame(CVideoStream stream, float time)
{
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
return _VideoDecoder.GetFrame(stream, time);
}
public static bool Skip(CVideoStream stream, float start, float gap)
{
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
return _VideoDecoder.Skip(stream, start, gap);
}
public static void SetLoop(CVideoStream stream, bool loop)
{
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
_VideoDecoder.SetLoop(stream, loop);
}
public static void Pause(CVideoStream stream)
{
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
_VideoDecoder.Pause(stream);
}
public static void Resume(CVideoStream stream)
{
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
_VideoDecoder.Resume(stream);
}
public static bool Finished(CVideoStream stream)
{
if (stream == null)
{
throw new ArgumentException("stream is null");
}
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
return _VideoDecoder.Finished(stream);
}
public static void Update()
{
if (_VideoDecoder == null)
{
throw new NotSupportedException("_VideoDecoder is null (already closed?)");
}
_VideoDecoder.Update();
}
#endregion Interface
+17 -3
View File
@@ -53,6 +53,10 @@ namespace Vocaluxe.Base
{
_VideoTimer.Reset();
_Finished = false;
if (_VideoStream == null)
{
return;
}
//CVideo.VdSkip(_VideoStream, 0f, 0f);
_VideoTimer.Start();
CVideo.Resume(_VideoStream);
@@ -60,12 +64,19 @@ namespace Vocaluxe.Base
public void Pause()
{
CVideo.Pause(_VideoStream);
if (_VideoStream != null)
{
CVideo.Pause(_VideoStream);
}
_VideoTimer.Stop();
}
public void Resume()
{
if (_VideoStream == null)
{
return;
}
CVideo.Resume(_VideoStream);
_VideoTimer.Start();
}
@@ -92,7 +103,7 @@ namespace Vocaluxe.Base
public void PreLoad()
{
if (!_Loaded)
if (!_Loaded || _VideoStream == null)
{
return;
}
@@ -111,7 +122,10 @@ namespace Vocaluxe.Base
public void Close()
{
CVideo.Close(ref _VideoStream);
if (_VideoStream != null)
{
CVideo.Close(ref _VideoStream);
}
_Loaded = false;
_Finished = false;
_VideoTimer.Reset();
+27 -9
View File
@@ -463,10 +463,19 @@ namespace Vocaluxe.Lib.Database
if (reader != null && reader.HasRows)
{
reader.Read();
artist = reader.GetString(0);
title = reader.GetString(1);
numPlayed = reader.GetInt32(2);
dateAdded = new DateTime(reader.GetInt64(3));
if (!reader.IsDBNull(0))
artist = reader.GetString(0);
if (!reader.IsDBNull(1))
title = reader.GetString(1);
if (!reader.IsDBNull(2))
numPlayed = reader.GetInt32(2);
if (!reader.IsDBNull(3))
dateAdded = new DateTime(reader.GetInt64(3));
reader.Dispose();
return true;
}
@@ -604,7 +613,7 @@ namespace Vocaluxe.Lib.Database
{
//Check for USDX 1.1 DB
_CreateHighscoreDBV1(filePath);
result &= !_ConvertFrom110(filePath);
result &= _ConvertFrom110(filePath);
result &= _UpdateDatabase(1, connection);
result &= _UpdateDatabase(2, connection);
}
@@ -733,13 +742,22 @@ namespace Vocaluxe.Lib.Database
transaction.Commit();
//Delete old tables after conversion
command.CommandText = "DROP TABLE US_Scores;";
command.CommandText = "DROP TABLE IF EXISTS us_scores;";
command.ExecuteNonQuery();
command.CommandText = "DROP TABLE US_Songs;";
command.CommandText = "DROP TABLE IF EXISTS us_songs;";
command.ExecuteNonQuery();
command.CommandText = "DROP TABLE us_statistics_info;";
command.CommandText = "DROP TABLE IF EXISTS us_statistics_info;";
command.ExecuteNonQuery();
command.CommandText = "DROP TABLE IF EXISTS us_users_info;";
command.ExecuteNonQuery();
command.CommandText = "DROP TABLE IF EXISTS us_webs;";
command.ExecuteNonQuery();
command.CommandText = "DROP TABLE IF EXISTS us_webs_stats;";
command.ExecuteNonQuery();
//This versioning is not used in Vocaluxe so reset it to 0
@@ -918,7 +936,7 @@ namespace Vocaluxe.Lib.Database
if (currentVersion < 2)
updated &= _ConvertV1toV2(connection);
if (currentVersion < 3)
else if (currentVersion < 3)
updated &= _ConvertV2toV3(connection);
return updated;
+27 -9
View File
@@ -74,12 +74,23 @@ namespace Vocaluxe.Lib.Sound
}
lock (_Mutex)
{
if (_Disposed)
return;
Debug.Assert(_RefCount > 0);
_RefCount--;
if (_RefCount == 0)
PortAudio.Pa_Terminate();
{
try
{
PortAudio.Pa_Terminate();
}
catch (Exception ex)
{
CLog.LogError(errorText: $"Error disposing PortAudio: {ex.Message}", e: ex);
}
}
_Disposed = true;
}
_Disposed = true;
}
public void Dispose()
@@ -100,11 +111,11 @@ namespace Vocaluxe.Lib.Sound
double sampleRate, uint framesPerBuffer, PortAudio.PaStreamFlags streamFlags,
PortAudio.PaStreamCallbackDelegate streamCallback, IntPtr userData)
{
if (_Disposed)
throw new ObjectDisposedException("PortAudioHandle already disposed");
lock (_Mutex)
{
if (_Disposed)
throw new ObjectDisposedException("PortAudioHandle already disposed");
PortAudio.PaError res = PortAudio.Pa_OpenStream(out stream, ref inputParameters, ref outputParameters, sampleRate, framesPerBuffer, streamFlags, streamCallback,
userData);
if (res == PortAudio.PaError.paNoError)
@@ -157,12 +168,19 @@ namespace Vocaluxe.Lib.Sound
public void CloseStream(IntPtr stream)
{
if (_Disposed)
throw new ObjectDisposedException("PortAudioHandle already disposed");
lock (_Mutex)
{
PortAudio.Pa_CloseStream(stream);
if (_Disposed)
throw new ObjectDisposedException("PortAudioHandle already disposed");
try
{
PortAudio.Pa_CloseStream(stream);
}
catch (Exception ex)
{
CLog.LogError(errorText:$"Error closing stream: {ex.Message}", e:ex);
}
_Streams.Remove(stream);
}
}
@@ -70,14 +70,20 @@ namespace Vocaluxe.Lib.Sound.Playback.GstreamerSharp
{
get
{
if (_Element != null)
if (_Element == null || (_Element.CurrentState == State.Paused && _Element.PendingState != State.VoidPending))
{
long position;
if (!_Element.QueryPosition(Format.Time, out position))
CLog.LogError("Could not query position");
else
_Position = ((float)position / Constants.SECOND);
return _Position;
}
long position;
if (!_Element.QueryPosition(Format.Time, out position))
CLog.LogError("Could not query position");
else
_Position = ((float)position / Constants.SECOND);
return _Position;
}
set
@@ -16,6 +16,8 @@
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using Vocaluxe.Base;
@@ -142,9 +144,13 @@ namespace Vocaluxe.Lib.Sound.Record.PortAudio
foreach (IntPtr handle in _RecHandle)
{
PortAudioSharp.PortAudio.Pa_StopStream(handle);
PortAudioSharp.PortAudio.Pa_CloseStream(handle);
if (handle != IntPtr.Zero)
{
PortAudioSharp.PortAudio.Pa_StopStream(handle);
PortAudioSharp.PortAudio.Pa_CloseStream(handle);
}
}
_RecHandle = new IntPtr[_Devices.Count];
return true;
}
@@ -153,13 +159,17 @@ namespace Vocaluxe.Lib.Sound.Record.PortAudio
/// </summary>
public override void Close()
{
if (_RecHandle != null)
if (_RecHandle != null && _RecHandle.Length > 0)
{
foreach (IntPtr handle in _RecHandle)
{
if (handle != IntPtr.Zero)
{
_PaHandle.CloseStream(handle);
}
}
_RecHandle = new IntPtr[_Devices.Count];
}
if (_PaHandle != null)
{
@@ -429,7 +429,18 @@ namespace Vocaluxe.Lib.Video.Acinerella
private bool _CopyDecodedFrameToBuffer()
{
bool result;
var decoder = (SACDecoder)Marshal.PtrToStructure(_Videodecoder, typeof(SACDecoder));
SACDecoder decoder;
try
{
decoder = (SACDecoder)Marshal.PtrToStructure(_Videodecoder, typeof(SACDecoder));
}
catch (Exception e)
{
CLog.LogError("Couldn't copy the frame to the managed environment.", false, false, e);
return false;
}
if (decoder.Buffer != IntPtr.Zero)
{
_LastDecodedTime = (float)decoder.Timecode;
+98 -1
View File
@@ -285,23 +285,120 @@ namespace Vocaluxe
try
{
CController.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CController)", false, false, e);
}
try
{
CVocaluxeServer.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CVocaluxeServer)", false, false, e);
}
try
{
CGraphics.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CGraphics)", false, false, e);
}
try
{
CThemes.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CThemes)", false, false, e);
}
try
{
CCover.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CCover)", false, false, e);
}
try
{
CFonts.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CFonts)", false, false, e);
}
try
{
CBackgroundMusic.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CBackgroundMusic)", false, false, e);
}
try
{
CWebcam.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CWebcam)", false, false, e);
}
try
{
CDataBase.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CDataBase)", false, false, e);
}
try
{
CVideo.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CVideo)", false, false, e);
}
try
{
CRecord.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CRecord)", false, false, e);
}
try
{
CSound.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown! (CSound)", false, false, e);
}
try
{
CDraw.Close();
}
catch (Exception e)
{
CLog.LogError("Error during shutdown!", false, false, e);
CLog.LogError("Error during shutdown! (CDraw)", false, false, e);
}
GC.Collect(); // Do a GC run here before we close logs to have finalizers run
try
{
+3
View File
@@ -139,6 +139,9 @@ namespace Vocaluxe.Screens
_SetVisibility();
_UpdateRatings();
_SlideShowBG.Visible = _UpdateBackground();
for (int p = 0; p < CGame.NumPlayers; p++)
_Statics[_StaticAvatar[p, CGame.NumPlayers - 1]].Aspect = EAspect.Crop;
}
public override bool UpdateGame()
+31 -32
View File
@@ -201,8 +201,6 @@ namespace Vocaluxe.Screens
CConfig.Config.Theme.PlayerInfo = (EPlayerInfo)mode;
CConfig.SaveConfig();
_SetVisibility();
if (CGame.GetSong() != null)
_SetDuetLyricsVisibility(CGame.GetSong().IsDuet); //make sure duet lyrics remain visible
break;
case Keys.S:
@@ -596,7 +594,6 @@ namespace Vocaluxe.Screens
_DynamicLyricsTop = true;
}
_SetDuetLyricsVisibility(song.IsDuet);
_SetNormalLyricsVisibility();
_TimerSongText.Reset();
@@ -609,37 +606,36 @@ namespace Vocaluxe.Screens
_StartSong();
}
private void _SetDuetLyricsVisibility(bool isDuet)
{
_Statics[_StaticLyricsDuet].Visible = isDuet;
_Lyrics[_LyricMainDuet].Visible = isDuet;
_Lyrics[_LyricSubDuet].Visible = isDuet;
if (isDuet)
{
_Lyrics[_LyricMainTop].Visible = false;
_Lyrics[_LyricSubTop].Visible = false;
_Statics[_StaticLyricsTop].Visible = false;
}
else
{
bool lyricsOnTop = CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_TOP
|| CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTH
|| (CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_DYNAMIC && _DynamicLyricsTop);
_Lyrics[_LyricMainTop].Visible = lyricsOnTop;
_Lyrics[_LyricSubTop].Visible = lyricsOnTop;
_Statics[_StaticLyricsTop].Visible = lyricsOnTop;
}
}
private void _SetNormalLyricsVisibility()
{
bool visible = CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM
bool bottomLyricsVisible = CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTTOM
|| CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTH
|| (CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_DYNAMIC && _DynamicLyricsBottom);
_Lyrics[_LyricMain].Visible = visible;
_Lyrics[_LyricSub].Visible = visible;
_Statics[_StaticLyrics].Visible = visible;
bool topLyricsVisible = CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_TOP
|| CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_BOTH
|| (CConfig.Config.Game.LyricsPosition == ELyricsPosition.TR_CONFIG_LYRICSPOSITION_DYNAMIC && _DynamicLyricsTop);
bool duetLyricsVisible = false;
if (CGame.GetSong() != null && CGame.GetSong().IsDuet)
{
bottomLyricsVisible = true;
topLyricsVisible = false;
duetLyricsVisible = true;
}
_Lyrics[_LyricMain].Visible = bottomLyricsVisible;
_Lyrics[_LyricSub].Visible = bottomLyricsVisible;
_Statics[_StaticLyrics].Visible = bottomLyricsVisible;
_Lyrics[_LyricMainTop].Visible = topLyricsVisible;
_Lyrics[_LyricSubTop].Visible = topLyricsVisible;
_Statics[_StaticLyricsTop].Visible = topLyricsVisible;
_Lyrics[_LyricMainDuet].Visible = duetLyricsVisible;
_Lyrics[_LyricSubDuet].Visible = duetLyricsVisible;
_Statics[_StaticLyricsDuet].Visible = duetLyricsVisible;
}
private void _StartSong()
@@ -655,7 +651,10 @@ namespace Vocaluxe.Screens
{
//Need this to set other songs to points-var
while (!CGame.IsFinished())
{
CGame.NextRound();
CGame.ResetPlayer();
}
_FinishedSinging();
}
@@ -1115,7 +1114,7 @@ namespace Vocaluxe.Screens
}
// sub
if (currentLineSub < lines.Length - 2)
if ((currentLineSub + 1) < lines.Length)
{
float diff = CGame.GetTimeFromBeats(lines[currentLineSub + 1].FirstNoteBeat, song.BPM) - currentTime;
@@ -1372,4 +1371,4 @@ namespace Vocaluxe.Screens
}
}
}
}
}
+2 -2
View File
@@ -1067,7 +1067,7 @@ namespace Vocaluxe.Screens
case ESongSorting.TR_CONFIG_FOLDER:
if (curSelected >= 0 && curSelected < ct - 1 && songs[curSelected].Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase))
start = curSelected + 1;
visibleID = _FindIndex(songs, start, element => element.Folder.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
visibleID = _FindIndex(songs, start, element => element.FolderName.StartsWith(letter.ToString(), StringComparison.OrdinalIgnoreCase));
break;
}
if (visibleID > -1)
@@ -1380,4 +1380,4 @@ namespace Vocaluxe.Screens
}
#endregion Playlist Actions
}
}
}
+6 -7
View File
@@ -31,7 +31,8 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<NuGetPackageImportStamp>3d91144f</NuGetPackageImportStamp>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugWin|x86' ">
<PlatformTarget>x86</PlatformTarget>
@@ -542,12 +543,11 @@
<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="'$(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.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="'$(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.11\build\vocaluxe.dependencies.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets'))" />
<Error Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND !Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets'))" />
<Error Condition="!Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets'))" />
</Target>
<Import Project="..\packages\vocaluxe.dependencies.acinerella.1.0.5\build\vocaluxe.dependencies.acinerella.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.acinerella.1.0.5\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')" />
@@ -556,10 +556,9 @@
<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.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.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.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.11\build\vocaluxe.dependencies.targets" Condition="Exists('..\packages\vocaluxe.dependencies.1.0.11\build\vocaluxe.dependencies.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets" Condition="'$(Configuration)' != 'ReleaseLinux' AND '$(Configuration)' != 'DebugLinux' AND Exists('..\packages\vocaluxe.dependencies.gstreamer.1.0.3\build\vocaluxe.dependencies.gstreamer.targets')" />
<Import Project="..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets" Condition="Exists('..\packages\vocaluxe.dependencies.portaudiosharp.1.0.3\build\vocaluxe.dependencies.portaudiosharp.targets')" />
</Project>
+3 -3
View File
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="vocaluxe.dependencies" version="1.0.11" targetFramework="net40" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net471" />
<package id="vocaluxe.dependencies.acinerella" version="1.0.5" 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.4" targetFramework="net40" />
<package id="vocaluxe.dependencies.gstreamer" version="1.0.2" targetFramework="net40" />
<package id="vocaluxe.dependencies.gstreamer" version="1.0.3" targetFramework="net40" />
<package id="vocaluxe.dependencies.gstreamersharp" version="1.0.1" 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.2" targetFramework="net40" />
<package id="vocaluxe.dependencies.portaudiosharp" version="1.0.3" 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" />
+1 -1
View File
@@ -135,7 +135,7 @@ namespace VocaluxeLib.Menu
MaxRect = button.MaxRect;
Color = button.Color;
SelColor = button.Color;
SelColor = button.SelColor;
Texture = button.Texture;
SelTexture = button.SelTexture;
+12 -3
View File
@@ -15,6 +15,7 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using VocaluxeLib.Draw;
@@ -587,12 +588,15 @@ namespace VocaluxeLib.Menu
}
else
{
_NumPlayerTeams[i] = _NumPlayer;
//Get average num players per teams as default player number
_NumPlayerTeams[i] = _NumPlayer/(_NumTeams - 1);
_NumPlayer += _NumPlayerTeams[i];
_TeamList[i] = new List<int>();
}
}
}
_UpdateButtonState();
_UpdateTeamSlide();
}
public void DecreaseTeamNum()
@@ -603,6 +607,7 @@ namespace VocaluxeLib.Menu
if (_NumTeams - 1 >= _PartyMode.MinTeams)
_NumTeams--;
_UpdateButtonState();
_UpdateTeamSlide();
}
public void IncreasePlayerNum(int team)
@@ -691,16 +696,20 @@ namespace VocaluxeLib.Menu
private void _UpdateTeamSlide()
{
int sel = _SelectSlides[_SelectSlideTeams].Selection;
_SelectSlides[_SelectSlideTeams].Visible = _Teams;
_SelectSlides[_SelectSlideTeams].Clear();
for (int i = 1; i <= _NumTeams; i++)
_SelectSlides[_SelectSlideTeams].AddValue("Team " + i, null, i);
_SelectSlides[_SelectSlideTeams].Selection = Math.Min(sel, _SelectSlides[_SelectSlideTeams].NumValues - 1);
}
private void _UpdateButtonVisibility()
{
_Buttons[_ButtonIncreaseTeams].Visible = _AllowChangePlayerNum && _Teams && _PartyMode.MinTeams != _PartyMode.MaxTeams;
_Buttons[_ButtonDecreaseTeams].Visible = _AllowChangePlayerNum && _Teams && _PartyMode.MinTeams != _PartyMode.MaxTeams;
_Buttons[_ButtonIncreaseTeams].Visible = _AllowChangeTeamNum && _Teams && _PartyMode.MinTeams != _PartyMode.MaxTeams;
_Buttons[_ButtonDecreaseTeams].Visible = _AllowChangeTeamNum && _Teams && _PartyMode.MinTeams != _PartyMode.MaxTeams;
_Buttons[_ButtonIncreasePlayer].Visible = _AllowChangePlayerNum;
_Buttons[_ButtonDecreasePlayer].Visible = _AllowChangePlayerNum;
}
+3 -3
View File
@@ -554,7 +554,7 @@ namespace VocaluxeLib.Menu
break;
case Keys.Enter:
_StartPlaylistSong(_CurrentPlaylistElement);
_StartPlaylistSong(_CurrentPlaylistElement + _Offset);
break;
case Keys.Add: //move the selected song up
@@ -880,7 +880,7 @@ namespace VocaluxeLib.Menu
//Start selected song with double click
if (mouseEvent.LD && _CurrentPlaylistElement != -1)
_StartPlaylistSong(_CurrentPlaylistElement);
_StartPlaylistSong(_CurrentPlaylistElement + _Offset);
//Change order with holding LB
if (mouseEvent.LBH && _CurrentPlaylistElement != -1 && _PlaylistElementContents.Count > 0 && DragAndDropSongID == -1)
@@ -1259,4 +1259,4 @@ namespace VocaluxeLib.Menu
}
#endregion ThemeEdit
}
}
}
+1
View File
@@ -586,6 +586,7 @@ namespace VocaluxeLib.Menu
Text = new CText(0, 0, 0, _TextH, _MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, _TextColor, "T", _PartyModeID),
Img = new CStatic(_PartyModeID)
};
el.Img.Aspect = EAspect.Crop;
_VisibleElements.Add(el);
}
}
+4 -2
View File
@@ -541,7 +541,9 @@ namespace VocaluxeLib.Menu.SongMenu
}
_TextBG.Draw();
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
CTextureRef vidtex = null;
if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
vidtex = (CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null);
if (vidtex != null)
{
@@ -683,4 +685,4 @@ namespace VocaluxeLib.Menu.SongMenu
base.LoadSkin();
}
}
}
}
@@ -515,7 +515,9 @@ namespace VocaluxeLib.Menu.SongMenu
_TextBG.Draw();
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
CTextureRef vidtex = null;
if (CBase.Config.GetVideoPreview() == EOffOn.TR_CONFIG_ON)
vidtex = (CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null);
if (vidtex != null)
{
@@ -638,4 +640,4 @@ namespace VocaluxeLib.Menu.SongMenu
Init();
}
}
}
}
+1 -1
View File
@@ -67,7 +67,7 @@ namespace VocaluxeLib.Profile
{
Avatar = CBase.Profiles.GetAvatarByFilename(value);
if (Avatar == null)
throw new Exception("Avatar '" + value + "' not found");
CBase.Log.LogError("Avatar '" + value + "' not found");
}
}
+3 -3
View File
@@ -9,7 +9,7 @@ platform:
clone_depth: 15
environment:
GitHubKey:
secure: JSlN/em0JdspVn8jwaQ4IjugY6OQi0au4Qq0rhctJmcfGMaEGnUAOmDFULI48REW
secure: sGetWh2XUYs95VBT+QYNPtDW9Rh2/JBuxNNYXytpn7mMudUMcjSKDGErkCTum+ZE
install:
- ps: |
$Env:CurrentCommitSha = "$(git rev-parse --verify HEAD)"
@@ -88,7 +88,7 @@ deploy:
release: $(APPVEYOR_REPO_TAG_NAME)
description: $(APPVEYOR_REPO_COMMIT)
auth_token:
secure: JSlN/em0JdspVn8jwaQ4IjugY6OQi0au4Qq0rhctJmcfGMaEGnUAOmDFULI48REW
secure: sGetWh2XUYs95VBT+QYNPtDW9Rh2/JBuxNNYXytpn7mMudUMcjSKDGErkCTum+ZE
artifact: ReleaseZip
prerelease: $(IS_BETA_RELEASE)
on:
@@ -100,7 +100,7 @@ deploy:
release: Latest Nightly build
description: $(APPVEYOR_REPO_COMMIT)
auth_token:
secure: JSlN/em0JdspVn8jwaQ4IjugY6OQi0au4Qq0rhctJmcfGMaEGnUAOmDFULI48REW
secure: sGetWh2XUYs95VBT+QYNPtDW9Rh2/JBuxNNYXytpn7mMudUMcjSKDGErkCTum+ZE
artifact: ReleaseZip
prerelease: true
on: