Rename CTexture to CTextureRef to reflect it is only a reference
This commit is contained in:
1 parent
3fe8cdf05c
commit
7f8e974fe1
51 files changed
+290
-285
No files matched your search
@@ -52,25 +52,26 @@ namespace Vocaluxe.Base
|
||||
public static bool VideoEnabled
|
||||
{
|
||||
get { return _PlaysPreview ? _PreviewPlayer.VideoEnabled : _SongPlayer.VideoEnabled; }
|
||||
set {
|
||||
if(_PlaysPreview)
|
||||
set
|
||||
{
|
||||
if (_PlaysPreview)
|
||||
_PreviewPlayer.VideoEnabled = value;
|
||||
else
|
||||
else
|
||||
_SongPlayer.VideoEnabled = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool CanSing
|
||||
{
|
||||
get
|
||||
public static bool CanSing
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_PlaysPreview)
|
||||
return false;
|
||||
else if (_BGMusicFiles.Contains(_CurrentPlaylistElement))
|
||||
return false;
|
||||
else
|
||||
if (_BGMusicFiles.Contains(_CurrentPlaylistElement))
|
||||
return false;
|
||||
else return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Disabled
|
||||
@@ -85,7 +86,8 @@ namespace Vocaluxe.Base
|
||||
}
|
||||
}
|
||||
|
||||
public static bool RepeatSong {
|
||||
public static bool RepeatSong
|
||||
{
|
||||
get { return _SongPlayer.RepeatSong; }
|
||||
set { _SongPlayer.RepeatSong = value; }
|
||||
}
|
||||
@@ -100,13 +102,20 @@ namespace Vocaluxe.Base
|
||||
get { return _SongPlayer.SongHasVideo; }
|
||||
}
|
||||
|
||||
public static bool IsPlaying { get { return _PlaysPreview ? _PreviewPlayer.IsPlaying : _SongPlayer.IsPlaying; } }
|
||||
public static bool IsPlaying
|
||||
{
|
||||
get { return _PlaysPreview ? _PreviewPlayer.IsPlaying : _SongPlayer.IsPlaying; }
|
||||
}
|
||||
|
||||
public static bool IsPlayingPreview { get { return _PlaysPreview; } }
|
||||
public static bool IsPlayingPreview
|
||||
{
|
||||
get { return _PlaysPreview; }
|
||||
}
|
||||
|
||||
public static string ArtistAndTitle
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
if (_PlaysPreview)
|
||||
return _PreviewPlayer.ArtistAndTitle;
|
||||
else
|
||||
@@ -119,7 +128,7 @@ namespace Vocaluxe.Base
|
||||
get { return _PlaysPreview ? _PreviewPlayer.Length : _SongPlayer.Length; }
|
||||
}
|
||||
|
||||
public static CTexture Cover
|
||||
public static CTextureRef Cover
|
||||
{
|
||||
get { return _PlaysPreview ? _PreviewPlayer.Cover : _SongPlayer.Cover; }
|
||||
}
|
||||
@@ -184,12 +193,14 @@ namespace Vocaluxe.Base
|
||||
|
||||
if (_PlaysPreview)
|
||||
_PreviewPlayer.Play();
|
||||
else if(CConfig.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_OFF)
|
||||
else if (CConfig.BackgroundMusic == EBackgroundMusicOffOn.TR_CONFIG_OFF)
|
||||
{
|
||||
if (_SongPlayer.SongLoaded)
|
||||
//Resume
|
||||
_SongPlayer.TogglePause();
|
||||
else
|
||||
Next();
|
||||
}
|
||||
}
|
||||
|
||||
public static void Stop()
|
||||
@@ -278,7 +289,7 @@ namespace Vocaluxe.Base
|
||||
|
||||
public static void Update()
|
||||
{
|
||||
if (!IsPlaying && (!_SongPlayer.SongLoaded || !_PreviewPlayer.SongLoaded) )
|
||||
if (!IsPlaying && (!_SongPlayer.SongLoaded || !_PreviewPlayer.SongLoaded))
|
||||
return;
|
||||
|
||||
if (_PlaysPreview)
|
||||
@@ -291,7 +302,7 @@ namespace Vocaluxe.Base
|
||||
}
|
||||
}
|
||||
|
||||
public static CTexture GetVideoTexture()
|
||||
public static CTextureRef GetVideoTexture()
|
||||
{
|
||||
return _PlaysPreview ? _PreviewPlayer.GetVideoTexture() : _SongPlayer.GetVideoTexture();
|
||||
}
|
||||
@@ -439,6 +450,5 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
return _BGMusicFiles.Contains(element);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -32,10 +32,10 @@ namespace Vocaluxe.Base
|
||||
|
||||
static class CCover
|
||||
{
|
||||
private static readonly Dictionary<string, CTexture> _Covers = new Dictionary<string, CTexture>();
|
||||
private static readonly Dictionary<string, CTextureRef> _Covers = new Dictionary<string, CTextureRef>();
|
||||
private static readonly List<SCoverTheme> _CoverThemes = new List<SCoverTheme>();
|
||||
|
||||
public static CTexture NoCover { get; private set; }
|
||||
public static CTextureRef NoCover { get; private set; }
|
||||
|
||||
public static void Init()
|
||||
{
|
||||
@@ -81,7 +81,7 @@ namespace Vocaluxe.Base
|
||||
/// <summary>
|
||||
/// Returns a STexture for a given cover name. Returns "NoCover" if the cover does not exist.
|
||||
/// </summary>
|
||||
public static CTexture Cover(string name)
|
||||
public static CTextureRef Cover(string name)
|
||||
{
|
||||
lock (_Covers)
|
||||
{
|
||||
@@ -116,7 +116,7 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
foreach (string key in _Covers.Keys)
|
||||
{
|
||||
CTexture texture = _Covers[key];
|
||||
CTextureRef texture = _Covers[key];
|
||||
CDraw.RemoveTexture(ref texture);
|
||||
}
|
||||
_Covers.Clear();
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
private int _MouseMoveDiffMin = CSettings.MouseMoveDiffMinActive;
|
||||
private CFading _Fading;
|
||||
private CTexture _Cursor;
|
||||
private CTextureRef _Cursor;
|
||||
private Point _LastDiffPos;
|
||||
|
||||
private readonly Stopwatch _Movetimer = new Stopwatch();
|
||||
|
||||
@@ -93,7 +93,7 @@ namespace Vocaluxe.Base
|
||||
_HighscoreDB.IncreaseSongCounter(dataBaseSongID);
|
||||
}
|
||||
|
||||
public static bool GetCover(string fileName, ref CTexture tex, int maxSize)
|
||||
public static bool GetCover(string fileName, ref CTextureRef tex, int maxSize)
|
||||
{
|
||||
return _CoverDB.GetCover(fileName, ref tex, maxSize);
|
||||
}
|
||||
@@ -103,7 +103,7 @@ namespace Vocaluxe.Base
|
||||
_CoverDB.CommitCovers();
|
||||
}
|
||||
|
||||
public static bool GetCreditsRessource(string fileName, ref CTexture tex)
|
||||
public static bool GetCreditsRessource(string fileName, ref CTextureRef tex)
|
||||
{
|
||||
return _ResourceDB.GetCreditsRessource(fileName, ref tex);
|
||||
}
|
||||
|
||||
+16
-16
@@ -130,12 +130,12 @@ namespace Vocaluxe.Base
|
||||
_Draw.ClearScreen();
|
||||
}
|
||||
|
||||
public static CTexture CopyScreen()
|
||||
public static CTextureRef CopyScreen()
|
||||
{
|
||||
return _Draw.CopyScreen();
|
||||
}
|
||||
|
||||
public static void CopyScreen(ref CTexture texture)
|
||||
public static void CopyScreen(ref CTextureRef texture)
|
||||
{
|
||||
_Draw.CopyScreen(ref texture);
|
||||
}
|
||||
@@ -145,67 +145,67 @@ namespace Vocaluxe.Base
|
||||
_Draw.MakeScreenShot();
|
||||
}
|
||||
|
||||
public static CTexture AddTexture(Bitmap bitmap)
|
||||
public static CTextureRef AddTexture(Bitmap bitmap)
|
||||
{
|
||||
return _Draw.AddTexture(bitmap);
|
||||
}
|
||||
|
||||
public static CTexture AddTexture(string texturePath)
|
||||
public static CTextureRef AddTexture(string texturePath)
|
||||
{
|
||||
return _Draw.AddTexture(texturePath);
|
||||
}
|
||||
|
||||
public static CTexture AddTexture(int w, int h, byte[] data)
|
||||
public static CTextureRef AddTexture(int w, int h, byte[] data)
|
||||
{
|
||||
return _Draw.AddTexture(w, h, data);
|
||||
}
|
||||
|
||||
public static CTexture EnqueueTexture(int w, int h, byte[] data)
|
||||
public static CTextureRef EnqueueTexture(int w, int h, byte[] data)
|
||||
{
|
||||
return _Draw.EnqueueTexture(w, h, data);
|
||||
}
|
||||
|
||||
public static bool UpdateTexture(CTexture texture, int w, int h, byte[] data)
|
||||
public static bool UpdateTexture(CTextureRef texture, int w, int h, byte[] data)
|
||||
{
|
||||
return _Draw.UpdateTexture(texture, w, h, data);
|
||||
}
|
||||
|
||||
public static bool UpdateOrAddTexture(ref CTexture texture, int w, int h, byte[] data)
|
||||
public static bool UpdateOrAddTexture(ref CTextureRef texture, int w, int h, byte[] data)
|
||||
{
|
||||
return _Draw.UpdateOrAddTexture(ref texture, w, h, data);
|
||||
}
|
||||
|
||||
public static void RemoveTexture(ref CTexture texture)
|
||||
public static void RemoveTexture(ref CTextureRef texture)
|
||||
{
|
||||
_Draw.RemoveTexture(ref texture);
|
||||
}
|
||||
|
||||
public static void DrawTexture(CTexture texture)
|
||||
public static void DrawTexture(CTextureRef texture)
|
||||
{
|
||||
_Draw.DrawTexture(texture);
|
||||
}
|
||||
|
||||
public static void DrawTexture(CTexture texture, SRectF rect)
|
||||
public static void DrawTexture(CTextureRef texture, SRectF rect)
|
||||
{
|
||||
_Draw.DrawTexture(texture, rect);
|
||||
}
|
||||
|
||||
public static void DrawTexture(CTexture texture, SRectF rect, SColorF color, bool mirrored = false)
|
||||
public static void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, bool mirrored = false)
|
||||
{
|
||||
_Draw.DrawTexture(texture, rect, color, mirrored);
|
||||
}
|
||||
|
||||
public static void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
|
||||
public static void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
|
||||
{
|
||||
_Draw.DrawTexture(texture, rect, color, bounds, mirrored);
|
||||
}
|
||||
|
||||
public static void DrawTexture(CTexture texture, SRectF rect, SColorF color, float begin, float end)
|
||||
public static void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end)
|
||||
{
|
||||
_Draw.DrawTexture(texture, rect, color, begin, end);
|
||||
}
|
||||
|
||||
public static void DrawTexture(CStatic staticBounds, CTexture texture, EAspect aspect)
|
||||
public static void DrawTexture(CStatic staticBounds, CTextureRef texture, EAspect aspect)
|
||||
{
|
||||
if (texture == null)
|
||||
return;
|
||||
@@ -218,7 +218,7 @@ namespace Vocaluxe.Base
|
||||
texture.Color, new SRectF(bounds.X, bounds.Y, bounds.Width, bounds.Height, 0f));
|
||||
}
|
||||
|
||||
public static void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
|
||||
public static void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
|
||||
{
|
||||
_Draw.DrawTextureReflection(texture, rect, color, bounds, space, height);
|
||||
}
|
||||
|
||||
+13
-13
@@ -267,12 +267,12 @@ namespace Vocaluxe.Base
|
||||
return CTheme.GetSkinIndex(partyModeID);
|
||||
}
|
||||
|
||||
public CTexture GetSkinTexture(string textureName, int partyModeID)
|
||||
public CTextureRef GetSkinTexture(string textureName, int partyModeID)
|
||||
{
|
||||
return CTheme.GetSkinTexture(textureName, partyModeID);
|
||||
}
|
||||
|
||||
public CTexture GetSkinVideoTexture(string videoName, int partyModeID)
|
||||
public CTextureRef GetSkinVideoTexture(string videoName, int partyModeID)
|
||||
{
|
||||
return CTheme.GetSkinVideoTexture(videoName, partyModeID);
|
||||
}
|
||||
@@ -400,7 +400,7 @@ namespace Vocaluxe.Base
|
||||
CBackgroundMusic.StopPreview();
|
||||
}
|
||||
|
||||
public CTexture GetVideoTexture()
|
||||
public CTextureRef GetVideoTexture()
|
||||
{
|
||||
return CBackgroundMusic.GetVideoTexture();
|
||||
}
|
||||
@@ -408,32 +408,32 @@ namespace Vocaluxe.Base
|
||||
|
||||
class CBdraw : IDrawing
|
||||
{
|
||||
public void DrawTexture(CTexture texture, SRectF rect)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect)
|
||||
{
|
||||
CDraw.DrawTexture(texture, rect);
|
||||
}
|
||||
|
||||
public void DrawTexture(CTexture texture, SRectF rect, SColorF color)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color)
|
||||
{
|
||||
CDraw.DrawTexture(texture, rect, color);
|
||||
}
|
||||
|
||||
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
|
||||
{
|
||||
CDraw.DrawTexture(texture, rect, color, bounds, mirrored);
|
||||
}
|
||||
|
||||
public void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight)
|
||||
public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight)
|
||||
{
|
||||
CDraw.DrawTextureReflection(texture, rect, color, bounds, reflectionSpace, reflectionHeight);
|
||||
}
|
||||
|
||||
public CTexture AddTexture(string fileName)
|
||||
public CTextureRef AddTexture(string fileName)
|
||||
{
|
||||
return CDraw.AddTexture(fileName);
|
||||
}
|
||||
|
||||
public void RemoveTexture(ref CTexture texture)
|
||||
public void RemoveTexture(ref CTextureRef texture)
|
||||
{
|
||||
CDraw.RemoveTexture(ref texture);
|
||||
}
|
||||
@@ -651,7 +651,7 @@ namespace Vocaluxe.Base
|
||||
return CProfiles.GetPlayerName(profileID, playerNum);
|
||||
}
|
||||
|
||||
public CTexture GetAvatar(int profileID)
|
||||
public CTextureRef GetAvatar(int profileID)
|
||||
{
|
||||
return CProfiles.GetAvatarTextureFromProfile(profileID);
|
||||
}
|
||||
@@ -810,7 +810,7 @@ namespace Vocaluxe.Base
|
||||
return CVideo.Skip(videoStream, startPosition, videoGap);
|
||||
}
|
||||
|
||||
public bool GetFrame(int videoStream, ref CTexture videoTexture, float time, out float videoTime)
|
||||
public bool GetFrame(int videoStream, ref CTextureRef videoTexture, float time, out float videoTime)
|
||||
{
|
||||
return CVideo.GetFrame(videoStream, ref videoTexture, time, out videoTime);
|
||||
}
|
||||
@@ -891,7 +891,7 @@ namespace Vocaluxe.Base
|
||||
|
||||
class CBcover : ICover
|
||||
{
|
||||
public CTexture GetNoCover()
|
||||
public CTextureRef GetNoCover()
|
||||
{
|
||||
return CCover.NoCover;
|
||||
}
|
||||
@@ -899,7 +899,7 @@ namespace Vocaluxe.Base
|
||||
|
||||
class CBdataBase : IDataBase
|
||||
{
|
||||
public bool GetCover(string fileName, ref CTexture texture, int coverSize)
|
||||
public bool GetCover(string fileName, ref CTextureRef texture, int coverSize)
|
||||
{
|
||||
return CDataBase.GetCover(fileName, ref texture, coverSize);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Vocaluxe.Base
|
||||
get { return _Song != null ? _Song.Finish : 0f; }
|
||||
}
|
||||
|
||||
public CTexture Cover
|
||||
public CTextureRef Cover
|
||||
{
|
||||
get { return _Song != null ? _Song.CoverTextureSmall : CCover.NoCover; }
|
||||
}
|
||||
|
||||
@@ -504,7 +504,7 @@ namespace Vocaluxe.Base
|
||||
#endregion profile properties
|
||||
|
||||
#region avatar texture
|
||||
public static CTexture GetAvatarTexture(int avatarID)
|
||||
public static CTextureRef GetAvatarTexture(int avatarID)
|
||||
{
|
||||
if (!IsAvatarIDValid(avatarID))
|
||||
return null;
|
||||
@@ -512,7 +512,7 @@ namespace Vocaluxe.Base
|
||||
return _Avatars[avatarID].Texture;
|
||||
}
|
||||
|
||||
public static CTexture GetAvatarTextureFromProfile(int profileID)
|
||||
public static CTextureRef GetAvatarTextureFromProfile(int profileID)
|
||||
{
|
||||
if (!IsProfileIDValid(profileID) || _Profiles[profileID].Avatar == null)
|
||||
return null;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Vocaluxe.Base
|
||||
class CSkinElement
|
||||
{
|
||||
public string Value;
|
||||
public CTexture Texture;
|
||||
public CTextureRef Texture;
|
||||
}
|
||||
|
||||
class CVideoSkinElement : CSkinElement
|
||||
@@ -554,7 +554,7 @@ namespace Vocaluxe.Base
|
||||
return path;
|
||||
}
|
||||
|
||||
public static CTexture GetSkinTexture(string textureName, int partyModeID)
|
||||
public static CTextureRef GetSkinTexture(string textureName, int partyModeID)
|
||||
{
|
||||
int skinIndex = GetSkinIndex(partyModeID);
|
||||
CSkinElement sk;
|
||||
@@ -597,7 +597,7 @@ namespace Vocaluxe.Base
|
||||
return null;
|
||||
}
|
||||
|
||||
public static CTexture GetSkinVideoTexture(string videoName, int partyModeID)
|
||||
public static CTextureRef GetSkinVideoTexture(string videoName, int partyModeID)
|
||||
{
|
||||
CVideoSkinElement sk = GetSkinVideo(videoName, partyModeID);
|
||||
if (sk == null)
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Vocaluxe.Base
|
||||
return _VideoDecoder.GetLength(streamID);
|
||||
}
|
||||
|
||||
public static bool GetFrame(int streamID, ref CTexture frame, float time, out float videoTime)
|
||||
public static bool GetFrame(int streamID, ref CTextureRef frame, float time, out float videoTime)
|
||||
{
|
||||
return _VideoDecoder.GetFrame(streamID, ref frame, time, out videoTime);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Vocaluxe.Base
|
||||
{
|
||||
class CVideoPlayer
|
||||
{
|
||||
private CTexture _VideoTexture;
|
||||
private CTextureRef _VideoTexture;
|
||||
private int _VideoStream;
|
||||
private readonly Stopwatch _VideoTimer = new Stopwatch();
|
||||
private bool _Finished;
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace Vocaluxe.Base
|
||||
_Webcam = null;
|
||||
}
|
||||
|
||||
public static bool GetFrame(ref CTexture tex)
|
||||
public static bool GetFrame(ref CTextureRef tex)
|
||||
{
|
||||
return _Webcam != null && _Webcam.GetFrame(ref tex);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Vocaluxe.Base.Fonts
|
||||
|
||||
public void DrawGlyph(char chr, float x, float y, float z, SColorF color)
|
||||
{
|
||||
CTexture texture;
|
||||
CTextureRef texture;
|
||||
SRectF rect;
|
||||
GetOrAddGlyph(chr).GetTextureAndRect(x, y, z, out texture, out rect);
|
||||
CDraw.DrawTexture(texture, rect, color);
|
||||
@@ -93,7 +93,7 @@ namespace Vocaluxe.Base.Fonts
|
||||
|
||||
public void DrawGlyph(char chr, float x, float y, float z, SColorF color, float begin, float end)
|
||||
{
|
||||
CTexture texture;
|
||||
CTextureRef texture;
|
||||
SRectF rect;
|
||||
GetOrAddGlyph(chr).GetTextureAndRect(x, y, z, out texture, out rect);
|
||||
CDraw.DrawTexture(texture, rect, color, begin, end);
|
||||
@@ -101,7 +101,7 @@ namespace Vocaluxe.Base.Fonts
|
||||
|
||||
public void DrawGlyphReflection(char chr, float x, float y, float z, SColorF color, float rspace, float rheight)
|
||||
{
|
||||
CTexture texture;
|
||||
CTextureRef texture;
|
||||
SRectF rect;
|
||||
GetOrAddGlyph(chr).GetTextureAndRect(x, y, z, out texture, out rect);
|
||||
CDraw.DrawTextureReflection(texture, rect, color, rect, rspace, rheight);
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Vocaluxe.Base.Fonts
|
||||
{
|
||||
class CGlyph
|
||||
{
|
||||
private CTexture _Texture;
|
||||
private CTextureRef _Texture;
|
||||
private readonly SizeF _BoundingBox;
|
||||
private readonly RectangleF _DrawBounding;
|
||||
public readonly float MaxHeight;
|
||||
@@ -147,7 +147,7 @@ namespace Vocaluxe.Base.Fonts
|
||||
return CFonts.Height / _BoundingBox.Height;
|
||||
}
|
||||
|
||||
public void GetTextureAndRect(float x, float y, float z, out CTexture texture, out SRectF rect)
|
||||
public void GetTextureAndRect(float x, float y, float z, out CTextureRef texture, out SRectF rect)
|
||||
{
|
||||
texture = _Texture;
|
||||
float factor = _GetFactor();
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace Vocaluxe.Lib.Database
|
||||
}
|
||||
}
|
||||
|
||||
public bool GetCover(string coverPath, ref CTexture tex, int maxSize)
|
||||
public bool GetCover(string coverPath, ref CTextureRef tex, int maxSize)
|
||||
{
|
||||
if (_Connection == null)
|
||||
return false;
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Vocaluxe.Lib.Database
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool GetCreditsRessource(string fileName, ref CTexture tex)
|
||||
public bool GetCreditsRessource(string fileName, ref CTextureRef tex)
|
||||
{
|
||||
if (_Connection == null)
|
||||
return false;
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
private VertexBuffer _VertexBuffer;
|
||||
private IndexBuffer _IndexBuffer;
|
||||
|
||||
private CTexture _BlankTexture;
|
||||
private CTextureRef _BlankTexture;
|
||||
|
||||
private readonly Queue<STexturedColoredVertex> _Vertices = new Queue<STexturedColoredVertex>();
|
||||
private readonly Queue<Texture> _VerticesTextures = new Queue<Texture>();
|
||||
@@ -466,9 +466,9 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// Copies the current frame into a texture
|
||||
/// <returns>A texture holding the current frame</returns>
|
||||
/// </summary>
|
||||
public CTexture CopyScreen()
|
||||
public CTextureRef CopyScreen()
|
||||
{
|
||||
CTexture texture = _GetNewTextureRef(_W, _H);
|
||||
CTextureRef texture = _GetNewTextureRef(_W, _H);
|
||||
|
||||
Surface backbufferSurface = _Device.GetBackBuffer(0, 0);
|
||||
var tex = new Texture(_Device, texture.W2, texture.H2, 0, Usage.AutoGenerateMipMap, Format.A8R8G8B8, Pool.Managed);
|
||||
@@ -487,7 +487,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// Copies the current frame into a texture
|
||||
/// </summary>
|
||||
/// <param name="texture">The texture in which the frame is copied to</param>
|
||||
public void CopyScreen(ref CTexture texture)
|
||||
public void CopyScreen(ref CTextureRef texture)
|
||||
{
|
||||
if (!_TextureExists(texture) || texture.DataSize.Width != GetScreenWidth() || texture.DataSize.Height != GetScreenHeight())
|
||||
{
|
||||
@@ -566,7 +566,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
#endregion Basic Draw Methods
|
||||
|
||||
#region Textures
|
||||
protected override Texture _CreateTexture(CTexture texture, byte[] data)
|
||||
protected override Texture _CreateTexture(CTextureRef texture, byte[] data)
|
||||
{
|
||||
//Create a new texture in the managed pool, which does not need to be recreated on a lost device
|
||||
//because a copy of the texture is hold in the Ram
|
||||
@@ -602,7 +602,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// <param name="h"></param>
|
||||
/// <param name="data">A byte array containing the new texture's data</param>
|
||||
/// <returns>True if succeeded</returns>
|
||||
public override bool UpdateTexture(CTexture texture, int w, int h, byte[] data)
|
||||
public override bool UpdateTexture(CTextureRef texture, int w, int h, byte[] data)
|
||||
{
|
||||
if (!_TextureExists(texture))
|
||||
return false;
|
||||
@@ -626,7 +626,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// Draws a texture
|
||||
/// </summary>
|
||||
/// <param name="texture">The texture to be drawn</param>
|
||||
public void DrawTexture(CTexture texture)
|
||||
public void DrawTexture(CTextureRef texture)
|
||||
{
|
||||
if (texture == null)
|
||||
return;
|
||||
@@ -638,7 +638,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// </summary>
|
||||
/// <param name="texture">The texture to be drawn</param>
|
||||
/// <param name="rect">A SRectF struct containing the destination coordinates</param>
|
||||
public void DrawTexture(CTexture texture, SRectF rect)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect)
|
||||
{
|
||||
if (texture == null)
|
||||
return;
|
||||
@@ -652,7 +652,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// <param name="rect">A SRectF struct containing the destination coordinates</param>
|
||||
/// <param name="color">A SColorF struct containing a color which the texture will be colored in</param>
|
||||
/// <param name="mirrored">True if the texture should be mirrored</param>
|
||||
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, bool mirrored = false)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, bool mirrored = false)
|
||||
{
|
||||
if (rect.W < 1 || rect.H < 1)
|
||||
return;
|
||||
@@ -698,7 +698,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// <param name="color">A SColorF struct containing a color which the texture will be colored in</param>
|
||||
/// <param name="bounds">A SRectF struct containing which part of the texture should be drawn</param>
|
||||
/// <param name="mirrored">True if the texture should be mirrored</param>
|
||||
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
|
||||
{
|
||||
if (Math.Abs(rect.W) < 1 || Math.Abs(rect.H) < 1 || Math.Abs(bounds.H) < 1 || Math.Abs(bounds.W) < 1 ||
|
||||
Math.Abs(color.A) < 0.01)
|
||||
@@ -775,7 +775,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// <param name="color">A SColorF struct containing a color which the texture will be colored in</param>
|
||||
/// <param name="begin">A Value ranging from 0 to 1 containing the beginning of the texture</param>
|
||||
/// <param name="end">A Value ranging from 0 to 1 containing the ending of the texture</param>
|
||||
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, float begin, float end)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end)
|
||||
{
|
||||
if (!_TextureExists(texture))
|
||||
return;
|
||||
@@ -819,7 +819,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// <param name="bounds">A SRectF struct containing which part of the texture should be drawn</param>
|
||||
/// <param name="space">The space between the texture and the reflection</param>
|
||||
/// <param name="height">The height of the reflection</param>
|
||||
public void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
|
||||
public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
|
||||
{
|
||||
if (!_TextureExists(texture))
|
||||
return;
|
||||
|
||||
@@ -15,10 +15,10 @@ namespace Vocaluxe.Lib.Draw
|
||||
{
|
||||
struct STextureQueue
|
||||
{
|
||||
public readonly CTexture Texture;
|
||||
public readonly CTextureRef Texture;
|
||||
public readonly byte[] Data;
|
||||
|
||||
public STextureQueue(CTexture texture, byte[] data)
|
||||
public STextureQueue(CTextureRef texture, byte[] data)
|
||||
{
|
||||
Texture = texture;
|
||||
Data = data;
|
||||
@@ -141,7 +141,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// <param name="texture"></param>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
protected abstract TTextureType _CreateTexture(CTexture texture, byte[] data);
|
||||
protected abstract TTextureType _CreateTexture(CTextureRef texture, byte[] data);
|
||||
|
||||
/// <summary>
|
||||
/// Creates the texture specified by the reference and fills it with the given data<br />
|
||||
@@ -150,14 +150,14 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// <param name="texture"></param>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual TTextureType _CreateTexture(CTexture texture, IntPtr data)
|
||||
protected virtual TTextureType _CreateTexture(CTextureRef texture, IntPtr data)
|
||||
{
|
||||
byte[] dataArray = new byte[4 * texture.DataSize.Width * texture.DataSize.Height];
|
||||
Marshal.Copy(data, dataArray, 0, dataArray.Length);
|
||||
return _CreateTexture(texture, dataArray);
|
||||
}
|
||||
|
||||
protected CTexture _GetNewTextureRef(int origWidth, int origHeight, int dataWidth = 0, int dataHeight = 0)
|
||||
protected CTextureRef _GetNewTextureRef(int origWidth, int origHeight, int dataWidth = 0, int dataHeight = 0)
|
||||
{
|
||||
Debug.Assert(origWidth > 0 && origHeight > 0);
|
||||
Debug.Assert(dataWidth > 0 || dataHeight <= 0);
|
||||
@@ -168,7 +168,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
}
|
||||
Size origSize = new Size(origWidth, origHeight);
|
||||
Size dataSize = (dataHeight > 0) ? new Size(dataWidth, dataHeight) : origSize;
|
||||
return new CTexture(id, origSize, dataSize, _CheckForNextPowerOf2(dataSize.Width), _CheckForNextPowerOf2(dataSize.Height));
|
||||
return new CTextureRef(id, origSize, dataSize, _CheckForNextPowerOf2(dataSize.Width), _CheckForNextPowerOf2(dataSize.Height));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -176,7 +176,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// </summary>
|
||||
/// <param name="texturePath">The texture's filepath</param>
|
||||
/// <returns>A STexture object containing the added texture</returns>
|
||||
public CTexture AddTexture(string texturePath)
|
||||
public CTextureRef AddTexture(string texturePath)
|
||||
{
|
||||
if (!File.Exists(texturePath))
|
||||
{
|
||||
@@ -193,7 +193,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
CLog.LogError("Error loading Texture: " + texturePath);
|
||||
return null;
|
||||
}
|
||||
CTexture s;
|
||||
CTextureRef s;
|
||||
try
|
||||
{
|
||||
s = AddTexture(bmp, texturePath);
|
||||
@@ -205,7 +205,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
return s;
|
||||
}
|
||||
|
||||
public CTexture AddTexture(Bitmap bmp)
|
||||
public CTextureRef AddTexture(Bitmap bmp)
|
||||
{
|
||||
return AddTexture(bmp, "");
|
||||
}
|
||||
@@ -216,7 +216,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// <param name="bmp">The Bitmap of which the texure will be created from</param>
|
||||
/// <param name="texturePath"></param>
|
||||
/// <returns>A STexture object containing the added texture</returns>
|
||||
public CTexture AddTexture(Bitmap bmp, string texturePath)
|
||||
public CTextureRef AddTexture(Bitmap bmp, string texturePath)
|
||||
{
|
||||
if (bmp.Height == 0 || bmp.Width == 0)
|
||||
return null;
|
||||
@@ -247,7 +247,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
int w = Math.Min(bmp.Width, maxSize);
|
||||
int h = Math.Min(bmp.Height, maxSize);
|
||||
|
||||
CTexture texture = _GetNewTextureRef(bmp.Width, bmp.Height, w, h);
|
||||
CTextureRef texture = _GetNewTextureRef(bmp.Width, bmp.Height, w, h);
|
||||
texture.TexturePath = texturePath;
|
||||
|
||||
Bitmap bmp2 = null;
|
||||
@@ -285,14 +285,14 @@ namespace Vocaluxe.Lib.Draw
|
||||
return texture;
|
||||
}
|
||||
|
||||
public CTexture AddTexture(int w, int h, byte[] data)
|
||||
public CTextureRef AddTexture(int w, int h, byte[] data)
|
||||
{
|
||||
CTexture texture = _GetNewTextureRef(w, h);
|
||||
CTextureRef texture = _GetNewTextureRef(w, h);
|
||||
_AddTexture(texture, data);
|
||||
return texture;
|
||||
}
|
||||
|
||||
private void _AddTexture(CTexture texture, byte[] data)
|
||||
private void _AddTexture(CTextureRef texture, byte[] data)
|
||||
{
|
||||
TTextureType t = _CreateTexture(texture, data);
|
||||
lock (_Textures)
|
||||
@@ -301,7 +301,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
}
|
||||
}
|
||||
|
||||
private void _AddTexture(CTexture texture, IntPtr data)
|
||||
private void _AddTexture(CTextureRef texture, IntPtr data)
|
||||
{
|
||||
TTextureType t = _CreateTexture(texture, data);
|
||||
lock (_Textures)
|
||||
@@ -310,9 +310,9 @@ namespace Vocaluxe.Lib.Draw
|
||||
}
|
||||
}
|
||||
|
||||
public CTexture EnqueueTexture(int w, int h, byte[] data)
|
||||
public CTextureRef EnqueueTexture(int w, int h, byte[] data)
|
||||
{
|
||||
CTexture texture = _GetNewTextureRef(w, h);
|
||||
CTextureRef texture = _GetNewTextureRef(w, h);
|
||||
|
||||
lock (_Textures)
|
||||
{
|
||||
@@ -330,9 +330,9 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// <param name="h"></param>
|
||||
/// <param name="data">A byte array containing the new texture's data</param>
|
||||
/// <returns>True if succeeded</returns>
|
||||
public abstract bool UpdateTexture(CTexture texture, int w, int h, byte[] data);
|
||||
public abstract bool UpdateTexture(CTextureRef texture, int w, int h, byte[] data);
|
||||
|
||||
public bool UpdateOrAddTexture(ref CTexture texture, int w, int h, byte[] data)
|
||||
public bool UpdateOrAddTexture(ref CTextureRef texture, int w, int h, byte[] data)
|
||||
{
|
||||
if (!UpdateTexture(texture, w, h, data))
|
||||
{
|
||||
@@ -347,7 +347,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// </summary>
|
||||
/// <param name="texture">The texture to check</param>
|
||||
/// <returns>True if the texture exists</returns>
|
||||
protected bool _TextureExists(CTexture texture)
|
||||
protected bool _TextureExists(CTextureRef texture)
|
||||
{
|
||||
lock (_Textures)
|
||||
{
|
||||
@@ -356,7 +356,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
}
|
||||
}
|
||||
|
||||
protected TTextureType _GetTexture(CTexture textureRef)
|
||||
protected TTextureType _GetTexture(CTextureRef textureRef)
|
||||
{
|
||||
if (textureRef == null)
|
||||
return null;
|
||||
@@ -369,7 +369,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
/// Removes a texture from the Vram
|
||||
/// </summary>
|
||||
/// <param name="texture">The texture to be removed</param>
|
||||
public void RemoveTexture(ref CTexture texture)
|
||||
public void RemoveTexture(ref CTextureRef texture)
|
||||
{
|
||||
if (texture == null)
|
||||
return;
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
private bool _TopMost;
|
||||
private Rectangle _Bounds;
|
||||
|
||||
private readonly Dictionary<int, CTexture> _Textures = new Dictionary<int, CTexture>();
|
||||
private readonly Dictionary<int, CTextureRef> _Textures = new Dictionary<int, CTextureRef>();
|
||||
private readonly List<Bitmap> _Bitmaps = new List<Bitmap>();
|
||||
|
||||
private readonly Color _ClearColor = Color.DarkBlue;
|
||||
@@ -279,11 +279,11 @@ namespace Vocaluxe.Lib.Draw
|
||||
_G.Clear(_ClearColor);
|
||||
}
|
||||
|
||||
public CTexture CopyScreen()
|
||||
public CTextureRef CopyScreen()
|
||||
{
|
||||
var bmp = new Bitmap(_Backbuffer);
|
||||
_Bitmaps.Add(bmp);
|
||||
CTexture texture = _GetNewTexture(bmp.Width, bmp.Height);
|
||||
CTextureRef texture = _GetNewTexture(bmp.Width, bmp.Height);
|
||||
|
||||
// Add to Texture List
|
||||
_Textures[texture.ID] = texture;
|
||||
@@ -291,7 +291,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
return texture;
|
||||
}
|
||||
|
||||
public void CopyScreen(ref CTexture texture)
|
||||
public void CopyScreen(ref CTextureRef texture)
|
||||
{
|
||||
if (!_TextureExists(texture) || texture.W2 != GetScreenWidth() || texture.H2 != GetScreenHeight())
|
||||
{
|
||||
@@ -318,11 +318,11 @@ namespace Vocaluxe.Lib.Draw
|
||||
|
||||
public void DrawColorReflection(SColorF color, SRectF rect, float space, float height) {}
|
||||
|
||||
public CTexture AddTexture(Bitmap bmp)
|
||||
public CTextureRef AddTexture(Bitmap bmp)
|
||||
{
|
||||
var bmp2 = new Bitmap(bmp);
|
||||
_Bitmaps.Add(bmp2);
|
||||
CTexture texture = _GetNewTexture(bmp.Width, bmp.Height);
|
||||
CTextureRef texture = _GetNewTexture(bmp.Width, bmp.Height);
|
||||
|
||||
// Add to Texture List
|
||||
_Textures[texture.ID] = texture;
|
||||
@@ -330,23 +330,23 @@ namespace Vocaluxe.Lib.Draw
|
||||
return texture;
|
||||
}
|
||||
|
||||
private CTexture _GetNewTexture(int w, int h)
|
||||
private CTextureRef _GetNewTexture(int w, int h)
|
||||
{
|
||||
return new CTexture(_Bitmaps.Count - 1, new Size(w, h), new Size(w, h));
|
||||
return new CTextureRef(_Bitmaps.Count - 1, new Size(w, h), new Size(w, h));
|
||||
}
|
||||
|
||||
public CTexture AddTexture(string texturePath)
|
||||
public CTextureRef AddTexture(string texturePath)
|
||||
{
|
||||
if (File.Exists(texturePath))
|
||||
{
|
||||
foreach (CTexture tex in _Textures.Values)
|
||||
foreach (CTextureRef tex in _Textures.Values)
|
||||
{
|
||||
if (tex.TexturePath == texturePath)
|
||||
return tex;
|
||||
}
|
||||
using (var bmp = new Bitmap(texturePath))
|
||||
{
|
||||
CTexture texture = AddTexture(bmp);
|
||||
CTextureRef texture = AddTexture(bmp);
|
||||
texture.TexturePath = texturePath;
|
||||
}
|
||||
}
|
||||
@@ -354,12 +354,12 @@ namespace Vocaluxe.Lib.Draw
|
||||
return null;
|
||||
}
|
||||
|
||||
private bool _TextureExists(CTexture texture)
|
||||
private bool _TextureExists(CTextureRef texture)
|
||||
{
|
||||
return texture != null && _Textures.ContainsKey(texture.ID);
|
||||
}
|
||||
|
||||
public void RemoveTexture(ref CTexture texture)
|
||||
public void RemoveTexture(ref CTextureRef texture)
|
||||
{
|
||||
if (_TextureExists(texture))
|
||||
{
|
||||
@@ -369,12 +369,12 @@ namespace Vocaluxe.Lib.Draw
|
||||
texture = null;
|
||||
}
|
||||
|
||||
public CTexture EnqueueTexture(int w, int h, byte[] data)
|
||||
public CTextureRef EnqueueTexture(int w, int h, byte[] data)
|
||||
{
|
||||
return AddTexture(w, h, data);
|
||||
}
|
||||
|
||||
public CTexture AddTexture(int w, int h, byte[] data)
|
||||
public CTextureRef AddTexture(int w, int h, byte[] data)
|
||||
{
|
||||
using (var bmp = new Bitmap(w, h))
|
||||
{
|
||||
@@ -385,7 +385,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
}
|
||||
}
|
||||
|
||||
public bool UpdateTexture(CTexture texture, int w, int h, byte[] data)
|
||||
public bool UpdateTexture(CTextureRef texture, int w, int h, byte[] data)
|
||||
{
|
||||
if (_TextureExists(texture))
|
||||
{
|
||||
@@ -398,7 +398,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool UpdateOrAddTexture(ref CTexture texture, int w, int h, byte[] data)
|
||||
public bool UpdateOrAddTexture(ref CTextureRef texture, int w, int h, byte[] data)
|
||||
{
|
||||
if (!UpdateTexture(texture, w, h, data))
|
||||
{
|
||||
@@ -408,25 +408,25 @@ namespace Vocaluxe.Lib.Draw
|
||||
return true;
|
||||
}
|
||||
|
||||
public void DrawTexture(CTexture texture)
|
||||
public void DrawTexture(CTextureRef texture)
|
||||
{
|
||||
if (texture != null)
|
||||
DrawTexture(texture, texture.Rect, texture.Color);
|
||||
}
|
||||
|
||||
public void DrawTexture(CTexture texture, SRectF rect)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect)
|
||||
{
|
||||
if (texture != null)
|
||||
DrawTexture(texture, rect, texture.Color);
|
||||
}
|
||||
|
||||
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, bool mirrored = false)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, bool mirrored = false)
|
||||
{
|
||||
if (texture != null)
|
||||
DrawTexture(texture, rect, color, rect, mirrored);
|
||||
}
|
||||
|
||||
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
|
||||
{
|
||||
if (!_TextureExists(texture))
|
||||
return;
|
||||
@@ -435,9 +435,9 @@ namespace Vocaluxe.Lib.Draw
|
||||
coloredBitmap.Dispose();
|
||||
}
|
||||
|
||||
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, float begin, float end) {}
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end) {}
|
||||
|
||||
public void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float space, float height) {}
|
||||
public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height) {}
|
||||
|
||||
public int GetTextureCount()
|
||||
{
|
||||
|
||||
@@ -275,9 +275,9 @@ namespace Vocaluxe.Lib.Draw
|
||||
GL.Ortho(-CConfig.BorderLeft, CConfig.BorderRight + CSettings.RenderW, CConfig.BorderBottom + CSettings.RenderH, -CConfig.BorderTop, CSettings.ZNear, CSettings.ZFar);
|
||||
}
|
||||
|
||||
public CTexture CopyScreen()
|
||||
public CTextureRef CopyScreen()
|
||||
{
|
||||
CTexture texture = _GetNewTextureRef(_W, _H);
|
||||
CTextureRef texture = _GetNewTextureRef(_W, _H);
|
||||
|
||||
CGLTexture t = new CGLTexture(GL.GenTexture());
|
||||
GL.BindTexture(TextureTarget.Texture2D, t.Name);
|
||||
@@ -299,7 +299,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
return texture;
|
||||
}
|
||||
|
||||
public void CopyScreen(ref CTexture texture)
|
||||
public void CopyScreen(ref CTextureRef texture)
|
||||
{
|
||||
//Check for actual texture sizes as it may be downsized compared to OrigSize
|
||||
if (!_TextureExists(texture) || texture.DataSize.Width != GetScreenWidth() || texture.DataSize.Height != GetScreenHeight())
|
||||
@@ -419,7 +419,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
#region Textures
|
||||
|
||||
#region adding
|
||||
protected override CGLTexture _CreateTexture(CTexture texture, IntPtr data)
|
||||
protected override CGLTexture _CreateTexture(CTextureRef texture, IntPtr data)
|
||||
{
|
||||
CGLTexture t = new CGLTexture(GL.GenTexture());
|
||||
|
||||
@@ -439,7 +439,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
return t;
|
||||
}
|
||||
|
||||
protected override CGLTexture _CreateTexture(CTexture texture, byte[] data)
|
||||
protected override CGLTexture _CreateTexture(CTextureRef texture, byte[] data)
|
||||
{
|
||||
CGLTexture t = new CGLTexture(GL.GenTexture());
|
||||
|
||||
@@ -476,7 +476,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
#endregion adding
|
||||
|
||||
#region updating
|
||||
public override bool UpdateTexture(CTexture texture, int w, int h, byte[] data)
|
||||
public override bool UpdateTexture(CTextureRef texture, int w, int h, byte[] data)
|
||||
{
|
||||
CGLTexture t = _GetTexture(texture);
|
||||
if (t == null)
|
||||
@@ -524,21 +524,21 @@ namespace Vocaluxe.Lib.Draw
|
||||
#endregion updating
|
||||
|
||||
#region drawing
|
||||
public void DrawTexture(CTexture texture)
|
||||
public void DrawTexture(CTextureRef texture)
|
||||
{
|
||||
if (texture == null)
|
||||
return;
|
||||
DrawTexture(texture, texture.Rect, texture.Color);
|
||||
}
|
||||
|
||||
public void DrawTexture(CTexture texture, SRectF rect)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect)
|
||||
{
|
||||
if (texture == null)
|
||||
return;
|
||||
DrawTexture(texture, rect, texture.Color);
|
||||
}
|
||||
|
||||
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, bool mirrored = false)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, bool mirrored = false)
|
||||
{
|
||||
CGLTexture t = _GetTexture(texture);
|
||||
if (t == null)
|
||||
@@ -601,7 +601,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
GL.BindTexture(TextureTarget.Texture2D, 0);
|
||||
}
|
||||
|
||||
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false)
|
||||
{
|
||||
CGLTexture t = _GetTexture(texture);
|
||||
if (t == null)
|
||||
@@ -696,7 +696,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
GL.BindTexture(TextureTarget.Texture2D, 0);
|
||||
}
|
||||
|
||||
public void DrawTexture(CTexture texture, SRectF rect, SColorF color, float begin, float end)
|
||||
public void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end)
|
||||
{
|
||||
CGLTexture t = _GetTexture(texture);
|
||||
if (t == null)
|
||||
@@ -729,7 +729,7 @@ namespace Vocaluxe.Lib.Draw
|
||||
GL.BindTexture(TextureTarget.Texture2D, 0);
|
||||
}
|
||||
|
||||
public void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
|
||||
public void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height)
|
||||
{
|
||||
CGLTexture t = _GetTexture(texture);
|
||||
if (t == null)
|
||||
|
||||
+15
-15
@@ -33,29 +33,29 @@ namespace Vocaluxe.Lib.Draw
|
||||
int GetTextureCount();
|
||||
|
||||
void ClearScreen();
|
||||
CTexture CopyScreen();
|
||||
void CopyScreen(ref CTexture texture);
|
||||
CTextureRef CopyScreen();
|
||||
void CopyScreen(ref CTextureRef texture);
|
||||
void MakeScreenShot();
|
||||
|
||||
CTexture AddTexture(string texturePath);
|
||||
CTexture AddTexture(Bitmap bitmap);
|
||||
CTexture AddTexture(int w, int h, byte[] data);
|
||||
CTexture EnqueueTexture(int w, int h, byte[] data);
|
||||
bool UpdateTexture(CTexture texture, int w, int h, byte[] data);
|
||||
bool UpdateOrAddTexture(ref CTexture texture, int w, int h, byte[] data);
|
||||
void RemoveTexture(ref CTexture texture);
|
||||
CTextureRef AddTexture(string texturePath);
|
||||
CTextureRef AddTexture(Bitmap bitmap);
|
||||
CTextureRef AddTexture(int w, int h, byte[] data);
|
||||
CTextureRef EnqueueTexture(int w, int h, byte[] data);
|
||||
bool UpdateTexture(CTextureRef texture, int w, int h, byte[] data);
|
||||
bool UpdateOrAddTexture(ref CTextureRef texture, int w, int h, byte[] data);
|
||||
void RemoveTexture(ref CTextureRef texture);
|
||||
|
||||
// Basic Draw Methods
|
||||
void DrawLine(int a, int r, int g, int b, int w, int x1, int y1, int x2, int y2);
|
||||
void DrawColor(SColorF color, SRectF rect);
|
||||
void DrawColorReflection(SColorF color, SRectF rect, float space, float height);
|
||||
|
||||
void DrawTexture(CTexture texture);
|
||||
void DrawTexture(CTexture texture, SRectF rect);
|
||||
void DrawTexture(CTexture texture, SRectF rect, SColorF color, bool mirrored = false);
|
||||
void DrawTexture(CTexture texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false);
|
||||
void DrawTexture(CTexture texture, SRectF rect, SColorF color, float begin, float end);
|
||||
void DrawTexture(CTextureRef texture);
|
||||
void DrawTexture(CTextureRef texture, SRectF rect);
|
||||
void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, bool mirrored = false);
|
||||
void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false);
|
||||
void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, float begin, float end);
|
||||
|
||||
void DrawTextureReflection(CTexture texture, SRectF rect, SColorF color, SRectF bounds, float space, float height);
|
||||
void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float space, float height);
|
||||
}
|
||||
}
|
||||
@@ -102,7 +102,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
|
||||
Finished = true;
|
||||
}
|
||||
|
||||
public bool GetFrame(ref CTexture frame, float time, out float videoTime)
|
||||
public bool GetFrame(ref CTextureRef frame, float time, out float videoTime)
|
||||
{
|
||||
if (Finished)
|
||||
{
|
||||
|
||||
@@ -193,7 +193,7 @@ namespace Vocaluxe.Lib.Video.Acinerella
|
||||
/// <param name="time">Maximum start time for frame</param>
|
||||
/// <param name="finished">Set to whether there are no more frames (stream finished, no loop, future calls will always return false)</param>
|
||||
/// <returns>True if a new frame was gotten</returns>
|
||||
public bool GetFrame(ref CTexture frame, ref float time, out bool finished)
|
||||
public bool GetFrame(ref CTextureRef frame, ref float time, out bool finished)
|
||||
{
|
||||
bool result;
|
||||
if (Math.Abs(_LastShownTime - time) < _FrameDuration && frame != null) //Check 1 frame difference
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Vocaluxe.Lib.Video
|
||||
return _Decoder.Count;
|
||||
}
|
||||
|
||||
public bool GetFrame(int streamID, ref CTexture frame, float time, out float videoTime)
|
||||
public bool GetFrame(int streamID, ref CTextureRef frame, float time, out float videoTime)
|
||||
{
|
||||
CDecoder decoder;
|
||||
if (_Decoder.TryGetValue(streamID, out decoder))
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace Vocaluxe.Lib.Video
|
||||
/// </param>
|
||||
/// <param name="videoTime">The actual position in s of the returned frame. Should be ~ time+VideoGap</param>
|
||||
/// <returns>True if frame is valid, false: frame and videoTime might be unchanged or invalid</returns>
|
||||
bool GetFrame(int streamID, ref CTexture frame, float time, out float videoTime);
|
||||
bool GetFrame(int streamID, ref CTextureRef frame, float time, out float videoTime);
|
||||
|
||||
/// <summary>
|
||||
/// Seeks to given position
|
||||
|
||||
@@ -201,7 +201,7 @@ namespace Vocaluxe.Lib.Webcam
|
||||
}
|
||||
}
|
||||
|
||||
public bool GetFrame(ref CTexture frame)
|
||||
public bool GetFrame(ref CTextureRef frame)
|
||||
{
|
||||
lock (_MutexData)
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace Vocaluxe.Lib.Webcam
|
||||
/// </summary>
|
||||
/// <param name="frame"></param>
|
||||
/// <returns></returns>
|
||||
bool GetFrame(ref CTexture frame);
|
||||
bool GetFrame(ref CTextureRef frame);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the last captured frame as a bitma
|
||||
|
||||
@@ -33,11 +33,11 @@ namespace Vocaluxe.Screens
|
||||
get { return 1; }
|
||||
}
|
||||
|
||||
private CTexture _QRServerAddress;
|
||||
private CTexture _QRAndroidLink;
|
||||
private CTexture _QRSymbianLink;
|
||||
private CTexture _QRWebOSLink;
|
||||
private CTexture _QRWindowsPhoneLink;
|
||||
private CTextureRef _QRServerAddress;
|
||||
private CTextureRef _QRAndroidLink;
|
||||
private CTextureRef _QRSymbianLink;
|
||||
private CTextureRef _QRWebOSLink;
|
||||
private CTextureRef _QRWindowsPhoneLink;
|
||||
|
||||
private const string _StaticQRServer = "StaticQRServer";
|
||||
private const string _StaticQRAndroid = "StaticQRAndroid";
|
||||
|
||||
@@ -126,21 +126,21 @@ namespace Vocaluxe.Screens
|
||||
private List<string[]> _Paragraphs;
|
||||
private List<CText> _ParagraphTexts;
|
||||
|
||||
private CTexture _TexLogo;
|
||||
private CTexture _TexPerfectNoteStar;
|
||||
private CTextureRef _TexLogo;
|
||||
private CTextureRef _TexPerfectNoteStar;
|
||||
|
||||
private CTexture _TexRedDot;
|
||||
private CTexture _TexBlueDot;
|
||||
private CTextureRef _TexRedDot;
|
||||
private CTextureRef _TexBlueDot;
|
||||
|
||||
private CTexture _TexNameBrunzel;
|
||||
private CTexture _TexNameDarkice;
|
||||
private CTexture _TexNameFlokuep;
|
||||
private CTexture _TexNameFlamefire;
|
||||
private CTexture _TexNameMesand;
|
||||
private CTexture _TexNameBohning;
|
||||
private CTexture _TexNameBabene03;
|
||||
private CTexture _TexNamePantero;
|
||||
private CTexture _TexNamePinky007;
|
||||
private CTextureRef _TexNameBrunzel;
|
||||
private CTextureRef _TexNameDarkice;
|
||||
private CTextureRef _TexNameFlokuep;
|
||||
private CTextureRef _TexNameFlamefire;
|
||||
private CTextureRef _TexNameMesand;
|
||||
private CTextureRef _TexNameBohning;
|
||||
private CTextureRef _TexNameBabene03;
|
||||
private CTextureRef _TexNamePantero;
|
||||
private CTextureRef _TexNamePinky007;
|
||||
|
||||
public override void Init()
|
||||
{
|
||||
@@ -286,12 +286,12 @@ namespace Vocaluxe.Screens
|
||||
return GetNewParticleEffect(numStars, partColor, rect, _TexPerfectNoteStar, partSize, EParticleType.Star);
|
||||
}
|
||||
|
||||
private void _AddNewCreditName(CTexture texture, int particleOffsetX, int particleOffsetY, bool bigParticles)
|
||||
private void _AddNewCreditName(CTextureRef texture, int particleOffsetX, int particleOffsetY, bool bigParticles)
|
||||
{
|
||||
bool isRight = _CreditNames.Count % 2 == 0;
|
||||
int partRectSize = bigParticles ? 25 : 20;
|
||||
int partCount = bigParticles ? 8 : 6;
|
||||
CTexture texDot = isRight ? _TexRedDot : _TexBlueDot;
|
||||
CTextureRef texDot = isRight ? _TexRedDot : _TexBlueDot;
|
||||
|
||||
CStatic image = GetNewStatic(texture, new SColorF(1, 1, 1, 1), new SRectF(-1, -1, 400, 120, -4));
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Vocaluxe.Screens
|
||||
{"EqualizerPlayer1", "EqualizerPlayer2", "EqualizerPlayer3", "EqualizerPlayer4", "EqualizerPlayer5", "EqualizerPlayer6"};
|
||||
private readonly string[] _SelectSlideDuetPlayer = new string[]
|
||||
{"SelectSlideDuetPlayer1", "SelectSlideDuetPlayer2", "SelectSlideDuetPlayer3", "SelectSlideDuetPlayer4", "SelectSlideDuetPlayer5", "SelectSlideDuetPlayer6"};
|
||||
private readonly CTexture[] _OriginalPlayerAvatarTextures = new CTexture[CSettings.MaxNumPlayer];
|
||||
private readonly CTextureRef[] _OriginalPlayerAvatarTextures = new CTextureRef[CSettings.MaxNumPlayer];
|
||||
|
||||
private bool _SelectingKeyboardActive;
|
||||
private bool _SelectingFast;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Vocaluxe.Screens
|
||||
private const string _TextWebcamResolution = "TextWebcamResolution";
|
||||
|
||||
private SWebcamConfig _Config;
|
||||
private CTexture _WebcamTexture;
|
||||
private CTextureRef _WebcamTexture;
|
||||
private int _DeviceNr;
|
||||
private int _CapabilityNr;
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Vocaluxe.Screens
|
||||
|
||||
private EEditMode _EditMode;
|
||||
|
||||
private CTexture _WebcamTexture;
|
||||
private CTextureRef _WebcamTexture;
|
||||
private Bitmap _Snapshot;
|
||||
|
||||
public override void Init()
|
||||
|
||||
@@ -99,9 +99,9 @@ namespace Vocaluxe.Screens
|
||||
private const float _Volume = 100f;
|
||||
private int _CurrentVideo = -1;
|
||||
private EAspect _VideoAspect = EAspect.Crop;
|
||||
private CTexture _CurrentVideoTexture;
|
||||
private CTexture _CurrentWebcamFrameTexture;
|
||||
private CTexture _Background;
|
||||
private CTextureRef _CurrentVideoTexture;
|
||||
private CTextureRef _CurrentWebcamFrameTexture;
|
||||
private CTextureRef _Background;
|
||||
|
||||
private float _CurrentTime;
|
||||
private float _FinishTime;
|
||||
@@ -450,7 +450,7 @@ namespace Vocaluxe.Screens
|
||||
{
|
||||
if (_Active)
|
||||
{
|
||||
CTexture background;
|
||||
CTextureRef background;
|
||||
var aspect = EAspect.Crop;
|
||||
if (_CurrentVideo != -1 && CConfig.VideosInSongs == EOffOn.TR_CONFIG_ON && !_Webcam)
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace VocaluxeLib.Draw
|
||||
/// <summary>
|
||||
/// Reference to a texture in the drawing driver
|
||||
/// </summary>
|
||||
public class CTexture
|
||||
public class CTextureRef
|
||||
{
|
||||
public readonly int ID;
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace VocaluxeLib.Draw
|
||||
/// <param name="dataSize">Size of the data used</param>
|
||||
/// <param name="texWidth">Width in video memory</param>
|
||||
/// <param name="texHeight">Height in video memory</param>
|
||||
public CTexture(int id, Size origSize, Size dataSize, int texWidth = 0, int texHeight = 0)
|
||||
public CTextureRef(int id, Size origSize, Size dataSize, int texWidth = 0, int texHeight = 0)
|
||||
{
|
||||
ID = id;
|
||||
_DataSize = dataSize;
|
||||
+15
-15
@@ -99,8 +99,8 @@ namespace VocaluxeLib
|
||||
{
|
||||
string GetThemeScreensPath(int partyModeID);
|
||||
int GetSkinIndex(int partyModeID);
|
||||
CTexture GetSkinTexture(string textureName, int partyModeID);
|
||||
CTexture GetSkinVideoTexture(string videoName, int partyModeID);
|
||||
CTextureRef GetSkinTexture(string textureName, int partyModeID);
|
||||
CTextureRef GetSkinVideoTexture(string videoName, int partyModeID);
|
||||
|
||||
void SkinVideoResume(string videoName, int partyModeID);
|
||||
void SkinVideoPause(string videoName, int partyModeID);
|
||||
@@ -131,7 +131,7 @@ namespace VocaluxeLib
|
||||
void Play();
|
||||
void Stop();
|
||||
|
||||
CTexture GetVideoTexture();
|
||||
CTextureRef GetVideoTexture();
|
||||
|
||||
void LoadPreview(CSong song, float start = 0f);
|
||||
void PlayPreview(float start = -1f);
|
||||
@@ -140,13 +140,13 @@ namespace VocaluxeLib
|
||||
|
||||
public interface IDrawing
|
||||
{
|
||||
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);
|
||||
void DrawTexture(CTextureRef texture, SRectF rect);
|
||||
void DrawTexture(CTextureRef texture, SRectF rect, SColorF color);
|
||||
void DrawTexture(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, bool mirrored = false);
|
||||
void DrawTextureReflection(CTextureRef texture, SRectF rect, SColorF color, SRectF bounds, float reflectionSpace, float reflectionHeight);
|
||||
|
||||
CTexture AddTexture(string fileName);
|
||||
void RemoveTexture(ref CTexture texture);
|
||||
CTextureRef AddTexture(string fileName);
|
||||
void RemoveTexture(ref CTextureRef texture);
|
||||
|
||||
void DrawColor(SColorF color, SRectF rect);
|
||||
void DrawColorReflection(SColorF color, SRectF rect, float space, float height);
|
||||
@@ -223,7 +223,7 @@ namespace VocaluxeLib
|
||||
CProfile[] GetProfiles();
|
||||
EGameDifficulty GetDifficulty(int profileID);
|
||||
string GetPlayerName(int profileID, int playerNum = 0);
|
||||
CTexture GetAvatar(int profileID);
|
||||
CTextureRef GetAvatar(int profileID);
|
||||
CAvatar GetAvatarByFilename(string fileName);
|
||||
bool IsProfileIDValid(int profileID);
|
||||
bool IsGuest(int profileID);
|
||||
@@ -264,7 +264,7 @@ namespace VocaluxeLib
|
||||
{
|
||||
int Load(string videoFileName);
|
||||
bool Skip(int streamID, float startPosition, float videoGap);
|
||||
bool GetFrame(int streamID, ref CTexture videoTexture, float time, out float videoTime);
|
||||
bool GetFrame(int streamID, ref CTextureRef videoTexture, float time, out float videoTime);
|
||||
bool IsFinished(int streamID);
|
||||
bool Close(int streamID);
|
||||
void SetLoop(int streamID, bool loop = true);
|
||||
@@ -289,12 +289,12 @@ namespace VocaluxeLib
|
||||
|
||||
public interface ICover
|
||||
{
|
||||
CTexture GetNoCover();
|
||||
CTextureRef GetNoCover();
|
||||
}
|
||||
|
||||
public interface IDataBase
|
||||
{
|
||||
bool GetCover(string fileName, ref CTexture texture, int coverSize);
|
||||
bool GetCover(string fileName, ref CTextureRef texture, int coverSize);
|
||||
bool GetDataBaseSongInfos(string artist, string title, out int numPlayed, out DateTime dateAdded, out int highscoreID);
|
||||
}
|
||||
|
||||
@@ -333,8 +333,8 @@ namespace VocaluxeLib
|
||||
void Load(CSong song, float start = 0f);
|
||||
void Stop();
|
||||
void TogglePause();
|
||||
CTexture GetCover();
|
||||
CTexture GetVideoTexture();
|
||||
CTextureRef GetCover();
|
||||
CTextureRef GetVideoTexture();
|
||||
bool IsPlaying();
|
||||
float GetLength();
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private int _SlideShowCurrent;
|
||||
private readonly Stopwatch _SlideShowTimer = new Stopwatch();
|
||||
private readonly List<CTexture> _SlideShowTextures = new List<CTexture>();
|
||||
private readonly List<CTextureRef> _SlideShowTextures = new List<CTextureRef>();
|
||||
|
||||
public SColorF Color;
|
||||
|
||||
@@ -223,7 +223,7 @@ namespace VocaluxeLib.Menu
|
||||
_Theme.Type = EBackgroundTypes.SlideShow;
|
||||
if (!String.IsNullOrEmpty(image))
|
||||
{
|
||||
CTexture texture = CBase.Drawing.AddTexture(image);
|
||||
CTextureRef texture = CBase.Drawing.AddTexture(image);
|
||||
if (texture != null)
|
||||
_SlideShowTextures.Add(texture);
|
||||
}
|
||||
@@ -231,9 +231,9 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void RemoveSlideShowTextures()
|
||||
{
|
||||
foreach (CTexture tex in _SlideShowTextures)
|
||||
foreach (CTextureRef tex in _SlideShowTextures)
|
||||
{
|
||||
CTexture texture = tex;
|
||||
CTextureRef texture = tex;
|
||||
CBase.Drawing.RemoveTexture(ref texture);
|
||||
}
|
||||
_SlideShowTextures.Clear();
|
||||
@@ -256,7 +256,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private bool _DrawTexture()
|
||||
{
|
||||
CTexture texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
CTextureRef texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
if (texture != null)
|
||||
{
|
||||
var bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
|
||||
@@ -288,7 +288,7 @@ namespace VocaluxeLib.Menu
|
||||
_SlideShowCurrent = 0;
|
||||
}
|
||||
|
||||
CTexture texture = _SlideShowTextures[_SlideShowCurrent];
|
||||
CTextureRef texture = _SlideShowTextures[_SlideShowCurrent];
|
||||
|
||||
if (texture == null)
|
||||
return false;
|
||||
@@ -323,7 +323,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private bool _DrawVideo()
|
||||
{
|
||||
CTexture videoTexture = CBase.Theme.GetSkinVideoTexture(_Theme.VideoName, _PartyModeID);
|
||||
CTextureRef videoTexture = CBase.Theme.GetSkinVideoTexture(_Theme.VideoName, _PartyModeID);
|
||||
if (videoTexture != null)
|
||||
{
|
||||
var bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
|
||||
@@ -338,7 +338,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private bool _DrawBackgroundMusicVideo()
|
||||
{
|
||||
CTexture videoTexture = CBase.BackgroundMusic.GetVideoTexture();
|
||||
CTextureRef videoTexture = CBase.BackgroundMusic.GetVideoTexture();
|
||||
if (videoTexture != null)
|
||||
{
|
||||
var bounds = new RectangleF(0f, 0f, CBase.Settings.GetRenderW(), CBase.Settings.GetRenderH());
|
||||
|
||||
@@ -38,8 +38,8 @@ namespace VocaluxeLib.Menu
|
||||
private bool _ThemeLoaded;
|
||||
private readonly int _PartyModeID;
|
||||
|
||||
public CTexture Texture;
|
||||
public CTexture SelTexture;
|
||||
public CTextureRef Texture;
|
||||
public CTextureRef SelTexture;
|
||||
public SRectF Rect;
|
||||
public SColorF Color;
|
||||
public SColorF SelColor;
|
||||
@@ -290,7 +290,7 @@ namespace VocaluxeLib.Menu
|
||||
if (!Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme && !forceDraw)
|
||||
return;
|
||||
|
||||
CTexture texture;
|
||||
CTextureRef texture;
|
||||
|
||||
if (!Selected && !Pressed || !_Enabled)
|
||||
{
|
||||
|
||||
@@ -476,7 +476,7 @@ namespace VocaluxeLib.Menu
|
||||
return new CStatic(oldStatic);
|
||||
}
|
||||
|
||||
public CStatic GetNewStatic(CTexture texture, SColorF color, SRectF rect)
|
||||
public CStatic GetNewStatic(CTextureRef texture, SColorF color, SRectF rect)
|
||||
{
|
||||
return new CStatic(_PartyModeID, texture, color, rect);
|
||||
}
|
||||
@@ -521,7 +521,7 @@ namespace VocaluxeLib.Menu
|
||||
return new CPlaylist(_PartyModeID);
|
||||
}
|
||||
|
||||
public CParticleEffect GetNewParticleEffect(int maxNumber, SColorF color, SRectF area, CTexture texture, float size, EParticleType type)
|
||||
public CParticleEffect GetNewParticleEffect(int maxNumber, SColorF color, SRectF area, CTextureRef texture, float size, EParticleType type)
|
||||
{
|
||||
return new CParticleEffect(_PartyModeID, maxNumber, color, area, texture, size, type);
|
||||
}
|
||||
|
||||
@@ -683,7 +683,7 @@ namespace VocaluxeLib.Menu
|
||||
for (int i = 0; i < _TeamList[_CurrentTeam].Count; i++)
|
||||
{
|
||||
string name = CBase.Profiles.GetPlayerName(_TeamList[_CurrentTeam][i]);
|
||||
CTexture avatar = CBase.Profiles.GetAvatar(_TeamList[_CurrentTeam][i]);
|
||||
CTextureRef avatar = CBase.Profiles.GetAvatar(_TeamList[_CurrentTeam][i]);
|
||||
_SelectSlides[_SelectSlidePlayer].AddValue(name, avatar);
|
||||
}
|
||||
for (int i = _TeamList[_CurrentTeam].Count; i < _NumPlayerTeams[_CurrentTeam]; i++)
|
||||
|
||||
@@ -69,9 +69,9 @@ namespace VocaluxeLib.Menu
|
||||
public SRectF Rect;
|
||||
private readonly List<CTile> _Tiles;
|
||||
|
||||
private CTexture _TextureEmptyTile;
|
||||
private CTexture _TextureTileSelected;
|
||||
public CTexture TextureEmptyTile
|
||||
private CTextureRef _TextureEmptyTile;
|
||||
private CTextureRef _TextureTileSelected;
|
||||
public CTextureRef TextureEmptyTile
|
||||
{
|
||||
get { return _TextureEmptyTile; }
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace VocaluxeLib.Menu
|
||||
#region private vars
|
||||
private readonly int _PartyModeID;
|
||||
private readonly string _TextureName;
|
||||
private readonly CTexture _Texture;
|
||||
private readonly CTextureRef _Texture;
|
||||
private SRectF _Rect;
|
||||
private float _Size;
|
||||
private SColorF _Color;
|
||||
@@ -127,7 +127,7 @@ namespace VocaluxeLib.Menu
|
||||
_Rotation = (float)(CBase.Game.GetRandomDouble() * 360.0);
|
||||
}
|
||||
|
||||
public CParticle(int partyModeID, CTexture texture, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize,
|
||||
public CParticle(int partyModeID, CTextureRef texture, SColorF color, float x, float y, float size, float maxage, float z, float vx, float vy, float vr, float vsize,
|
||||
EParticleType type)
|
||||
{
|
||||
_PartyModeID = partyModeID;
|
||||
@@ -300,7 +300,7 @@ namespace VocaluxeLib.Menu
|
||||
private SThemeParticleEffect _Theme;
|
||||
private bool _ThemeLoaded;
|
||||
|
||||
public CTexture Texture;
|
||||
public CTextureRef Texture;
|
||||
public SColorF Color;
|
||||
public SRectF Rect;
|
||||
|
||||
@@ -352,7 +352,7 @@ namespace VocaluxeLib.Menu
|
||||
Visible = true;
|
||||
}
|
||||
|
||||
public CParticleEffect(int partyModeID, int maxNumber, SColorF color, SRectF rect, CTexture texture, float size, EParticleType type)
|
||||
public CParticleEffect(int partyModeID, int maxNumber, SColorF color, SRectF rect, CTextureRef texture, float size, EParticleType type)
|
||||
{
|
||||
_PartyModeID = partyModeID;
|
||||
_Theme = new SThemeParticleEffect();
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace VocaluxeLib.Menu
|
||||
}
|
||||
}
|
||||
|
||||
private CTexture _GetTextureValue(string value)
|
||||
private CTextureRef _GetTextureValue(string value)
|
||||
{
|
||||
return CBase.Theme.GetSkinTexture(value, _PartyModeID);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
private readonly List<string> _ValueNames;
|
||||
private readonly List<int> _ValuePartyModeIDs;
|
||||
private readonly List<CTexture> _Textures;
|
||||
private readonly List<CTextureRef> _Textures;
|
||||
private readonly List<int> _ValueIndexes;
|
||||
|
||||
private readonly List<SRectF> _ValueBounds = new List<SRectF>();
|
||||
@@ -179,7 +179,7 @@ namespace VocaluxeLib.Menu
|
||||
MaxW = 0f;
|
||||
|
||||
_Selected = false;
|
||||
_Textures = new List<CTexture>();
|
||||
_Textures = new List<CTextureRef>();
|
||||
_ValueIndexes = new List<int>();
|
||||
_ValueNames = new List<string>();
|
||||
_ValuePartyModeIDs = new List<int>();
|
||||
@@ -227,7 +227,7 @@ namespace VocaluxeLib.Menu
|
||||
MaxW = slide.MaxW;
|
||||
|
||||
_Selected = slide._Selected;
|
||||
_Textures = new List<CTexture>(slide._Textures);
|
||||
_Textures = new List<CTextureRef>(slide._Textures);
|
||||
_ValueIndexes = new List<int>(slide._ValueIndexes);
|
||||
_ValueNames = new List<string>(slide._ValueNames);
|
||||
_ValueBounds = new List<SRectF>(slide._ValueBounds);
|
||||
@@ -534,17 +534,17 @@ namespace VocaluxeLib.Menu
|
||||
AddValue(value, null, _ValueIndexes.Count, partyModeID);
|
||||
}
|
||||
|
||||
public void AddValue(string value, CTexture texture)
|
||||
public void AddValue(string value, CTextureRef texture)
|
||||
{
|
||||
AddValue(value, texture, _ValueIndexes.Count, _PartyModeID);
|
||||
}
|
||||
|
||||
private void _AddValue(string value, CTexture texture, int valueIndex)
|
||||
private void _AddValue(string value, CTextureRef texture, int valueIndex)
|
||||
{
|
||||
AddValue(value, texture, valueIndex, _PartyModeID);
|
||||
}
|
||||
|
||||
public void AddValue(string value, CTexture texture, int valueIndex, int partyModeID)
|
||||
public void AddValue(string value, CTextureRef texture, int valueIndex, int partyModeID)
|
||||
{
|
||||
_ValueNames.Add(value);
|
||||
_Textures.Add(texture);
|
||||
@@ -565,7 +565,7 @@ namespace VocaluxeLib.Menu
|
||||
_ValueBounds.Clear();
|
||||
}
|
||||
|
||||
public void AddValues(string[] values, CTexture[] textures)
|
||||
public void AddValues(string[] values, CTextureRef[] textures)
|
||||
{
|
||||
if (values.Length != textures.Length)
|
||||
return;
|
||||
@@ -589,7 +589,7 @@ namespace VocaluxeLib.Menu
|
||||
RenameValue(Selection, newName);
|
||||
}
|
||||
|
||||
public void RenameValue(int selection, string newName, CTexture newTexture = null)
|
||||
public void RenameValue(int selection, string newName, CTextureRef newTexture = null)
|
||||
{
|
||||
if (selection < 0 && selection >= _ValueNames.Count)
|
||||
return;
|
||||
@@ -713,15 +713,15 @@ namespace VocaluxeLib.Menu
|
||||
if (!Visible && CBase.Settings.GetProgramState() != EProgramState.EditTheme)
|
||||
return;
|
||||
|
||||
CTexture texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
CTexture textureArrowLeft = CBase.Theme.GetSkinTexture(_Theme.TextureArrowLeftName, _PartyModeID);
|
||||
CTexture textureArrowRight = CBase.Theme.GetSkinTexture(_Theme.TextureArrowRightName, _PartyModeID);
|
||||
CTextureRef texture = CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID);
|
||||
CTextureRef textureArrowLeft = CBase.Theme.GetSkinTexture(_Theme.TextureArrowLeftName, _PartyModeID);
|
||||
CTextureRef textureArrowRight = CBase.Theme.GetSkinTexture(_Theme.TextureArrowRightName, _PartyModeID);
|
||||
|
||||
CTexture selTexture = CBase.Theme.GetSkinTexture(_Theme.SelTextureName, _PartyModeID);
|
||||
CTexture selTextureArrowLeft = CBase.Theme.GetSkinTexture(_Theme.SelTextureArrowLeftName, _PartyModeID);
|
||||
CTexture selTextureArrowRight = CBase.Theme.GetSkinTexture(_Theme.SelTextureArrowRightName, _PartyModeID);
|
||||
CTextureRef selTexture = CBase.Theme.GetSkinTexture(_Theme.SelTextureName, _PartyModeID);
|
||||
CTextureRef selTextureArrowLeft = CBase.Theme.GetSkinTexture(_Theme.SelTextureArrowLeftName, _PartyModeID);
|
||||
CTextureRef selTextureArrowRight = CBase.Theme.GetSkinTexture(_Theme.SelTextureArrowRightName, _PartyModeID);
|
||||
|
||||
CTexture highlightTexture = CBase.Theme.GetSkinTexture(_Theme.HighlightTextureName, _PartyModeID);
|
||||
CTextureRef highlightTexture = CBase.Theme.GetSkinTexture(_Theme.HighlightTextureName, _PartyModeID);
|
||||
|
||||
if (Selected)
|
||||
{
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace VocaluxeLib.Menu
|
||||
return _Theme.Name;
|
||||
}
|
||||
|
||||
private CTexture _Texture;
|
||||
public CTexture Texture
|
||||
private CTextureRef _Texture;
|
||||
public CTextureRef Texture
|
||||
{
|
||||
get { return _Texture ?? CBase.Theme.GetSkinTexture(_Theme.TextureName, _PartyModeID); }
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace VocaluxeLib.Menu
|
||||
Visible = s.Visible;
|
||||
}
|
||||
|
||||
public CStatic(int partyModeID, CTexture texture, SColorF color, SRectF rect)
|
||||
public CStatic(int partyModeID, CTextureRef texture, SColorF color, SRectF rect)
|
||||
{
|
||||
_PartyModeID = partyModeID;
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace VocaluxeLib.Menu
|
||||
|
||||
public void Draw(EAspect aspect, float scale = 1f, float zModify = 0f, bool forceDraw = false)
|
||||
{
|
||||
CTexture texture = Texture;
|
||||
CTextureRef texture = Texture;
|
||||
SRectF bounds = Rect.Scale(scale);
|
||||
SRectF rect;
|
||||
if (aspect != EAspect.Stretch && texture != null)
|
||||
|
||||
@@ -472,9 +472,9 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
|
||||
var noteRect = new SRectF(rect.X + dw, rect.Y + dh, rect.W - 2 * dw, rect.H - 2 * dh, 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);
|
||||
CTextureRef noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
CTextureRef noteMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinMiddleName, _PartyModeID);
|
||||
CTextureRef noteEnd = CBase.Theme.GetSkinTexture(_Theme.SkinRightName, _PartyModeID);
|
||||
|
||||
//Width of each of the ends (round parts)
|
||||
//Need 2 of them so use minimum
|
||||
@@ -519,9 +519,9 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
rect.Z
|
||||
);
|
||||
|
||||
CTexture noteBackgroundBegin = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID);
|
||||
CTexture noteBackgroundMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID);
|
||||
CTexture noteBackgroundEnd = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID);
|
||||
CTextureRef noteBackgroundBegin = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundLeftName, _PartyModeID);
|
||||
CTextureRef noteBackgroundMiddle = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundMiddleName, _PartyModeID);
|
||||
CTextureRef noteBackgroundEnd = CBase.Theme.GetSkinTexture(_Theme.SkinBackgroundRightName, _PartyModeID);
|
||||
|
||||
float dx = r.H * noteBackgroundBegin.OrigAspect;
|
||||
if (2 * dx > r.W)
|
||||
@@ -614,7 +614,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
rect.Z
|
||||
);
|
||||
|
||||
CTexture noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
CTextureRef noteBegin = CBase.Theme.GetSkinTexture(_Theme.SkinLeftName, _PartyModeID);
|
||||
float dx = r.H * noteBegin.OrigAspect;
|
||||
if (2 * dx > r.W)
|
||||
dx = r.W / 2;
|
||||
@@ -671,7 +671,7 @@ namespace VocaluxeLib.Menu.SingNotes
|
||||
_PlayerNotes[n].Color.B,
|
||||
_PlayerNotes[n].Color.A * _PlayerNotes[n].Alpha);
|
||||
|
||||
CTexture toneHelper = CBase.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
|
||||
CTextureRef toneHelper = CBase.Theme.GetSkinTexture(_Theme.SkinToneHelperName, _PartyModeID);
|
||||
CBase.Drawing.DrawTexture(toneHelper, drawRect, color);
|
||||
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
private CStatic _MedleyCalcIcon;
|
||||
private CStatic _MedleyTagIcon;
|
||||
|
||||
private CTexture _CoverBigBGTexture;
|
||||
private CTexture _CoverBGTexture;
|
||||
private CTextureRef _CoverBigBGTexture;
|
||||
private CTextureRef _CoverBGTexture;
|
||||
|
||||
private CText _Artist;
|
||||
private CText _Title;
|
||||
@@ -467,7 +467,7 @@ namespace VocaluxeLib.Menu.SongMenu
|
||||
|
||||
_TextBG.Draw();
|
||||
|
||||
CTexture vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
|
||||
CTextureRef vidtex = CBase.BackgroundMusic.IsPlayingPreview() ? CBase.BackgroundMusic.GetVideoTexture() : null;
|
||||
|
||||
if (vidtex != null)
|
||||
{
|
||||
|
||||
@@ -25,10 +25,10 @@ namespace VocaluxeLib.Profile
|
||||
{
|
||||
public int ID;
|
||||
private readonly string _FileName = "";
|
||||
private CTexture _Texture;
|
||||
private CTextureRef _Texture;
|
||||
private const int _MaxNameLen = 12;
|
||||
|
||||
public CTexture Texture
|
||||
public CTextureRef Texture
|
||||
{
|
||||
get { return _Texture; }
|
||||
}
|
||||
@@ -39,11 +39,11 @@ namespace VocaluxeLib.Profile
|
||||
|
||||
public static CAvatar GetAvatar(string fileName)
|
||||
{
|
||||
CTexture texture = CBase.Drawing.AddTexture(fileName);
|
||||
CTextureRef texture = CBase.Drawing.AddTexture(fileName);
|
||||
return texture == null ? null : new CAvatar(texture, fileName);
|
||||
}
|
||||
|
||||
private CAvatar(CTexture texture, string fileName, int id = -1)
|
||||
private CAvatar(CTextureRef texture, string fileName, int id = -1)
|
||||
{
|
||||
_Texture = texture;
|
||||
_FileName = fileName;
|
||||
|
||||
@@ -24,8 +24,8 @@ namespace VocaluxeLib.Songs
|
||||
public class CCategory
|
||||
{
|
||||
public readonly string Name;
|
||||
private CTexture _CoverTextureSmall;
|
||||
private CTexture _CoverTextureBig;
|
||||
private CTextureRef _CoverTextureSmall;
|
||||
private CTextureRef _CoverTextureBig;
|
||||
public readonly List<CSongPointer> Songs = new List<CSongPointer>();
|
||||
|
||||
public CCategory(string name)
|
||||
@@ -33,14 +33,14 @@ namespace VocaluxeLib.Songs
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public CTexture CoverTextureSmall
|
||||
public CTextureRef CoverTextureSmall
|
||||
{
|
||||
get { return _CoverTextureSmall; }
|
||||
|
||||
set { _CoverTextureSmall = value; }
|
||||
}
|
||||
|
||||
public CTexture CoverTextureBig
|
||||
public CTextureRef CoverTextureBig
|
||||
{
|
||||
get { return _CoverTextureBig ?? _CoverTextureSmall; }
|
||||
set
|
||||
|
||||
@@ -78,8 +78,8 @@ namespace VocaluxeLib.Songs
|
||||
|
||||
public partial class CSong
|
||||
{
|
||||
private CTexture _CoverTextureSmall;
|
||||
private CTexture _CoverTextureBig;
|
||||
private CTextureRef _CoverTextureSmall;
|
||||
private CTextureRef _CoverTextureBig;
|
||||
|
||||
public SMedley Medley;
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace VocaluxeLib.Songs
|
||||
|
||||
public bool NotesLoaded { get; private set; }
|
||||
|
||||
public CTexture CoverTextureSmall
|
||||
public CTextureRef CoverTextureSmall
|
||||
{
|
||||
get
|
||||
{
|
||||
@@ -116,7 +116,7 @@ namespace VocaluxeLib.Songs
|
||||
set { _CoverTextureSmall = value; }
|
||||
}
|
||||
|
||||
public CTexture CoverTextureBig
|
||||
public CTextureRef CoverTextureBig
|
||||
{
|
||||
get { return _CoverTextureBig ?? _CoverTextureSmall; }
|
||||
set { _CoverTextureBig = value; }
|
||||
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
using VocaluxeLib.Draw;
|
||||
using VocaluxeLib.Songs;
|
||||
|
||||
@@ -14,7 +13,7 @@ namespace VocaluxeLib.Utils.Player
|
||||
private CSong _Song;
|
||||
private bool _VideoEnabled;
|
||||
private int _Video = -1;
|
||||
private CTexture _CurrentVideoTexture;
|
||||
private CTextureRef _CurrentVideoTexture;
|
||||
private CFading _VideoFading;
|
||||
|
||||
public bool VideoEnabled
|
||||
@@ -41,7 +40,7 @@ namespace VocaluxeLib.Utils.Player
|
||||
}
|
||||
public bool SongHasVideo
|
||||
{
|
||||
get { return _Song != null && File.Exists(Path.Combine(_Song.Folder,_Song.VideoFileName)); }
|
||||
get { return _Song != null && File.Exists(Path.Combine(_Song.Folder, _Song.VideoFileName)); }
|
||||
}
|
||||
|
||||
public string ArtistAndTitle
|
||||
@@ -56,7 +55,7 @@ namespace VocaluxeLib.Utils.Player
|
||||
}
|
||||
}
|
||||
|
||||
public CTexture Cover
|
||||
public CTextureRef Cover
|
||||
{
|
||||
get { return _Song == null ? CBase.Cover.GetNoCover() : _Song.CoverTextureBig; }
|
||||
}
|
||||
@@ -66,11 +65,10 @@ namespace VocaluxeLib.Utils.Player
|
||||
get { return _StreamID != -1; }
|
||||
}
|
||||
|
||||
|
||||
public CSongPlayer(bool loop = false) : base(loop) { }
|
||||
public CSongPlayer(bool loop = false) : base(loop) {}
|
||||
|
||||
public CSongPlayer(CSong song, bool loop = false, float position = 0f, bool autoplay = false)
|
||||
: base(Path.Combine(song.Folder,song.MP3FileName), loop, position, autoplay)
|
||||
: base(Path.Combine(song.Folder, song.MP3FileName), loop, position, autoplay)
|
||||
{
|
||||
_Song = song;
|
||||
_LoadVideo();
|
||||
@@ -82,7 +80,7 @@ namespace VocaluxeLib.Utils.Player
|
||||
_Song = null;
|
||||
}
|
||||
|
||||
public CTexture GetVideoTexture()
|
||||
public CTextureRef GetVideoTexture()
|
||||
{
|
||||
if (_Video == -1 || _Song == null)
|
||||
return null;
|
||||
@@ -101,7 +99,7 @@ namespace VocaluxeLib.Utils.Player
|
||||
return null;
|
||||
}
|
||||
|
||||
public void Load(CSong song, float position = 0f, bool autoplay = false)
|
||||
public void Load(CSong song, float position = 0f, bool autoplay = false)
|
||||
{
|
||||
if (song == null)
|
||||
return;
|
||||
@@ -109,7 +107,7 @@ namespace VocaluxeLib.Utils.Player
|
||||
Stop();
|
||||
|
||||
_Song = song;
|
||||
|
||||
|
||||
base.Load(Path.Combine(song.Folder, song.MP3FileName), position, false);
|
||||
_LoadVideo();
|
||||
|
||||
@@ -155,13 +153,10 @@ namespace VocaluxeLib.Utils.Player
|
||||
CBase.Video.Pause(_Video);
|
||||
CBase.Video.Skip(_Video, CBase.Sound.GetPosition(_StreamID) + _FadeTime, _Song.VideoGap);
|
||||
}
|
||||
else if(_Video != -1)
|
||||
{
|
||||
else if (_Video != -1)
|
||||
CBase.Video.Resume(_Video);
|
||||
}
|
||||
base.TogglePause();
|
||||
}
|
||||
|
||||
|
||||
private void _LoadVideo()
|
||||
{
|
||||
@@ -182,4 +177,4 @@ namespace VocaluxeLib.Utils.Player
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@
|
||||
<Compile Include="Menu\CStatic.cs" />
|
||||
<Compile Include="Menu\CText.cs" />
|
||||
<Compile Include="Menu\CScreenSetting.cs" />
|
||||
<Compile Include="Draw\CTexture.cs" />
|
||||
<Compile Include="Draw\CTextureRef.cs" />
|
||||
<Compile Include="CXMLReader.cs" />
|
||||
<Compile Include="Enums.cs" />
|
||||
<Compile Include="Menu\IMenu.cs" />
|
||||
|
||||
Reference in new issue
Block a user