Merge branch 'Better_Graphics_Handling' into develop
Conflicts: Vocaluxe/Base/CBackgroundMusic.cs Vocaluxe/Base/CCover.cs Vocaluxe/Base/CDataBase.cs Vocaluxe/Base/CDraw.cs Vocaluxe/Base/CMain.cs Vocaluxe/Base/CProfiles.cs Vocaluxe/Base/CTheme.cs Vocaluxe/Base/CVideo.cs Vocaluxe/Base/CWebcam.cs Vocaluxe/Base/Fonts/CFont.cs Vocaluxe/Base/Fonts/CGlyph.cs Vocaluxe/Lib/Draw/CDirect3D.cs Vocaluxe/Lib/Draw/CDrawWinForm.cs Vocaluxe/Lib/Draw/COpenGL.cs Vocaluxe/Lib/Draw/IDraw.cs Vocaluxe/Lib/Video/CVideoDecoder.cs Vocaluxe/Lib/Video/CVideoDecoderFFmpeg.cs Vocaluxe/Lib/Video/CVideoDecoderGstreamer.cs Vocaluxe/Lib/Video/IVideoDecoder.cs Vocaluxe/Lib/Webcam/CAForgeNet.cs Vocaluxe/Lib/Webcam/IWebcam.cs Vocaluxe/Screens/CScreenCredits.cs Vocaluxe/Screens/CScreenNames.cs Vocaluxe/Screens/CScreenOptionsVideo.cs Vocaluxe/Screens/CScreenProfiles.cs Vocaluxe/Screens/CScreenSing.cs VocaluxeLib/Menu/IMenu.cs VocaluxeLib/Songs/CCategory.cs VocaluxeLib/Songs/CSong.cs VocaluxeLib/Structs.cs VocaluxeLib/VocaluxeLib.csproj
This commit is contained in:
commit
9d13c32b93
56 files changed
+1579
-1772
No files matched your search
@@ -21,6 +21,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Xml;
|
||||
using VocaluxeLib.Draw;
|
||||
|
||||
using VocaluxeLib.Songs;
|
||||
|
||||
@@ -386,9 +387,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_PlayerNotes[n].Rect.Z
|
||||
);
|
||||
|
||||
float f = 0.7f;
|
||||
if (!note.Hit)
|
||||
f = 0.4f;
|
||||
float f = (note.Hit) ? 0.7f : 0.4f;
|
||||
|
||||
_DrawNote(rect, color, f);
|
||||
|
||||
@@ -471,39 +470,31 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
|
||||
private void _DrawNote(SRectF rect, SColorF color, float factor = 1f)
|
||||
{
|
||||
const int spacing = 0;
|
||||
if (factor <= 0)
|
||||
return;
|
||||
|
||||
float d = (1f - factor) / 2 * rect.H;
|
||||
float dw = d;
|
||||
float dh = (1f - factor) * rect.H / 2;
|
||||
float dw = Math.Min(dh, rect.W / 2);
|
||||
|
||||
if (2 * dw > rect.W)
|
||||
dw = rect.W / 2;
|
||||
SRectF noteRect = new SRectF(rect.X + dw, rect.Y + dh, rect.W - 2 * dw, rect.H - 2 * dh, rect.Z);
|
||||
|
||||
SRectF r = new SRectF(
|
||||
rect.X + dw + spacing,
|
||||
rect.Y + d + spacing,
|
||||
rect.W - 2 * dw - 2 * spacing,
|
||||
rect.H - 2 * d - 2 * spacing,
|
||||
rect.Z
|
||||
);
|
||||
CTexture noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
CTexture noteMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID);
|
||||
CTexture noteEnd = CBase.Theme.GetSkinTexture(_Theme.SkinRightName, _PartyModeID);
|
||||
|
||||
STexture noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
STexture noteMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID);
|
||||
STexture noteEnd = CBase.Theme.GetSkinTexture(_Theme.SkinRightName, _PartyModeID);
|
||||
//Width of each of the ends (round parts)
|
||||
//Need 2 of them so use minimum
|
||||
float endsW = Math.Min(noteRect.H * noteBegin.OrigAspect, noteRect.W / 2);
|
||||
|
||||
float dx = noteBegin.Width * r.H / noteBegin.Height;
|
||||
if (2 * dx > r.W)
|
||||
dx = r.W / 2;
|
||||
CBase.Drawing.DrawTexture(noteBegin, new SRectF(noteRect.X, noteRect.Y, endsW, noteRect.H, noteRect.Z), color);
|
||||
|
||||
|
||||
CBase.Drawing.DrawTexture(noteBegin, new SRectF(r.X, r.Y, dx, r.H, r.Z), color);
|
||||
|
||||
if (r.W - 2 * dx >= 2 * dx)
|
||||
CBase.Drawing.DrawTexture(noteMiddle, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z), color);
|
||||
SRectF middleRect = new SRectF(noteRect.X + endsW, noteRect.Y, noteRect.W - 2 * endsW, noteRect.H, noteRect.Z);
|
||||
if (noteRect.W >= 4 * endsW)
|
||||
CBase.Drawing.DrawTexture(noteMiddle, middleRect, color);
|
||||
else
|
||||
CBase.Drawing.DrawTexture(noteMiddle, new SRectF(r.X + dx, r.Y, 2 * dx, r.H, r.Z), color, new SRectF(r.X + dx, r.Y, r.W - 2 * dx, r.H, r.Z));
|
||||
CBase.Drawing.DrawTexture(noteMiddle, new SRectF(middleRect.X, middleRect.Y, 2 * endsW, middleRect.H, middleRect.Z), color, middleRect);
|
||||
|
||||
CBase.Drawing.DrawTexture(noteEnd, new SRectF(r.X + r.W - dx, r.Y, dx, r.H, r.Z), color);
|
||||
CBase.Drawing.DrawTexture(noteEnd, new SRectF(noteRect.X + noteRect.W - endsW, noteRect.Y, endsW, noteRect.H, noteRect.Z), color);
|
||||
}
|
||||
|
||||
private void _DrawNoteBG(SRectF rect, SColorF color, float factor, Stopwatch timer)
|
||||
@@ -534,11 +525,11 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
rect.Z
|
||||
);
|
||||
|
||||
STexture noteBackgroundBegin = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID);
|
||||
STexture noteBackgroundMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID);
|
||||
STexture noteBackgroundEnd = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID);
|
||||
CTexture noteBackgroundBegin = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID);
|
||||
CTexture noteBackgroundMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID);
|
||||
CTexture noteBackgroundEnd = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID);
|
||||
|
||||
float dx = noteBackgroundBegin.Width * r.H / noteBackgroundBegin.Height;
|
||||
float dx = r.H * noteBackgroundBegin.OrigAspect;
|
||||
if (2 * dx > r.W)
|
||||
dx = r.W / 2;
|
||||
|
||||
@@ -629,8 +620,8 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
rect.Z
|
||||
);
|
||||
|
||||
STexture noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
float dx = noteBegin.Width * r.H / noteBegin.Height;
|
||||
CTexture noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
float dx = r.H * noteBegin.OrigAspect;
|
||||
if (2 * dx > r.W)
|
||||
dx = r.W / 2;
|
||||
|
||||
@@ -686,7 +677,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_PlayerNotes[n].Color.B,
|
||||
_PlayerNotes[n].Color.A * _PlayerNotes[n].Alpha);
|
||||
|
||||
STexture toneHelper = CBase.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
|
||||
CTexture toneHelper = CBase.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
|
||||
CBase.Drawing.DrawTexture(toneHelper, drawRect, color);
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user