Fixed merge errors
This commit is contained in:
1 parent
9d13c32b93
commit
f83496d66a
8 files changed
+36
-42
No files matched your search
@@ -23,6 +23,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Draw;
|
using VocaluxeLib.Draw;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Draw;
|
using VocaluxeLib.Draw;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using Vocaluxe.Lib.Draw;
|
using Vocaluxe.Lib.Draw;
|
||||||
|
using VocaluxeLib;
|
||||||
using VocaluxeLib.Draw;
|
using VocaluxeLib.Draw;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
|
|||||||
@@ -370,12 +370,12 @@ namespace Vocaluxe.Base
|
|||||||
CDraw.DrawTextureReflection(texture, rect, color, bounds, reflectionSpace, reflectionHeight);
|
CDraw.DrawTextureReflection(texture, rect, color, bounds, reflectionSpace, reflectionHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
public STexture AddTexture(string fileName)
|
public CTexture AddTexture(string fileName)
|
||||||
{
|
{
|
||||||
return CDraw.AddTexture(fileName);
|
return CDraw.AddTexture(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveTexture(ref STexture texture)
|
public void RemoveTexture(ref CTexture texture)
|
||||||
{
|
{
|
||||||
CDraw.RemoveTexture(ref texture);
|
CDraw.RemoveTexture(ref texture);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ namespace Vocaluxe.Base
|
|||||||
static class CProfiles
|
static class CProfiles
|
||||||
{
|
{
|
||||||
#region enums and structs
|
#region enums and structs
|
||||||
enum EAction
|
private enum EAction
|
||||||
{
|
{
|
||||||
LoadProfiles,
|
LoadProfiles,
|
||||||
LoadAvatars,
|
LoadAvatars,
|
||||||
@@ -54,7 +54,7 @@ namespace Vocaluxe.Base
|
|||||||
EditAvatar
|
EditAvatar
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SChange
|
private struct SChange
|
||||||
{
|
{
|
||||||
public CProfile Profile;
|
public CProfile Profile;
|
||||||
public CAvatar Avatar;
|
public CAvatar Avatar;
|
||||||
@@ -96,16 +96,12 @@ namespace Vocaluxe.Base
|
|||||||
_Avatars = new Dictionary<int, CAvatar>();
|
_Avatars = new Dictionary<int, CAvatar>();
|
||||||
_AvatarIDs = new Queue<int>(1000);
|
_AvatarIDs = new Queue<int>(1000);
|
||||||
for (int i = 0; i < 1000; i++)
|
for (int i = 0; i < 1000; i++)
|
||||||
{
|
|
||||||
_AvatarIDs.Enqueue(i);
|
_AvatarIDs.Enqueue(i);
|
||||||
}
|
|
||||||
|
|
||||||
_Profiles = new Dictionary<int, CProfile>();
|
_Profiles = new Dictionary<int, CProfile>();
|
||||||
_ProfileIDs = new Queue<int>(100);
|
_ProfileIDs = new Queue<int>(100);
|
||||||
for (int i = 0; i < 100; i++)
|
for (int i = 0; i < 100; i++)
|
||||||
{
|
|
||||||
_ProfileIDs.Enqueue(i);
|
_ProfileIDs.Enqueue(i);
|
||||||
}
|
|
||||||
|
|
||||||
LoadProfiles();
|
LoadProfiles();
|
||||||
}
|
}
|
||||||
@@ -330,9 +326,7 @@ namespace Vocaluxe.Base
|
|||||||
CProfile[] result = new CProfile[_Profiles.Count];
|
CProfile[] result = new CProfile[_Profiles.Count];
|
||||||
_Profiles.Values.CopyTo(result, 0);
|
_Profiles.Values.CopyTo(result, 0);
|
||||||
for (int i = 0; i < result.Length; i++)
|
for (int i = 0; i < result.Length; i++)
|
||||||
{
|
|
||||||
list.Add(result[i]);
|
list.Add(result[i]);
|
||||||
}
|
|
||||||
list.Sort(_CompareByPlayerName);
|
list.Sort(_CompareByPlayerName);
|
||||||
return list.ToArray();
|
return list.ToArray();
|
||||||
}
|
}
|
||||||
@@ -380,10 +374,8 @@ namespace Vocaluxe.Base
|
|||||||
public static void SaveProfiles()
|
public static void SaveProfiles()
|
||||||
{
|
{
|
||||||
foreach (int id in _Profiles.Keys)
|
foreach (int id in _Profiles.Keys)
|
||||||
{
|
|
||||||
_Profiles[id].SaveProfile();
|
_Profiles[id].SaveProfile();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public static bool ICProfileIDValid(int profileID)
|
public static bool ICProfileIDValid(int profileID)
|
||||||
{
|
{
|
||||||
@@ -517,18 +509,18 @@ namespace Vocaluxe.Base
|
|||||||
#endregion profile properties
|
#endregion profile properties
|
||||||
|
|
||||||
#region avatar texture
|
#region avatar texture
|
||||||
public static STexture GetAvatarTexture(int avatarID)
|
public static CTexture GetAvatarTexture(int avatarID)
|
||||||
{
|
{
|
||||||
if (!ICAvatarIDValid(avatarID))
|
if (!ICAvatarIDValid(avatarID))
|
||||||
return new STexture(-1);
|
return null;
|
||||||
|
|
||||||
return _Avatars[avatarID].Texture;
|
return _Avatars[avatarID].Texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static STexture GetAvatarTextureFromProfile(int profileID)
|
public static CTexture GetAvatarTextureFromProfile(int profileID)
|
||||||
{
|
{
|
||||||
if (!ICProfileIDValid(profileID))
|
if (!ICProfileIDValid(profileID))
|
||||||
return new STexture(-1);
|
return null;
|
||||||
|
|
||||||
return _Profiles[profileID].Avatar.Texture;
|
return _Profiles[profileID].Avatar.Texture;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -410,11 +410,13 @@ namespace Vocaluxe.Screens
|
|||||||
|
|
||||||
CProfile[] profiles = CProfiles.GetProfiles();
|
CProfile[] profiles = CProfiles.GetProfiles();
|
||||||
for (int i = 0; i < profiles.Length; i++)
|
for (int i = 0; i < profiles.Length; i++)
|
||||||
|
{
|
||||||
_SelectSlides[_SelectSlideProfiles].AddValue(
|
_SelectSlides[_SelectSlideProfiles].AddValue(
|
||||||
profiles[i].PlayerName,
|
profiles[i].PlayerName,
|
||||||
new STexture(-1),
|
null,
|
||||||
profiles[i].ID,
|
profiles[i].ID,
|
||||||
-1);
|
-1);
|
||||||
|
}
|
||||||
|
|
||||||
if (CProfiles.NumProfiles > 0 && CProfiles.NumAvatars > 0)
|
if (CProfiles.NumProfiles > 0 && CProfiles.NumAvatars > 0)
|
||||||
{
|
{
|
||||||
@@ -446,11 +448,13 @@ namespace Vocaluxe.Screens
|
|||||||
_SelectSlides[_SelectSlideAvatars].Clear();
|
_SelectSlides[_SelectSlideAvatars].Clear();
|
||||||
CAvatar[] avatars = CProfiles.GetAvatars();
|
CAvatar[] avatars = CProfiles.GetAvatars();
|
||||||
for (int i = 0; i < avatars.Length; i++)
|
for (int i = 0; i < avatars.Length; i++)
|
||||||
|
{
|
||||||
_SelectSlides[_SelectSlideAvatars].AddValue(
|
_SelectSlides[_SelectSlideAvatars].AddValue(
|
||||||
Path.GetFileName(avatars[i].FileName),
|
Path.GetFileName(avatars[i].FileName),
|
||||||
new STexture(-1),
|
null,
|
||||||
avatars[i].ID,
|
avatars[i].ID,
|
||||||
-1);
|
-1);
|
||||||
|
}
|
||||||
|
|
||||||
if (Keep)
|
if (Keep)
|
||||||
{
|
{
|
||||||
|
|||||||
+13
-13
@@ -4,7 +4,7 @@ using System.Collections.ObjectModel;
|
|||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using VocaluxeLib.Draw;
|
||||||
using VocaluxeLib.Game;
|
using VocaluxeLib.Game;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
using VocaluxeLib.PartyModes;
|
using VocaluxeLib.PartyModes;
|
||||||
@@ -78,8 +78,8 @@ namespace VocaluxeLib
|
|||||||
{
|
{
|
||||||
string GetThemeScreensPath(int partyModeID);
|
string GetThemeScreensPath(int partyModeID);
|
||||||
int GetSkinIndex(int partyModeID);
|
int GetSkinIndex(int partyModeID);
|
||||||
STexture GetSkinTexture(string textureName, int partyModeID);
|
CTexture GetSkinTexture(string textureName, int partyModeID);
|
||||||
STexture GetSkinVideoTexture(string videoName, int partyModeID);
|
CTexture GetSkinVideoTexture(string videoName, int partyModeID);
|
||||||
|
|
||||||
void SkinVideoResume(string videoName, int partyModeID);
|
void SkinVideoResume(string videoName, int partyModeID);
|
||||||
void SkinVideoPause(string videoName, int partyModeID);
|
void SkinVideoPause(string videoName, int partyModeID);
|
||||||
@@ -109,18 +109,18 @@ namespace VocaluxeLib
|
|||||||
|
|
||||||
void ApplyVolume();
|
void ApplyVolume();
|
||||||
|
|
||||||
STexture GetVideoTexture();
|
CTexture GetVideoTexture();
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IDrawing
|
public interface IDrawing
|
||||||
{
|
{
|
||||||
void DrawTexture(STexture texture, SRectF rect);
|
void DrawTexture(CTexture texture, SRectF rect);
|
||||||
void DrawTexture(STexture texture, SRectF rect, SColorF color);
|
void DrawTexture(CTexture texture, SRectF rect, SColorF color);
|
||||||
void DrawTexture(STexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false);
|
void DrawTexture(CTexture 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 DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight);
|
||||||
|
|
||||||
STexture AddTexture(string fileName);
|
CTexture AddTexture(string fileName);
|
||||||
void RemoveTexture(ref STexture texture);
|
void RemoveTexture(ref CTexture texture);
|
||||||
|
|
||||||
void DrawColor(SColorF color, SRectF rect);
|
void DrawColor(SColorF color, SRectF rect);
|
||||||
void DrawColorReflection(SColorF color, SRectF rect, float space, float height);
|
void DrawColorReflection(SColorF color, SRectF rect, float space, float height);
|
||||||
@@ -225,7 +225,7 @@ namespace VocaluxeLib
|
|||||||
{
|
{
|
||||||
int Load(string videoFileName);
|
int Load(string videoFileName);
|
||||||
bool Skip(int videoStream, float startPosition, float videoGap);
|
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 IsFinished(int videoStream);
|
||||||
bool Close(int videoStream);
|
bool Close(int videoStream);
|
||||||
}
|
}
|
||||||
@@ -248,12 +248,12 @@ namespace VocaluxeLib
|
|||||||
|
|
||||||
public interface ICover
|
public interface ICover
|
||||||
{
|
{
|
||||||
STexture GetNoCover();
|
CTexture GetNoCover();
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IDataBase
|
public interface IDataBase
|
||||||
{
|
{
|
||||||
bool GetCover(string fileName, ref STexture texture, int coverSize);
|
bool GetCover(string fileName, ref CTexture texture, int coverSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IControllers
|
public interface IControllers
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using VocaluxeLib.Draw;
|
||||||
using VocaluxeLib.Menu;
|
using VocaluxeLib.Menu;
|
||||||
|
|
||||||
namespace VocaluxeLib.Profile
|
namespace VocaluxeLib.Profile
|
||||||
@@ -10,31 +10,26 @@ namespace VocaluxeLib.Profile
|
|||||||
public class CAvatar
|
public class CAvatar
|
||||||
{
|
{
|
||||||
public int ID;
|
public int ID;
|
||||||
public string FileName;
|
public string FileName = "";
|
||||||
public STexture Texture;
|
public CTexture Texture;
|
||||||
|
|
||||||
public CAvatar(int ID)
|
public CAvatar(int ID)
|
||||||
{
|
{
|
||||||
this.ID = ID;
|
this.ID = ID;
|
||||||
FileName = String.Empty;
|
|
||||||
Texture = new STexture(-1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool LoadFromFile(string NewFileName)
|
public bool LoadFromFile(string NewFileName)
|
||||||
{
|
{
|
||||||
FileName = NewFileName;
|
FileName = NewFileName;
|
||||||
CBase.Drawing.RemoveTexture(ref Texture);
|
return Reload();
|
||||||
Texture = CBase.Drawing.AddTexture(FileName);
|
|
||||||
return (Texture.Index != -1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Reload()
|
public bool Reload()
|
||||||
{
|
{
|
||||||
STexture oldTexture = Texture;
|
CBase.Drawing.RemoveTexture(ref Texture);
|
||||||
Texture = CBase.Drawing.AddTexture(FileName);
|
Texture = CBase.Drawing.AddTexture(FileName);
|
||||||
CBase.Drawing.RemoveTexture(ref oldTexture);
|
|
||||||
|
|
||||||
return Texture.Index != -1;
|
return Texture != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Unload()
|
public void Unload()
|
||||||
|
|||||||
Reference in new issue
Block a user