Пример #1
0
        public Textures.ITexture2D CreateTexture2D(int expID, string pathBIOGame, uint hash = 0)
        {
            ITexture2D temptex2D = new ME1Texture2D(this, expID);

            if (hash != 0)
            {
                temptex2D.Hash = hash;
            }
            return(temptex2D);
        }
Пример #2
0
        /// <summary>
        /// Creates a Texture2D from a bunch of stuff.
        /// </summary>
        /// <param name="texName">Name of texture to create.</param>
        /// <param name="pccs">List of PCC's containing texture.</param>
        /// <param name="ExpIDs">List of ExpID's of texture in PCC's. MUST have same number of elements as in PCC's.</param>
        /// <param name="WhichGame">Game target.</param>
        /// <param name="pathBIOGame">Path to BIOGame.</param>
        /// <param name="hash">Hash of texture.</param>
        /// <returns>Texture2D object.</returns>
        public static ITexture2D CreateTexture2D(string texName, List <string> pccs, List <int> ExpIDs, int WhichGame, string pathBIOGame, uint hash = 0)
        {
            ITexture2D temptex2D = null;

            switch (WhichGame)
            {
            case 1:
                temptex2D = new ME1Texture2D(texName, pccs, ExpIDs, pathBIOGame, WhichGame, hash);
                break;

            case 2:
                temptex2D = new ME2Texture2D(texName, pccs, ExpIDs, pathBIOGame, WhichGame, hash);
                break;

            case 3:
                temptex2D = new ME3SaltTexture2D(texName, pccs, ExpIDs, hash, pathBIOGame, WhichGame);
                break;
            }
            if (hash != 0)
            {
                temptex2D.Hash = hash;
            }
            return(temptex2D);
        }