Remove pointless Timer
Make GetPlayerColor more consistent
This commit is contained in:
1 parent
5787839b95
commit
5b478a185e
2 files changed
+2
-22
No files matched your search
+2
-11
@@ -789,14 +789,8 @@ namespace Vocaluxe.Base
|
|||||||
|
|
||||||
public static SColorF GetPlayerColor(int playerNr)
|
public static SColorF GetPlayerColor(int playerNr)
|
||||||
{
|
{
|
||||||
var color = new SColorF(1f, 1f, 1f, 1f);
|
bool dummy;
|
||||||
|
return GetPlayerColor(playerNr, out dummy);
|
||||||
int skinIndex = GetSkinIndex(-1);
|
|
||||||
|
|
||||||
if (_Skins[skinIndex].ThemeColors.Player.Length < playerNr)
|
|
||||||
return color;
|
|
||||||
|
|
||||||
return _Skins[skinIndex].ThemeColors.Player[playerNr - 1];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static SColorF GetPlayerColor(string playerNrString)
|
public static SColorF GetPlayerColor(string playerNrString)
|
||||||
@@ -823,9 +817,6 @@ namespace Vocaluxe.Base
|
|||||||
{
|
{
|
||||||
success = false;
|
success = false;
|
||||||
|
|
||||||
if (_Skins[skinIndex].PartyModeID != -1)
|
|
||||||
skinIndex = GetSkinIndex(-1);
|
|
||||||
|
|
||||||
if (_Skins[skinIndex].ThemeColors.Player.Length < playerNr || playerNr < 1)
|
if (_Skins[skinIndex].ThemeColors.Player.Length < playerNr || playerNr < 1)
|
||||||
return new SColorF(1f, 1f, 1f, 1f);
|
return new SColorF(1f, 1f, 1f, 1f);
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
using System.Diagnostics;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using Vocaluxe.Base;
|
using Vocaluxe.Base;
|
||||||
@@ -38,7 +37,6 @@ namespace Vocaluxe.Screens
|
|||||||
private readonly string[] _IntroVideo = new string[] {"IntroIn", "IntroMid", "IntroOut"};
|
private readonly string[] _IntroVideo = new string[] {"IntroIn", "IntroMid", "IntroOut"};
|
||||||
|
|
||||||
private Thread _SongLoaderThread;
|
private Thread _SongLoaderThread;
|
||||||
private Stopwatch _Timer;
|
|
||||||
private bool _SkipIntro;
|
private bool _SkipIntro;
|
||||||
private int _CurrentIntroVideoNr;
|
private int _CurrentIntroVideoNr;
|
||||||
private bool _IntroOutPlayed;
|
private bool _IntroOutPlayed;
|
||||||
@@ -54,7 +52,6 @@ namespace Vocaluxe.Screens
|
|||||||
_Intros = new CVideoPlayer[_IntroVideo.Length];
|
_Intros = new CVideoPlayer[_IntroVideo.Length];
|
||||||
for (int i = 0; i < _Intros.Length; i++)
|
for (int i = 0; i < _Intros.Length; i++)
|
||||||
_Intros[i] = new CVideoPlayer();
|
_Intros[i] = new CVideoPlayer();
|
||||||
_Timer = new Stopwatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool HandleInput(SKeyEvent keyEvent)
|
public override bool HandleInput(SKeyEvent keyEvent)
|
||||||
@@ -135,7 +132,6 @@ namespace Vocaluxe.Screens
|
|||||||
CLog.StartBenchmark(0, "Load Songs Full");
|
CLog.StartBenchmark(0, "Load Songs Full");
|
||||||
_SongLoaderThread.IsBackground = true;
|
_SongLoaderThread.IsBackground = true;
|
||||||
_SongLoaderThread.Start();
|
_SongLoaderThread.Start();
|
||||||
_Timer.Start();
|
|
||||||
|
|
||||||
if (CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON &&
|
if (CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON &&
|
||||||
CConfig.BackgroundMusicSource == EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC && !_BGMusicStarted)
|
CConfig.BackgroundMusicSource == EBackgroundMusicSource.TR_CONFIG_NO_OWN_MUSIC && !_BGMusicStarted)
|
||||||
@@ -155,11 +151,6 @@ namespace Vocaluxe.Screens
|
|||||||
{
|
{
|
||||||
_CheckStartIntroVideos();
|
_CheckStartIntroVideos();
|
||||||
|
|
||||||
if (CSettings.GameState == EGameState.EditTheme)
|
|
||||||
_Timer.Stop();
|
|
||||||
else
|
|
||||||
_Timer.Start();
|
|
||||||
|
|
||||||
bool next = CConfig.CoverLoading != ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART || CSongs.CoverLoaded;
|
bool next = CConfig.CoverLoading != ECoverLoading.TR_CONFIG_COVERLOADING_ATSTART || CSongs.CoverLoaded;
|
||||||
|
|
||||||
if ((_IntroOutPlayed || _SkipIntro) && next && CSettings.GameState != EGameState.EditTheme && CSongs.SongsLoaded)
|
if ((_IntroOutPlayed || _SkipIntro) && next && CSettings.GameState != EGameState.EditTheme && CSongs.SongsLoaded)
|
||||||
@@ -201,8 +192,6 @@ namespace Vocaluxe.Screens
|
|||||||
public override void OnClose()
|
public override void OnClose()
|
||||||
{
|
{
|
||||||
base.OnClose();
|
base.OnClose();
|
||||||
_Timer.Stop();
|
|
||||||
_Timer.Reset();
|
|
||||||
|
|
||||||
foreach (CVideoPlayer videoPlayer in _Intros)
|
foreach (CVideoPlayer videoPlayer in _Intros)
|
||||||
videoPlayer.Close();
|
videoPlayer.Close();
|
||||||
|
|||||||
Reference in new issue
Block a user