/// <summary> /// Initializes all parameters of the chunk without performing any load operation. /// </summary> /// <param name="parent">The parent large terrain file of this chunk</param> /// <param name="baseFile">The MPQ-file which contains the general information about placement and doodads</param> /// <param name="texFile">The MPQ-stream which contains all the texture related information (MCLY, MCAL, ...)</param> /// <param name="offset">The offset inside baseFile and texFile where this chunks MCNK is located</param> public ADTChunk(ADTFile parent, Stormlib.MPQFile baseFile, Utils.StreamedMpq texFile, ChunkOffset offset) { mFile = baseFile; mTexFile = texFile; mOffset = offset; mParent = parent; }
/// <summary> /// Loads up to 10 _tex.adt files into the the texture file stream and combines them to one big file in memory. /// </summary> private void LoadTexStream() { List <Stormlib.MPQFile> texFiles = new List <Stormlib.MPQFile>(); for (int i = 0; i < 10; ++i) { string texPath = Path.GetDirectoryName(FileName) + "\\" + Path.GetFileNameWithoutExtension(FileName) + "_tex" + i + ".adt"; try { texFiles.Add(new Stormlib.MPQFile(texPath)); } catch (Exception) { } } TexStream = new Utils.StreamedMpq(texFiles); }
/// <summary> /// Loads up to 10 _tex.adt files into the the texture file stream and combines them to one big file in memory. /// </summary> private void LoadTexStream() { List<Stormlib.MPQFile> texFiles = new List<Stormlib.MPQFile>(); for (int i = 0; i < 10; ++i) { string texPath = Path.GetDirectoryName(FileName) + "\\" + Path.GetFileNameWithoutExtension(FileName) + "_tex" + i + ".adt"; try { texFiles.Add(new Stormlib.MPQFile(texPath)); } catch(Exception) { } } TexStream = new Utils.StreamedMpq(texFiles); }