diff --git a/Output/Themes/Ambient.xml b/Output/Themes/Ambient.xml index 91b0c674..e8260cf9 100644 --- a/Output/Themes/Ambient.xml +++ b/Output/Themes/Ambient.xml @@ -1,6 +1,6 @@  - 5 + 6 Ambient bohning diff --git a/Output/Themes/Ambient/Screens/ScreenSing.xml b/Output/Themes/Ambient/Screens/ScreenSing.xml index ed9bcb15..06f591c9 100644 --- a/Output/Themes/Ambient/Screens/ScreenSing.xml +++ b/Output/Themes/Ambient/Screens/ScreenSing.xml @@ -2,7 +2,7 @@ ScreenSing - 7 + 8 @@ -1696,6 +1696,9 @@ NoteLeft NoteMiddle NoteRight + NoteFillLeft + NoteFillMiddle + NoteFillRight NoteBackgroundLeft NoteBackgroundMiddle NoteBackgroundRight diff --git a/Output/Themes/Ambient/Skin Blue.xml b/Output/Themes/Ambient/Skin Blue.xml index b1ab5aa9..88edeb74 100644 --- a/Output/Themes/Ambient/Skin Blue.xml +++ b/Output/Themes/Ambient/Skin Blue.xml @@ -44,6 +44,18 @@ 0.500 1.000 + + 0.675 + 0.890 + 0.969 + 0.500 + + + 0.675 + 0.890 + 0.969 + 1.000 + 0.000 0.000 @@ -219,6 +231,9 @@ notes_left.png notes_mid.png notes_right.png + notes_fill_left.png + notes_fill_mid.png + notes_fill_right.png notes_bg_left.png notes_bg_mid.png notes_bg_right.png diff --git a/Output/Themes/Ambient/Skin Green.xml b/Output/Themes/Ambient/Skin Green.xml index 3b6e3ba8..d946ab0a 100644 --- a/Output/Themes/Ambient/Skin Green.xml +++ b/Output/Themes/Ambient/Skin Green.xml @@ -44,6 +44,18 @@ 0.500 1.000 + + 0.709 + 0.968 + 0.674 + 0.500 + + + 0.709 + 0.968 + 0.674 + 1.000 + 0.000 0.750 @@ -213,6 +225,9 @@ notes_left.png notes_mid.png notes_right.png + notes_fill_left.png + notes_fill_mid.png + notes_fill_right.png notes_bg_left.png notes_bg_mid.png notes_bg_right.png diff --git a/Output/Themes/Ambient/Skin Red.xml b/Output/Themes/Ambient/Skin Red.xml index 0f65931e..b55dd210 100644 --- a/Output/Themes/Ambient/Skin Red.xml +++ b/Output/Themes/Ambient/Skin Red.xml @@ -44,6 +44,18 @@ 0.500 1.000 + + 0.968 + 0.674 + 0.674 + 0.500 + + + 0.968 + 0.674 + 0.674 + 1.000 + 0.750 0.000 @@ -213,6 +225,9 @@ notes_left.png notes_mid.png notes_right.png + notes_fill_left.png + notes_fill_mid.png + notes_fill_right.png notes_bg_left.png notes_bg_mid.png notes_bg_right.png diff --git a/Output/Themes/Ambient/Skin Yellow.xml b/Output/Themes/Ambient/Skin Yellow.xml index 48c2176b..d1a53735 100644 --- a/Output/Themes/Ambient/Skin Yellow.xml +++ b/Output/Themes/Ambient/Skin Yellow.xml @@ -44,6 +44,18 @@ 0.500 1.000 + + 0.968 + 0.956 + 0.674 + 0.500 + + + 0.968 + 0.956 + 0.674 + 1.000 + 0.750 0.750 @@ -213,6 +225,9 @@ notes_left.png notes_mid.png notes_right.png + notes_fill_left.png + notes_fill_mid.png + notes_fill_right.png notes_bg_left.png notes_bg_mid.png notes_bg_right.png diff --git a/Output/Themes/Ambient/notes_bg_left.png b/Output/Themes/Ambient/notes_bg_left.png index 14dee215..3a8e040f 100644 Binary files a/Output/Themes/Ambient/notes_bg_left.png and b/Output/Themes/Ambient/notes_bg_left.png differ diff --git a/Output/Themes/Ambient/notes_bg_mid.png b/Output/Themes/Ambient/notes_bg_mid.png index 4161d17b..04240079 100644 Binary files a/Output/Themes/Ambient/notes_bg_mid.png and b/Output/Themes/Ambient/notes_bg_mid.png differ diff --git a/Output/Themes/Ambient/notes_bg_right.png b/Output/Themes/Ambient/notes_bg_right.png index fd3fb69a..1ef6a69f 100644 Binary files a/Output/Themes/Ambient/notes_bg_right.png and b/Output/Themes/Ambient/notes_bg_right.png differ diff --git a/Output/Themes/Ambient/notes_fill_left.png b/Output/Themes/Ambient/notes_fill_left.png new file mode 100644 index 00000000..1e42f00f Binary files /dev/null and b/Output/Themes/Ambient/notes_fill_left.png differ diff --git a/Output/Themes/Ambient/notes_fill_mid.png b/Output/Themes/Ambient/notes_fill_mid.png new file mode 100644 index 00000000..4dff7a19 Binary files /dev/null and b/Output/Themes/Ambient/notes_fill_mid.png differ diff --git a/Output/Themes/Ambient/notes_fill_right.png b/Output/Themes/Ambient/notes_fill_right.png new file mode 100644 index 00000000..5ebcb958 Binary files /dev/null and b/Output/Themes/Ambient/notes_fill_right.png differ diff --git a/Output/Themes/Ambient/notes_left.png b/Output/Themes/Ambient/notes_left.png index 310c7e87..ce74a2d1 100644 Binary files a/Output/Themes/Ambient/notes_left.png and b/Output/Themes/Ambient/notes_left.png differ diff --git a/Output/Themes/Ambient/notes_mid.png b/Output/Themes/Ambient/notes_mid.png index ddf450c1..46ff67cd 100644 Binary files a/Output/Themes/Ambient/notes_mid.png and b/Output/Themes/Ambient/notes_mid.png differ diff --git a/Output/Themes/Ambient/notes_right.png b/Output/Themes/Ambient/notes_right.png index 681b4aa4..290018e2 100644 Binary files a/Output/Themes/Ambient/notes_right.png and b/Output/Themes/Ambient/notes_right.png differ diff --git a/Output/Themes/Changelog/Changelog_ScreenSing.txt b/Output/Themes/Changelog/Changelog_ScreenSing.txt index dd1ef423..3d735b97 100644 --- a/Output/Themes/Changelog/Changelog_ScreenSing.txt +++ b/Output/Themes/Changelog/Changelog_ScreenSing.txt @@ -1,5 +1,15 @@ ScreenSing ++++++++++ +Version 8 + +Add: + + + + +Skins for separated note fill graphics + +++++++++ Version 7 diff --git a/Output/Themes/Changelog/Changelog_SkinSystem.txt b/Output/Themes/Changelog/Changelog_SkinSystem.txt index ce2085ae..41b5d672 100644 --- a/Output/Themes/Changelog/Changelog_SkinSystem.txt +++ b/Output/Themes/Changelog/Changelog_SkinSystem.txt @@ -12,9 +12,6 @@ Added videos: -++++++++++ - - ++++++++++ Version 2: diff --git a/Output/Themes/Changelog/Changelog_ThemeSystem.txt b/Output/Themes/Changelog/Changelog_ThemeSystem.txt index fceb7c3f..16b3e6b1 100644 --- a/Output/Themes/Changelog/Changelog_ThemeSystem.txt +++ b/Output/Themes/Changelog/Changelog_ThemeSystem.txt @@ -1,5 +1,14 @@ Theme System +++++++++++ +Version 6 +Added to : + + + + +Changed: +Graphics handling of notes - background, base and fill of notes will be layered on each other without any resizing differences between the textures. ++++++++++ Version 5 (yes it's still 5!): diff --git a/Vocaluxe/Base/ThemeSystem/CTheme.cs b/Vocaluxe/Base/ThemeSystem/CTheme.cs index 94c9433f..ef37438e 100644 --- a/Vocaluxe/Base/ThemeSystem/CTheme.cs +++ b/Vocaluxe/Base/ThemeSystem/CTheme.cs @@ -28,7 +28,7 @@ namespace Vocaluxe.Base.ThemeSystem abstract class CTheme { // Version number for theme files. Increment it, if you've changed something on the theme files! - private const int _ThemeSystemVersion = 5; + private const int _ThemeSystemVersion = 6; protected STheme _Data; public String Name diff --git a/VocaluxeLib/Menu/SingNotes/CNoteBars.cs b/VocaluxeLib/Menu/SingNotes/CNoteBars.cs index ba296f94..fcf52e20 100644 --- a/VocaluxeLib/Menu/SingNotes/CNoteBars.cs +++ b/VocaluxeLib/Menu/SingNotes/CNoteBars.cs @@ -32,6 +32,8 @@ namespace VocaluxeLib.Menu.SingNotes private readonly int _Player; public readonly SRectF Rect; private readonly SColorF _Color; + private readonly SColorF _NoteLinesColor; + private readonly SColorF _NoteBaseColor; public float Alpha = 1; private readonly CSongLine[] _Lines; @@ -61,6 +63,12 @@ namespace VocaluxeLib.Menu.SingNotes _Color = CBase.Themes.GetPlayerColor(player + 1); + if (!CBase.Themes.GetColor("NoteLinesColor", _PartyModeID, out _NoteLinesColor)) + _NoteLinesColor = new SColorF(Color.Gray, 0.5f); + + if (!CBase.Themes.GetColor("NoteBaseColor", _PartyModeID, out _NoteBaseColor)) + _NoteBaseColor = new SColorF(Color.White); + SPlayer playerData = CBase.Game.GetPlayers()[player]; _Lines = CBase.Game.GetSong().Notes.GetVoice(playerData.VoiceNr).Lines; _NoteLineHeight = Rect.H / CBase.Settings.GetNumNoteLines(); @@ -88,7 +96,7 @@ namespace VocaluxeLib.Menu.SingNotes CSongLine line = _Lines[_CurrentLine]; if (CBase.Config.GetDrawNoteLines() == EOffOn.TR_CONFIG_ON) - _DrawNoteLines(new SColorF(Color.Gray, 0.5f * Alpha)); + _DrawNoteLines(new SColorF(_NoteLinesColor, _NoteLinesColor.A * Alpha)); float beats = line.LastNoteBeat - line.FirstNoteBeat + 1; @@ -102,7 +110,7 @@ namespace VocaluxeLib.Menu.SingNotes SRectF rect = _GetNoteRect(note); _DrawNoteBG(rect, color); - _DrawNote(rect, new SColorF(Color.White, 0.7f * Alpha), 0.7f); + _DrawNoteBase(rect, new SColorF(_NoteBaseColor, _NoteBaseColor.A * Alpha), 1f); } } @@ -118,9 +126,9 @@ namespace VocaluxeLib.Menu.SingNotes if (note.EndBeat == CBase.Game.GetRecordedBeat()) rect.W -= (1 - (CBase.Game.GetMidRecordedBeat() - CBase.Game.GetRecordedBeat())) * Rect.W / beats; - float factor = (note.Hit) ? 0.7f : 0.4f; + float factor = (note.Hit) ? 1f : 0.6f; - _DrawNote(rect, color, factor); + _DrawNoteFill(rect, color, factor); if (note.EndBeat >= CBase.Game.GetRecordedBeat() && note.Hit && note.HitNote.Type == ENoteType.Golden) { @@ -186,7 +194,7 @@ namespace VocaluxeLib.Menu.SingNotes lineRect.H = 1.5f; for (int i = 0; i < CBase.Settings.GetNumNoteLines(); i++) { - lineRect.Y = Rect.Y + Rect.H / CBase.Settings.GetNumNoteLines() * (i + 1); + lineRect.Y = (Rect.Y + Rect.H / CBase.Settings.GetNumNoteLines() * (i + 1)) - (lineRect.H / 2); CBase.Drawing.DrawRect(color, lineRect); } } @@ -221,36 +229,64 @@ namespace VocaluxeLib.Menu.SingNotes CBase.Drawing.DrawTexture(toneHelper, drawRect, color); } - private void _DrawNote(SRectF rect, SColorF color, float factor) + private void _DrawNote(SRectF rect, SColorF color, CTextureRef noteBegin, CTextureRef noteMiddle, CTextureRef noteEnd, float factor) { if (factor <= 0) return; - float dh = (1f - factor) * rect.H / 2; - float dw = Math.Min(dh, rect.W / 2); + //Width-related variables rounded and then floored to prevent 1px gaps in notes + rect.X = (float)Math.Round(rect.X); + rect.W = (float)Math.Round(rect.W); + + int dh = (int)((1f - factor) * rect.H / 2); + int dw = (int)Math.Min(dh, rect.W / 2); var noteRect = new SRectF(rect.X + dw, rect.Y + dh, rect.W - 2 * dw, rect.H - 2 * dh, rect.Z); - CTextureRef noteBegin = CBase.Themes.GetSkinTexture(_Theme.SkinLeft, _PartyModeID); - CTextureRef noteMiddle = CBase.Themes.GetSkinTexture(_Theme.SkinMiddle, _PartyModeID); - CTextureRef noteEnd = CBase.Themes.GetSkinTexture(_Theme.SkinRight, _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); + int endsW = (int)Math.Min(noteRect.H * noteBegin.OrigAspect, noteRect.W / 2); CBase.Drawing.DrawTexture(noteBegin, new SRectF(noteRect.X, noteRect.Y, endsW, noteRect.H, noteRect.Z), color); - var 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(middleRect.X, middleRect.Y, 2 * endsW, middleRect.H, middleRect.Z), color, middleRect); + SRectF middleRect = new SRectF(noteRect.X + endsW, noteRect.Y, noteRect.W - 2 * endsW, noteRect.H, noteRect.Z); + + int midW = (int)Math.Round(noteRect.H * noteMiddle.OrigAspect); + + int midCount = (int)middleRect.W / midW; + + for (int i = 0; i < midCount; ++i) + { + CBase.Drawing.DrawTexture(noteMiddle, new SRectF(middleRect.X + (i * midW), noteRect.Y, midW, noteRect.H, noteRect.Z), color); + } + + SRectF lastMidRect = new SRectF(middleRect.X + midCount * midW, noteRect.Y, middleRect.W - (midCount * midW), noteRect.H, noteRect.Z); + + CBase.Drawing.DrawTexture(noteMiddle, new SRectF(middleRect.X + (midCount * midW), middleRect.Y, midW, middleRect.H, middleRect.Z), color, lastMidRect); CBase.Drawing.DrawTexture(noteEnd, new SRectF(noteRect.X + noteRect.W - endsW, noteRect.Y, endsW, noteRect.H, noteRect.Z), color); } - private void _DrawNoteBG(SRectF noteRect, SColorF color) + private void _DrawNoteBase(SRectF rect, SColorF color, float factor) + { + CTextureRef noteBegin = CBase.Themes.GetSkinTexture(_Theme.SkinLeft, _PartyModeID); + CTextureRef noteMiddle = CBase.Themes.GetSkinTexture(_Theme.SkinMiddle, _PartyModeID); + CTextureRef noteEnd = CBase.Themes.GetSkinTexture(_Theme.SkinRight, _PartyModeID); + + _DrawNote(rect, color, noteBegin, noteMiddle, noteEnd, factor); + } + + private void _DrawNoteFill(SRectF rect, SColorF color, float factor) + { + + CTextureRef noteBegin = CBase.Themes.GetSkinTexture(_Theme.SkinFillLeft, _PartyModeID); + CTextureRef noteMiddle = CBase.Themes.GetSkinTexture(_Theme.SkinFillMiddle, _PartyModeID); + CTextureRef noteEnd = CBase.Themes.GetSkinTexture(_Theme.SkinFillRight, _PartyModeID); + + _DrawNote(rect, color, noteBegin, noteMiddle, noteEnd, factor); + } + + private void _DrawNoteBG(SRectF rect, SColorF color) { const float period = 1500; //[ms] @@ -262,27 +298,13 @@ namespace VocaluxeLib.Menu.SingNotes float alpha = (float)(Math.Cos(_Timer.ElapsedMilliseconds / period * Math.PI * 2) + 1) / 4 + 0.5f; - CTextureRef noteBackgroundBegin = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundLeft, _PartyModeID); - CTextureRef noteBackgroundMiddle = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundMiddle, _PartyModeID); - CTextureRef noteBackgroundEnd = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundRight, _PartyModeID); - - float dx = noteRect.H * noteBackgroundBegin.OrigAspect; - if (2 * dx > noteRect.W) - dx = noteRect.W / 2; - var col = new SColorF(color, color.A * alpha); - CBase.Drawing.DrawTexture(noteBackgroundBegin, new SRectF(noteRect.X, noteRect.Y, dx, noteRect.H, noteRect.Z), col); + CTextureRef noteBegin = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundLeft, _PartyModeID); + CTextureRef noteMiddle = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundMiddle, _PartyModeID); + CTextureRef noteEnd = CBase.Themes.GetSkinTexture(_Theme.SkinBackgroundRight, _PartyModeID); - if (noteRect.W - 2 * dx >= 2 * dx) - CBase.Drawing.DrawTexture(noteBackgroundMiddle, new SRectF(noteRect.X + dx, noteRect.Y, noteRect.W - 2 * dx, noteRect.H, noteRect.Z), col); - else - { - CBase.Drawing.DrawTexture(noteBackgroundMiddle, new SRectF(noteRect.X + dx, noteRect.Y, 2 * dx, noteRect.H, noteRect.Z), col, - new SRectF(noteRect.X + dx, noteRect.Y, noteRect.W - 2 * dx, noteRect.H, noteRect.Z)); - } - - CBase.Drawing.DrawTexture(noteBackgroundEnd, new SRectF(noteRect.X + noteRect.W - dx, noteRect.Y, dx, noteRect.H, noteRect.Z), col); + _DrawNote(rect, col, noteBegin, noteMiddle, noteEnd, 1f); } private void _AddGoldenNote(SRectF noteRect) diff --git a/VocaluxeLib/Menu/SingNotes/CSingNotes.cs b/VocaluxeLib/Menu/SingNotes/CSingNotes.cs index 71c09fdc..5dee6b02 100644 --- a/VocaluxeLib/Menu/SingNotes/CSingNotes.cs +++ b/VocaluxeLib/Menu/SingNotes/CSingNotes.cs @@ -40,6 +40,10 @@ namespace VocaluxeLib.Menu.SingNotes public string SkinMiddle; public string SkinRight; + public string SkinFillLeft; + public string SkinFillMiddle; + public string SkinFillRight; + public string SkinBackgroundLeft; public string SkinBackgroundMiddle; public string SkinBackgroundRight; @@ -110,6 +114,10 @@ namespace VocaluxeLib.Menu.SingNotes ThemeLoaded &= xmlReader.GetValue(item + "/SkinMiddle", out _Theme.SkinMiddle, String.Empty); ThemeLoaded &= xmlReader.GetValue(item + "/SkinRight", out _Theme.SkinRight, String.Empty); + ThemeLoaded &= xmlReader.GetValue(item + "/SkinFillLeft", out _Theme.SkinLeft, String.Empty); + ThemeLoaded &= xmlReader.GetValue(item + "/SkinFillMiddle", out _Theme.SkinMiddle, String.Empty); + ThemeLoaded &= xmlReader.GetValue(item + "/SkinFillRight", out _Theme.SkinRight, String.Empty); + ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackgroundLeft", out _Theme.SkinBackgroundLeft, String.Empty); ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackgroundMiddle", out _Theme.SkinBackgroundMiddle, String.Empty); ThemeLoaded &= xmlReader.GetValue(item + "/SkinBackgroundRight", out _Theme.SkinBackgroundRight, String.Empty);