public void MergeTexture(string tex, remParser srcParser) { String src_TEXH_folder = rem.TexturePathFromREM(srcParser.RemPath); if (src_TEXH_folder == null) { Report.ReportLog("TEXH folder could not be located."); return; } String texh_folder = rem.TexturePathFromREM(Parser.RemPath); if (texh_folder == null) { Report.ReportLog("TEXH folder could not be located."); return; } if (src_TEXH_folder != texh_folder) { ImportedTexture impTex = new ImportedTexture(src_TEXH_folder + @"\" + tex); string newTex = rem.CreateTexture(impTex, texh_folder); if (!Textures.Contains(newTex)) { Textures.Add(newTex); } } }
public void InitTextures(bool allTextures, bool noMaskFilter) { Textures.Clear(); String texDir = allTextures ? rem.TexturePathFromREM(Parser.RemPath) : null; if (allTextures && texDir != null) { DirectoryInfo dir = new DirectoryInfo(texDir); foreach (FileInfo file in dir.EnumerateFiles()) { string fileName = file.Name.ToLower(); if (!noMaskFilter || !fileName.Contains("_mask") && !fileName.Contains("_shade")) { Textures.Add(file.Name); } } } else { foreach (remMaterial mat in Parser.MATC) { if (mat.texture != null && !Textures.Contains(mat.texture)) { Textures.Add(mat.texture); } } } }
public override async Task <TextureItem> GetTexture(string name) { if (!Textures.Contains(name)) { return(null); } var wp = new WadPackage(_file); var entry = wp.GetEntry(name); if (entry == null) { return(null); } return(new TextureItem(entry.Name, GetFlags(entry), (int)entry.Width, (int)entry.Height)); }
public void AddTexture(ImportedTexture image) { String texh_folder = rem.TexturePathFromREM(Parser.RemPath); if (texh_folder == null) { Report.ReportLog("TEXH folder could not be located."); return; } string tex = rem.CreateTexture(image, texh_folder); if (!Textures.Contains(tex)) { Textures.Add(tex); } }