Remove pointless Timer

Make GetPlayerColor more consistent
This commit is contained in:
Flamefire committed 2014-03-10 21:13:03 +01:00
1 parent 5787839b95
commit 5b478a185e
2 files changed
+2 -22

No files matched your search

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