Ejemplo n.º 1
0
 /// <summary>
 /// Gets the ULong
 /// </summary>
 /// <param name="Source"></param>
 /// <param name="FileName"></param>
 /// <param name="VideoMode"></param>
 /// <returns></returns>
 public static ulong GetUlongEncodedImageID(string Source, string FileName, Enumerations.VideoModes VideoMode = Enumerations.VideoModes.Normal)
 {
     return((Source.ToLower() + "_" + FileName.ToLower() + "_" + VideoMode.ToString()).GetHashCodeUlong());
 }
Ejemplo n.º 2
0
            // *************************************************************************************************************************
            #region Get Image Methods

            /// <summary>
            /// Gets the Texture 2d.  Looks at both optimized data and or Non Optimized Data
            /// </summary>
            /// <param name="Source"></param>
            /// <param name="FileName"></param>
            /// <returns></returns>
            public static Texture2D GetTexture2d(string Source, string FileName, Enumerations.VideoModes VideoMode = Enumerations.VideoModes.Normal)
            {
                return(GetTexture2d(GetUlongEncodedImageID(Source, FileName, VideoMode)));
            }
Ejemplo n.º 3
0
            ///// <summary>
            ///// Load all the Texture Images
            ///// </summary>
            //public static void LoadTextureImages()
            //{
            //    IsProcessing = true;
            //    string _BaseDirectory = GameData.BaseDirectory.EnsureDirectoryFormat();
            //    _BaseDirectory += "Data\\Images\\Textures\\";

            //    LoadImagesFromDirectory(_BaseDirectory, "TextureRoot", true, "*.png");

            //    foreach (var texDir in GameData.GameConfiguration.Textures.Directories.Directories)
            //    {
            //        if (_BaseDirectory.ToLower().Contains((GameData.BaseDirectory.EnsureDirectoryFormat() + texDir.RelativePath).ToLower()) == false)
            //        {
            //            LoadImagesFromDirectory(GameData.BaseDirectory.EnsureDirectoryFormat() + texDir.RelativePath, texDir.SourceName, texDir.GetSubFolders, "*.png");
            //        }
            //    }

            //    SystemImagesLoaded = true;
            //    IsProcessing = false;
            //}

            /// <summary>
            /// Get the Encoded Image File Name (Source = FileName (ToLower))
            /// </summary>
            /// <param name="Source"></param>
            /// <param name="FileName"></param>
            /// <returns></returns>
            public static string GetEncodedImageName(string Source, string FileName, Enumerations.VideoModes VideoMode = Enumerations.VideoModes.Normal)
            {
                return(Source.ToLower() + "_" + FileName.ToLower() + "_" + VideoMode.ToString());
            }