Fixed merge errors
This commit is contained in:
1 parent
9d13c32b93
commit
f83496d66a
8 files changed
+51
-57
No files matched your search
@@ -23,6 +23,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using VocaluxeLib;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using VocaluxeLib;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using Vocaluxe.Lib.Draw;
|
||||
using VocaluxeLib;
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
|
||||
@@ -370,12 +370,12 @@ namespace Vocaluxe.Base
|
||||
CDraw.DrawTextureReflection(texture, rect, color, bounds, reflectionSpace, reflectionHeight);
|
||||
}
|
||||
|
||||
public STexture AddTexture(string fileName)
|
||||
public CTexture AddTexture(string fileName)
|
||||
{
|
||||
return CDraw.AddTexture(fileName);
|
||||
}
|
||||
|
||||
public void RemoveTexture(ref STexture texture)
|
||||
public void RemoveTexture(ref CTexture texture)
|
||||
{
|
||||
CDraw.RemoveTexture(ref texture);
|
||||
}
|
||||
|
||||
+15
-23
@@ -43,7 +43,7 @@ namespace Vocaluxe.Base
|
||||
static class CProfiles
|
||||
{
|
||||
#region enums and structs
|
||||
enum EAction
|
||||
private enum EAction
|
||||
{
|
||||
LoadProfiles,
|
||||
LoadAvatars,
|
||||
@@ -54,7 +54,7 @@ namespace Vocaluxe.Base
|
||||
EditAvatar
|
||||
}
|
||||
|
||||
struct SChange
|
||||
private struct SChange
|
||||
{
|
||||
public CProfile Profile;
|
||||
public CAvatar Avatar;
|
||||
@@ -96,16 +96,12 @@ namespace Vocaluxe.Base
|
||||
_Avatars = new Dictionary<int, CAvatar>();
|
||||
_AvatarIDs = new Queue<int>(1000);
|
||||
for (int i = 0; i < 1000; i++)
|
||||
{
|
||||
_AvatarIDs.Enqueue(i);
|
||||
}
|
||||
|
||||
_Profiles = new Dictionary<int, CProfile>();
|
||||
_ProfileIDs = new Queue<int>(100);
|
||||
for (int i = 0; i < 100; i++)
|
||||
{
|
||||
_ProfileIDs.Enqueue(i);
|
||||
}
|
||||
|
||||
LoadProfiles();
|
||||
}
|
||||
@@ -319,20 +315,18 @@ namespace Vocaluxe.Base
|
||||
_Queue.Enqueue(change);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static CProfile[] GetProfiles()
|
||||
{
|
||||
List<CProfile> list = new List<CProfile>();
|
||||
|
||||
if (_Profiles.Count == 0)
|
||||
return null;
|
||||
return null;
|
||||
|
||||
CProfile[] result = new CProfile[_Profiles.Count];
|
||||
_Profiles.Values.CopyTo(result, 0);
|
||||
for (int i = 0; i < result.Length; i++)
|
||||
{
|
||||
list.Add(result[i]);
|
||||
}
|
||||
list.Sort(_CompareByPlayerName);
|
||||
return list.ToArray();
|
||||
}
|
||||
@@ -342,13 +336,13 @@ namespace Vocaluxe.Base
|
||||
CAvatar[] result = null;
|
||||
if (_Avatars.Count == 0)
|
||||
return null;
|
||||
|
||||
|
||||
result = new CAvatar[_Avatars.Count];
|
||||
_Avatars.Values.CopyTo(result, 0);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static int NewProfile(string fileName = "")
|
||||
{
|
||||
CProfile profile = new CProfile
|
||||
@@ -380,9 +374,7 @@ namespace Vocaluxe.Base
|
||||
public static void SaveProfiles()
|
||||
{
|
||||
foreach (int id in _Profiles.Keys)
|
||||
{
|
||||
_Profiles[id].SaveProfile();
|
||||
}
|
||||
}
|
||||
|
||||
public static bool ICProfileIDValid(int profileID)
|
||||
@@ -422,7 +414,7 @@ namespace Vocaluxe.Base
|
||||
return String.Empty;
|
||||
|
||||
return Path.GetFileName(_Profiles[profileID].FileName);
|
||||
}
|
||||
}
|
||||
|
||||
public static string AddGetPlayerName(int profileID, char chr)
|
||||
{
|
||||
@@ -475,7 +467,7 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
return ICProfileIDValid(profileID) ? _Profiles[profileID].Active : EOffOn.TR_CONFIG_OFF;
|
||||
}
|
||||
|
||||
|
||||
public static void SetActive(int profileID, EOffOn option)
|
||||
{
|
||||
if (!ICProfileIDValid(profileID))
|
||||
@@ -517,18 +509,18 @@ namespace Vocaluxe.Base
|
||||
#endregion profile properties
|
||||
|
||||
#region avatar texture
|
||||
public static STexture GetAvatarTexture(int avatarID)
|
||||
public static CTexture GetAvatarTexture(int avatarID)
|
||||
{
|
||||
if (!ICAvatarIDValid(avatarID))
|
||||
return new STexture(-1);
|
||||
return null;
|
||||
|
||||
return _Avatars[avatarID].Texture;
|
||||
}
|
||||
|
||||
public static STexture GetAvatarTextureFromProfile(int profileID)
|
||||
public static CTexture GetAvatarTextureFromProfile(int profileID)
|
||||
{
|
||||
if (!ICProfileIDValid(profileID))
|
||||
return new STexture(-1);
|
||||
return null;
|
||||
|
||||
return _Profiles[profileID].Avatar.Texture;
|
||||
}
|
||||
@@ -565,9 +557,9 @@ namespace Vocaluxe.Base
|
||||
continue;
|
||||
|
||||
CProfile profile = new CProfile
|
||||
{
|
||||
FileName = Path.Combine(CSettings.FolderProfiles, file)
|
||||
};
|
||||
{
|
||||
FileName = Path.Combine(CSettings.FolderProfiles, file)
|
||||
};
|
||||
|
||||
if (profile.LoadProfile())
|
||||
{
|
||||
|
||||
@@ -389,7 +389,7 @@ namespace Vocaluxe.Screens
|
||||
private void _DeleteProfile()
|
||||
{
|
||||
_EditMode = EEditMode.None;
|
||||
|
||||
|
||||
CProfiles.DeleteProfile(_SelectSlides[_SelectSlideProfiles].ValueIndex);
|
||||
|
||||
int selection = _SelectSlides[_SelectSlideProfiles].Selection;
|
||||
@@ -410,11 +410,13 @@ namespace Vocaluxe.Screens
|
||||
|
||||
CProfile[] profiles = CProfiles.GetProfiles();
|
||||
for (int i = 0; i < profiles.Length; i++)
|
||||
{
|
||||
_SelectSlides[_SelectSlideProfiles].AddValue(
|
||||
profiles[i].PlayerName,
|
||||
new STexture(-1),
|
||||
profiles[i].ID,
|
||||
profiles[i].PlayerName,
|
||||
null,
|
||||
profiles[i].ID,
|
||||
-1);
|
||||
}
|
||||
|
||||
if (CProfiles.NumProfiles > 0 && CProfiles.NumAvatars > 0)
|
||||
{
|
||||
@@ -446,11 +448,13 @@ namespace Vocaluxe.Screens
|
||||
_SelectSlides[_SelectSlideAvatars].Clear();
|
||||
CAvatar[] avatars = CProfiles.GetAvatars();
|
||||
for (int i = 0; i < avatars.Length; i++)
|
||||
{
|
||||
_SelectSlides[_SelectSlideAvatars].AddValue(
|
||||
Path.GetFileName(avatars[i].FileName),
|
||||
new STexture(-1),
|
||||
null,
|
||||
avatars[i].ID,
|
||||
-1);
|
||||
}
|
||||
|
||||
if (Keep)
|
||||
{
|
||||
@@ -461,6 +465,6 @@ namespace Vocaluxe.Screens
|
||||
_SelectSlides[_SelectSlideAvatars].SetSelectionByValueIndex(CProfiles.GetAvatarID(_SelectSlides[_SelectSlideProfiles].ValueIndex));
|
||||
|
||||
_AvatarsChanged = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+14
-14
@@ -4,7 +4,7 @@ using System.Collections.ObjectModel;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Game;
|
||||
using VocaluxeLib.Menu;
|
||||
using VocaluxeLib.PartyModes;
|
||||
@@ -78,8 +78,8 @@ namespace VocaluxeLib
|
||||
{
|
||||
string GetThemeScreensPath(int partyModeID);
|
||||
int GetSkinIndex(int partyModeID);
|
||||
STexture GetSkinTexture(string textureName, int partyModeID);
|
||||
STexture GetSkinVideoTexture(string videoName, int partyModeID);
|
||||
CTexture GetSkinTexture(string textureName, int partyModeID);
|
||||
CTexture GetSkinVideoTexture(string videoName, int partyModeID);
|
||||
|
||||
void SkinVideoResume(string videoName, int partyModeID);
|
||||
void SkinVideoPause(string videoName, int partyModeID);
|
||||
@@ -109,18 +109,18 @@ namespace VocaluxeLib
|
||||
|
||||
void ApplyVolume();
|
||||
|
||||
STexture GetVideoTexture();
|
||||
CTexture GetVideoTexture();
|
||||
}
|
||||
|
||||
public interface IDrawing
|
||||
{
|
||||
void DrawTexture(STexture texture, SRectF rect);
|
||||
void DrawTexture(STexture texture, SRectF rect, SColorF color);
|
||||
void DrawTexture(STexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false);
|
||||
void DrawTextureReflection(STexture texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight);
|
||||
void DrawTexture(CTexture texture, SRectF rect);
|
||||
void DrawTexture(CTexture texture, SRectF rect, SColorF color);
|
||||
void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false);
|
||||
void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight);
|
||||
|
||||
STexture AddTexture(string fileName);
|
||||
void RemoveTexture(ref STexture texture);
|
||||
CTexture AddTexture(string fileName);
|
||||
void RemoveTexture(ref CTexture texture);
|
||||
|
||||
void DrawColor(SColorF color, SRectF rect);
|
||||
void DrawColorReflection(SColorF color, SRectF rect, float space, float height);
|
||||
@@ -225,7 +225,7 @@ namespace VocaluxeLib
|
||||
{
|
||||
int Load(string videoFileName);
|
||||
bool Skip(int videoStream, float startPosition, float videoGap);
|
||||
bool GetFrame(int videoStream, ref STexture videoTexture, float time, out float videoTime);
|
||||
bool GetFrame(int videoStream, ref CTexture videoTexture, float time, out float videoTime);
|
||||
bool IsFinished(int videoStream);
|
||||
bool Close(int videoStream);
|
||||
}
|
||||
@@ -248,12 +248,12 @@ namespace VocaluxeLib
|
||||
|
||||
public interface ICover
|
||||
{
|
||||
STexture GetNoCover();
|
||||
CTexture GetNoCover();
|
||||
}
|
||||
|
||||
public interface IDataBase
|
||||
{
|
||||
bool GetCover(string fileName, ref STexture texture, int coverSize);
|
||||
bool GetCover(string fileName, ref CTexture texture, int coverSize);
|
||||
}
|
||||
|
||||
public interface IControllers
|
||||
@@ -283,4 +283,4 @@ namespace VocaluxeLib
|
||||
int GetPlaylistSongCount(int playlistID);
|
||||
CPlaylistSong GetPlaylistSong(int playlistID, int songIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Menu;
|
||||
|
||||
namespace VocaluxeLib.Profile
|
||||
@@ -10,31 +10,26 @@ namespace VocaluxeLib.Profile
|
||||
public class CAvatar
|
||||
{
|
||||
public int ID;
|
||||
public string FileName;
|
||||
public STexture Texture;
|
||||
public string FileName = "";
|
||||
public CTexture Texture;
|
||||
|
||||
public CAvatar(int ID)
|
||||
{
|
||||
this.ID = ID;
|
||||
FileName = String.Empty;
|
||||
Texture = new STexture(-1);
|
||||
}
|
||||
|
||||
public bool LoadFromFile(string NewFileName)
|
||||
{
|
||||
FileName = NewFileName;
|
||||
CBase.Drawing.RemoveTexture(ref Texture);
|
||||
Texture = CBase.Drawing.AddTexture(FileName);
|
||||
return (Texture.Index != -1);
|
||||
return Reload();
|
||||
}
|
||||
|
||||
public bool Reload()
|
||||
{
|
||||
STexture oldTexture = Texture;
|
||||
CBase.Drawing.RemoveTexture(ref Texture);
|
||||
Texture = CBase.Drawing.AddTexture(FileName);
|
||||
CBase.Drawing.RemoveTexture(ref oldTexture);
|
||||
|
||||
return Texture.Index != -1;
|
||||
return Texture != null;
|
||||
}
|
||||
|
||||
public void Unload()
|
||||
@@ -42,4 +37,4 @@ namespace VocaluxeLib.Profile
|
||||
CBase.Drawing.RemoveTexture(ref Texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user