Merge pull request #26 from Vocaluxe/release-0.1

merge Release 0.1 branch changes into develop branch
This commit is contained in:
Alexander Eckart committed 2012-03-23 06:56:46 -07:00
commit 47aae18d01
24 files changed
+300 -71

No files matched your search

+12 -12
View File
@@ -386,13 +386,13 @@
<ArrowRightH>40</ArrowRightH>
<!--<Color>: SelectSlide color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>SelectSlideColor</Color>
<Color>Player1Dim</Color>
<!--<SColor>: Selected SelectSlide color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>SelectSlideSColor</SColor>
<SColor>Player1Dim</SColor>
<!--<HColor>: Highlighted SelectSlide color from ColorScheme (high priority)-->
<!--or <HR>, <HG>, <HB>, <HA> (lower priority)-->
<HColor>SelectSlideHColor</HColor>
<HColor>Player1</HColor>
<!--<ArrowColor>: Arrow color from ColorScheme (high priority)-->
<!--or <ArrowR>, <ArrowG>, <ArrowB>, <ArrowA> (lower priority)-->
<ArrowColor>ArrowColor</ArrowColor>
@@ -404,7 +404,7 @@
<TextColor>TextColor</TextColor>
<!--<TextSColor>: Selected text color from ColorScheme (high priority)-->
<!--or <TextSR>, <TextSG>, <TextSB>, <TextSA> (lower priority)-->
<TextSColor>TextSColor</TextSColor>
<TextSColor>Player1</TextSColor>
<!--<TextH>: Text height-->
<TextH>32,00</TextH>
<!--<TextMaxW>: Maximum text width (if exists)-->
@@ -451,13 +451,13 @@
<ArrowRightH>40</ArrowRightH>
<!--<Color>: SelectSlide color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>SelectSlideColor</Color>
<Color>Player2Dim</Color>
<!--<SColor>: Selected SelectSlide color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>SelectSlideSColor</SColor>
<SColor>Player2Dim</SColor>
<!--<HColor>: Highlighted SelectSlide color from ColorScheme (high priority)-->
<!--or <HR>, <HG>, <HB>, <HA> (lower priority)-->
<HColor>SelectSlideHColor</HColor>
<HColor>Player2</HColor>
<!--<ArrowColor>: Arrow color from ColorScheme (high priority)-->
<!--or <ArrowR>, <ArrowG>, <ArrowB>, <ArrowA> (lower priority)-->
<ArrowColor>ArrowColor</ArrowColor>
@@ -469,7 +469,7 @@
<TextColor>TextColor</TextColor>
<!--<TextSColor>: Selected text color from ColorScheme (high priority)-->
<!--or <TextSR>, <TextSG>, <TextSB>, <TextSA> (lower priority)-->
<TextSColor>TextSColor</TextSColor>
<TextSColor>Player2</TextSColor>
<!--<TextH>: Text height-->
<TextH>32,00</TextH>
<!--<TextMaxW>: Maximum text width (if exists)-->
@@ -516,13 +516,13 @@
<ArrowRightH>40</ArrowRightH>
<!--<Color>: SelectSlide color from ColorScheme (high priority)-->
<!--or <R>, <G>, <B>, <A> (lower priority)-->
<Color>SelectSlideColor</Color>
<Color>Player3Dim</Color>
<!--<SColor>: Selected SelectSlide color from ColorScheme (high priority)-->
<!--or <SR>, <SG>, <SB>, <SA> (lower priority)-->
<SColor>SelectSlideSColor</SColor>
<SColor>Player3Dim</SColor>
<!--<HColor>: Highlighted SelectSlide color from ColorScheme (high priority)-->
<!--or <HR>, <HG>, <HB>, <HA> (lower priority)-->
<HColor>SelectSlideHColor</HColor>
<HColor>Player3</HColor>
<!--<ArrowColor>: Arrow color from ColorScheme (high priority)-->
<!--or <ArrowR>, <ArrowG>, <ArrowB>, <ArrowA> (lower priority)-->
<ArrowColor>ArrowColor</ArrowColor>
@@ -534,7 +534,7 @@
<TextColor>TextColor</TextColor>
<!--<TextSColor>: Selected text color from ColorScheme (high priority)-->
<!--or <TextSR>, <TextSG>, <TextSB>, <TextSA> (lower priority)-->
<TextSColor>TextSColor</TextSColor>
<TextSColor>Player3</TextSColor>
<!--<TextH>: Text height-->
<TextH>32,00</TextH>
<!--<TextMaxW>: Maximum text width (if exists)-->
+36
View File
@@ -46,6 +46,42 @@
</Player6>
</Colors>
<ColorSchemes>
<Player1Dim>
<R>0,000</R>
<G>0,000</G>
<B>1,000</B>
<A>0,500</A>
</Player1Dim>
<Player2Dim>
<R>1,000</R>
<G>0,000</G>
<B>0,000</B>
<A>0,500</A>
</Player2Dim>
<Player3Dim>
<R>0,000</R>
<G>1,000</G>
<B>0,000</B>
<A>0,500</A>
</Player3Dim>
<Player4Dim>
<R>0,500</R>
<G>0,000</G>
<B>1,000</B>
<A>0,500</A>
</Player4Dim>
<Player5Dim>
<R>0,000</R>
<G>0,500</G>
<B>1,000</B>
<A>0,500</A>
</Player5Dim>
<Player6Dim>
<R>1,000</R>
<G>0,000</G>
<B>0,500</B>
<A>0,500</A>
</Player6Dim>
<BackgroundColor>
<R>0,000</R>
<G>0,000</G>
+36
View File
@@ -46,6 +46,42 @@
</Player6>
</Colors>
<ColorSchemes>
<Player1Dim>
<R>0,000</R>
<G>0,000</G>
<B>1,000</B>
<A>0,500</A>
</Player1Dim>
<Player2Dim>
<R>1,000</R>
<G>0,000</G>
<B>0,000</B>
<A>0,500</A>
</Player2Dim>
<Player3Dim>
<R>0,000</R>
<G>1,000</G>
<B>0,000</B>
<A>0,500</A>
</Player3Dim>
<Player4Dim>
<R>0,500</R>
<G>0,000</G>
<B>1,000</B>
<A>0,500</A>
</Player4Dim>
<Player5Dim>
<R>0,000</R>
<G>0,500</G>
<B>1,000</B>
<A>0,500</A>
</Player5Dim>
<Player6Dim>
<R>1,000</R>
<G>0,000</G>
<B>0,500</B>
<A>0,500</A>
</Player6Dim>
<BackgroundColor>
<R>0,000</R>
<G>0,000</G>
+36
View File
@@ -46,6 +46,42 @@
</Player6>
</Colors>
<ColorSchemes>
<Player1Dim>
<R>0,000</R>
<G>0,000</G>
<B>1,000</B>
<A>0,500</A>
</Player1Dim>
<Player2Dim>
<R>1,000</R>
<G>0,000</G>
<B>0,000</B>
<A>0,500</A>
</Player2Dim>
<Player3Dim>
<R>0,000</R>
<G>1,000</G>
<B>0,000</B>
<A>0,500</A>
</Player3Dim>
<Player4Dim>
<R>0,500</R>
<G>0,000</G>
<B>1,000</B>
<A>0,500</A>
</Player4Dim>
<Player5Dim>
<R>0,000</R>
<G>0,500</G>
<B>1,000</B>
<A>0,500</A>
</Player5Dim>
<Player6Dim>
<R>1,000</R>
<G>0,000</G>
<B>0,500</B>
<A>0,500</A>
</Player6Dim>
<BackgroundColor>
<R>0,000</R>
<G>0,000</G>
+36
View File
@@ -46,6 +46,42 @@
</Player6>
</Colors>
<ColorSchemes>
<Player1Dim>
<R>0,000</R>
<G>0,000</G>
<B>1,000</B>
<A>0,500</A>
</Player1Dim>
<Player2Dim>
<R>1,000</R>
<G>0,000</G>
<B>0,000</B>
<A>0,500</A>
</Player2Dim>
<Player3Dim>
<R>0,000</R>
<G>1,000</G>
<B>0,000</B>
<A>0,500</A>
</Player3Dim>
<Player4Dim>
<R>0,500</R>
<G>0,000</G>
<B>1,000</B>
<A>0,500</A>
</Player4Dim>
<Player5Dim>
<R>0,000</R>
<G>0,500</G>
<B>1,000</B>
<A>0,500</A>
</Player5Dim>
<Player6Dim>
<R>1,000</R>
<G>0,000</G>
<B>0,500</B>
<A>0,500</A>
</Player6Dim>
<BackgroundColor>
<R>0,000</R>
<G>0,000</G>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+10 -1
View File
@@ -277,6 +277,12 @@ namespace Vocaluxe.Base
#region Graphics
CHelper.TryGetEnumValueFromXML<ERenderer>("//root/Graphics/Renderer", navigator, ref Renderer);
CHelper.TryGetEnumValueFromXML<ETextureQuality>("//root/Graphics/TextureQuality", navigator, ref TextureQuality);
CHelper.TryGetIntValueFromXML("//root/Graphics/CoverSize", navigator, ref CoverSize);
if (CoverSize > 1024)
CoverSize = 1024;
if (CoverSize < 32)
CoverSize = 32;
CHelper.TryGetIntValueFromXML("//root/Graphics/ScreenW", navigator, ref ScreenW);
CHelper.TryGetIntValueFromXML("//root/Graphics/ScreenH", navigator, ref ScreenH);
CHelper.TryGetEnumValueFromXML<EAntiAliasingModes>("//root/Graphics/AAMode", navigator, ref AAMode);
@@ -440,7 +446,10 @@ namespace Vocaluxe.Base
writer.WriteComment("TextureQuality: " + ListStrings(Enum.GetNames(typeof(ETextureQuality))));
writer.WriteElementString("TextureQuality", Enum.GetName(typeof(ETextureQuality), TextureQuality));
writer.WriteComment("CoverSize (pixels): 32, 64, 128, 256, 512, 1024 (default: 128)");
writer.WriteElementString("CoverSize", CoverSize.ToString());
writer.WriteComment("Screen width and height (pixels)");
writer.WriteElementString("ScreenW", ScreenW.ToString());
writer.WriteElementString("ScreenH", ScreenH.ToString());
+30 -2
View File
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Vocaluxe.Base;
using Vocaluxe.Lib.Draw;
@@ -21,11 +22,38 @@ namespace Vocaluxe.Base
case ERenderer.TR_CONFIG_SOFTWARE:
_Draw = new CDrawWinForm();
break;
case ERenderer.TR_CONFIG_OPENGL:
_Draw = new COpenGL();
try
{
_Draw = new COpenGL();
}
catch (Exception e)
{
MessageBox.Show(e.Message + " - Error in initializing of OpenGL. Please check whether" +
" your graphic card drivers are up to date.");
CLog.LogError(e.Message + " - Error in initializing of OpenGL. Please check whether" +
" your graphic card drivers are up to date.");
Environment.Exit(Environment.ExitCode);
}
break;
case ERenderer.TR_CONFIG_DIRECT3D:
_Draw = new CDirect3D();
try
{
_Draw = new CDirect3D();
}
catch (Exception e)
{
MessageBox.Show(e.Message + " - Error in initializing of Direct3D. Please check if " +
"your DirectX redistributables and graphic card drivers are up to date. You can " +
"download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109",
CSettings.sProgramName, MessageBoxButtons.OK, MessageBoxIcon.Error);
CLog.LogError(e.Message + " - Error in initializing of Direct3D. Please check if " +
"your DirectX redistributables and graphic card drivers are up to date. You can " +
"download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109");
Environment.Exit(Environment.ExitCode);
}
break;
default:
+3 -3
View File
@@ -56,7 +56,7 @@ namespace Vocaluxe.Base
private static int _NumErrors;
private static Stopwatch[] _BenchmarkTimer;
private static long nanosecPerTick = (1000L * 1000L * 1000L) / Stopwatch.Frequency;
private static double nanosecPerTick = (1000.0 * 1000.0 * 1000.0) / Stopwatch.Frequency;
public static void Init()
{
@@ -129,8 +129,8 @@ namespace Vocaluxe.Base
}
float ms;
if (Stopwatch.IsHighResolution)
ms = (float)(((double)nanosecPerTick * (double)_BenchmarkTimer[BenchmarkNr].ElapsedTicks) / (1000.0 * 1000.0));
if (Stopwatch.IsHighResolution && nanosecPerTick != 0.0)
ms = (float)((nanosecPerTick * _BenchmarkTimer[BenchmarkNr].ElapsedTicks) / (1000.0 * 1000.0));
else
ms = (float)_BenchmarkTimer[BenchmarkNr].ElapsedMilliseconds;
+1 -1
View File
@@ -246,7 +246,7 @@ namespace Vocaluxe.Base
{
if (ProfileNr < 0 || ProfileNr >= _Profiles.Count)
return false;
return _Profiles[ProfileNr].GuestProfile == EOffOn.TR_CONFIG_ON;
return _Profiles[ProfileNr].Active == EOffOn.TR_CONFIG_ON;
}
public static void SetAvatar(int ProfileNr, int AvatarNr)
+81 -35
View File
@@ -71,12 +71,16 @@ namespace Vocaluxe.Lib.Draw
_VerticesRotationMatrices = new Queue<Matrix>();
_Keys = new CKeys();
_D3D = new Direct3D();
if (_D3D == null)
try
{
MessageBox.Show("No DirectX runtimes were found, please download and install them from http://www.microsoft.com/download/en/details.aspx?id=8109");
CLog.LogError("No DirectX runtimes were found, please download and install them from http://www.microsoft.com/download/en/details.aspx?id=8109");
_D3D = new Direct3D();
}
catch (Direct3D9NotFoundException e)
{
MessageBox.Show("No DirectX runtimes were found, please download and install them " +
"from http://www.microsoft.com/download/en/details.aspx?id=8109",
CSettings.sProgramName, MessageBoxButtons.OK, MessageBoxIcon.Error);
CLog.LogError(e.Message + " - No DirectX runtimes were found, please download and install them from http://www.microsoft.com/download/en/details.aspx?id=8109");
Environment.Exit(Environment.ExitCode);
}
@@ -172,14 +176,29 @@ namespace Vocaluxe.Lib.Draw
flags = CreateFlags.HardwareVertexProcessing;
else
flags = CreateFlags.SoftwareVertexProcessing;
_Device = new Device(_D3D, _D3D.Adapters.DefaultAdapter.Adapter, DeviceType.Hardware, Handle, flags, _PresentParameters);
if (_Device.Disposed || _D3D.Disposed || _Device == null || _D3D == null)
try
{
MessageBox.Show("Something went wrong with device creating, please check if your DirectX redistributables and grafic card drivers are up to date. You can download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109");
CLog.LogError("Something went wrong with device creating, please check if your DirectX redistributables and grafic card drivers are up to date. You can download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109");
_Device = new Device(_D3D, _D3D.Adapters.DefaultAdapter.Adapter, DeviceType.Hardware, Handle, flags, _PresentParameters);
}
catch (Exception e)
{
MessageBox.Show("Something went wrong during device creating, please check if your DirectX redistributables " +
"and graphic card drivers are up to date. You can download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109",
CSettings.sProgramName, MessageBoxButtons.OK, MessageBoxIcon.Error);
CLog.LogError(e.Message + " - Something went wrong during device creating, please check if your DirectX redistributables and grafic card drivers are up to date. You can download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109");
Environment.Exit(Environment.ExitCode);
}
finally
{
if (_Device == null || _Device.Disposed)
{
MessageBox.Show("Something went wrong during device creating, please check if your DirectX redistributables " +
"and graphic card drivers are up to date. You can download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109",
CSettings.sProgramName, MessageBoxButtons.OK, MessageBoxIcon.Error);
CLog.LogError("Something went wrong during device creating, please check if your DirectX redistributables and grafic card drivers are up to date. You can download the DirectX runtimes at http://www.microsoft.com/download/en/details.aspx?id=8109");
Environment.Exit(Environment.ExitCode);
}
}
this.CenterToScreen();
}
@@ -402,25 +421,45 @@ namespace Vocaluxe.Lib.Draw
Matrix translate = Matrix.Translation(new Vector3(-CSettings.iRenderW / 2, CSettings.iRenderH / 2, 0));
Matrix projection = Matrix.OrthoOffCenterLH(-CSettings.iRenderW / 2, CSettings.iRenderW / 2, -CSettings.iRenderH / 2, CSettings.iRenderH / 2, CSettings.zNear, CSettings.zFar);
_VertexBuffer = new VertexBuffer(_Device, CSettings.iVertexBufferElements * (4 * Marshal.SizeOf(typeof(TexturedColoredVertex))), Usage.WriteOnly | Usage.Dynamic, VertexFormat.Position | VertexFormat.Texture1 | VertexFormat.Diffuse, Pool.Default);
_Device.SetStreamSource(0, _VertexBuffer, 0, Marshal.SizeOf(typeof(TexturedColoredVertex)));
if (_Device.SetStreamSource(0, _VertexBuffer, 0, Marshal.SizeOf(typeof(TexturedColoredVertex))).IsFailure)
CLog.LogError("Failed to set stream source");
_Device.VertexDeclaration = TexturedColoredVertex.GetDeclaration(_Device);
_Device.SetTransform(TransformState.Projection, projection);
_Device.SetTransform(TransformState.World, translate);
_Device.SetRenderState(RenderState.CullMode, Cull.None);
_Device.SetRenderState(RenderState.AlphaBlendEnable, true);
_Device.SetRenderState(RenderState.Lighting, false);
_Device.SetRenderState(RenderState.DestinationBlend, Blend.InverseSourceAlpha);
_Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha);
if(_Device.SetTransform(TransformState.Projection, projection).IsFailure)
CLog.LogError("Failed to set orthogonal matrix");
if(_Device.SetTransform(TransformState.World, translate).IsFailure)
CLog.LogError("Failed to set translation matrix");
if(_Device.SetRenderState(RenderState.CullMode, Cull.None).IsFailure)
CLog.LogError("Failed to set cull mode");
if(_Device.SetRenderState(RenderState.AlphaBlendEnable, true).IsFailure)
CLog.LogError("Failed to enable alpha blending");
if(_Device.SetRenderState(RenderState.Lighting, false).IsFailure)
CLog.LogError("Failed to disable lighting");
if(_Device.SetRenderState(RenderState.DestinationBlend, Blend.InverseSourceAlpha).IsFailure)
CLog.LogError("Failed to set destination blend");
if(_Device.SetRenderState(RenderState.SourceBlend, Blend.SourceAlpha).IsFailure)
CLog.LogError("Failed to set source blend");
if (_PresentParameters.Multisample != MultisampleType.None)
_Device.SetRenderState(RenderState.MultisampleAntialias, true);
_Device.SetSamplerState(0, SamplerState.MinFilter, TextureFilter.Linear);
_Device.SetSamplerState(0, SamplerState.MagFilter, TextureFilter.Linear);
_Device.SetSamplerState(0, SamplerState.MipFilter, TextureFilter.Linear);
_Device.SetSamplerState(0, SamplerState.AddressU, TextureAddress.Clamp);
_Device.SetSamplerState(0, SamplerState.AddressV, TextureAddress.Clamp);
_Device.SetTextureStageState(0, TextureStage.AlphaArg1, TextureArgument.Texture);
_Device.SetTextureStageState(0, TextureStage.AlphaArg2, TextureArgument.Diffuse);
_Device.SetTextureStageState(0, TextureStage.AlphaOperation, TextureOperation.Modulate);
{
if(_Device.SetRenderState(RenderState.MultisampleAntialias, true).IsFailure)
CLog.LogError("Failed to set antialiasing");
}
if(_Device.SetSamplerState(0, SamplerState.MinFilter, TextureFilter.Linear).IsFailure)
CLog.LogError("Failed to set min filter");
if(_Device.SetSamplerState(0, SamplerState.MagFilter, TextureFilter.Linear).IsFailure)
CLog.LogError("Failed to set mag filter");
if(_Device.SetSamplerState(0, SamplerState.MipFilter, TextureFilter.Linear).IsFailure)
CLog.LogError("Failed to set mip filter");
if(_Device.SetSamplerState(0, SamplerState.AddressU, TextureAddress.Clamp).IsFailure)
CLog.LogError("Failed to set clamping on u");
if(_Device.SetSamplerState(0, SamplerState.AddressV, TextureAddress.Clamp).IsFailure)
CLog.LogError("Failed to set claming on v");
if(_Device.SetTextureStageState(0, TextureStage.AlphaArg1, TextureArgument.Texture).IsFailure)
CLog.LogError("Failed to set alpha argument 1");
if(_Device.SetTextureStageState(0, TextureStage.AlphaArg2, TextureArgument.Diffuse).IsFailure)
CLog.LogError("Failed to set alpha argument 2");
if(_Device.SetTextureStageState(0, TextureStage.AlphaOperation, TextureOperation.Modulate).IsFailure)
CLog.LogError("Failed to set alpha operation");
Int16[] indices = new Int16[6];
indices[0] = 0;
@@ -430,7 +469,7 @@ namespace Vocaluxe.Lib.Draw
indices[4] = 2;
indices[5] = 3;
_IndexBuffer = new IndexBuffer(_Device, 6 * sizeof(int), Usage.WriteOnly, Pool.Managed, true);
_IndexBuffer = new IndexBuffer(_Device, 6 * sizeof(Int16), Usage.WriteOnly, Pool.Managed, true);
DataStream stream = _IndexBuffer.Lock(0, 0, LockFlags.None);
stream.WriteRange(indices);
@@ -475,12 +514,14 @@ namespace Vocaluxe.Lib.Draw
//Clear the previous Frame
ClearScreen();
//We want to begin drawing
_Device.BeginScene();
if (_Device.BeginScene().IsFailure)
CLog.LogError("Failed to begin scene");
CheckQueque();
_Run = _Run && CGraphics.Draw();
RenderVertexBuffer();
//We finished drawing the frame
_Device.EndScene();
if (_Device.EndScene().IsFailure)
CLog.LogError("Failed to end scene");
_Run = CGraphics.UpdateGameLogic(_Keys, _Mouse);
try
{
@@ -530,7 +571,8 @@ namespace Vocaluxe.Lib.Draw
TexturedColoredVertex.GetDeclaration(_Device).Dispose();
_VertexBuffer.Dispose();
_IndexBuffer.Dispose();
_Device.Reset(_PresentParameters);
if (_Device.Reset(_PresentParameters).IsFailure)
CLog.LogError("Failed to reset the device");
}
/// <summary>
@@ -630,11 +672,14 @@ namespace Vocaluxe.Lib.Draw
for (int i = 0; i < _Vertices.Count; i += 4)
{
//Apply rotation
_Device.SetTransform(TransformState.World, _VerticesRotationMatrices.Dequeue());
if (_Device.SetTransform(TransformState.World, _VerticesRotationMatrices.Dequeue()).IsFailure)
CLog.LogError("Failed to set world transformation");
//Apply texture
_Device.SetTexture(0, _VerticesTextures.Dequeue());
if (_Device.SetTexture(0, _VerticesTextures.Dequeue()).IsFailure)
CLog.LogError("Failed to set texture");
//Draw 2 triangles from vertexbuffer
_Device.DrawIndexedPrimitives(PrimitiveType.TriangleList, i, 0, 4, 0, 2);
if (_Device.DrawIndexedPrimitives(PrimitiveType.TriangleList, i, 0, 4, 0, 2).IsFailure)
CLog.LogError("Failed to draw quad");
}
//Clear the queues for the next frame
_Vertices.Clear();
@@ -651,7 +696,8 @@ namespace Vocaluxe.Lib.Draw
/// </summary>
public void ClearScreen()
{
_Device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0);
if (_Device.Clear(ClearFlags.Target | ClearFlags.ZBuffer, Color.Black, 1.0f, 0).IsFailure)
CLog.LogError("Failed to clear the backbuffer");
}
/// <summary>
+3 -6
View File
@@ -394,14 +394,12 @@ namespace Vocaluxe.Lib.Video
#region Threading
private void DoSkip()
{
string extension = Path.GetExtension(_FileName); //just a workaround for the mkv-search-bug in ffmpeg
{
_VideoSkipTime = _Gap;
_SkipTime = _Start + _Gap;
_BeforeLoop = false;
if (_SkipTime > 0 && extension != ".mkv")
if (_SkipTime > 0)
{
_VideoDecoderTime = _SkipTime;
try
@@ -419,8 +417,7 @@ namespace Vocaluxe.Lib.Video
_VideoDecoderTime = 0f;
try
{
if (extension != ".mkv")
CAcinerella.ac_seek(_videodecoder, -1, (Int64)0);
CAcinerella.ac_seek(_videodecoder, -1, (Int64)0);
}
catch (Exception e)
{
+13
View File
@@ -525,6 +525,19 @@ namespace Vocaluxe.Menu
_Textures[selection] = NewTexture;
}
public bool SetSelectionByValueIndex(int ValueIndex)
{
for (int i = 0; i < _ValueIndexes.Count; i++)
{
if (_ValueIndexes[i] == ValueIndex)
{
Selection = i;
return true;
}
}
return false;
}
public bool NextValue()
{
if (Selection < _ValueNames.Count - 1)
+1 -9
View File
@@ -223,15 +223,7 @@ namespace Vocaluxe.Screens
for (int p = 0; p < player.Length; p++)
{
bool guest = true;
if (player[p].ProfileID >= 0 && player[p].ProfileID < CProfiles.NumProfiles)
{
if (CProfiles.Profiles[player[p].ProfileID].GuestProfile == EOffOn.TR_CONFIG_OFF)
guest = false;
}
if (player[p].Points > CSettings.MinScoreForDB && player[p].SongFinished && !guest)
if (player[p].Points > CSettings.MinScoreForDB && player[p].SongFinished && !CProfiles.IsGuestProfile(p))
_NewEntryIDs.Add(CDataBase.AddScore(player[p]));
}
}
+2 -2
View File
@@ -177,12 +177,12 @@ namespace Vocaluxe.Screens
Texts[htTexts(TextCategory)].Text = CSongs.GetActualCategoryName();
int song = SongMenus[htSongMenus(SongMenu)].GetActualSelection();
if ((CSongs.Category >= 0) && (song >= 0) && song < CSongs.VisibleSongs.Length)
if ((CSongs.Category >= 0 || CConfig.Tabs == EOffOn.TR_CONFIG_OFF) && song >= 0 && song < CSongs.VisibleSongs.Length)
{
Texts[htTexts(TextSelection)].Text = CSongs.VisibleSongs[song].Artist + " - " + CSongs.VisibleSongs[song].Title;
CBackgroundMusic.Pause();
}
else if ((CSongs.Category == -1) && (song >= 0) && song < CSongs.Categories.Length)
else if (CSongs.Category == -1 && song >= 0 && song < CSongs.Categories.Length)
{
Texts[htTexts(TextSelection)].Text = CSongs.Categories[song].Name;
CBackgroundMusic.Play();