public static BRESNode FromGIF(string file) { string s = Path.GetFileNameWithoutExtension(file); BRESNode b = new BRESNode() { _name = s }; PAT0Node p = new PAT0Node() { _name = s }; p.CreateEntry(); PAT0TextureNode t = p.Children[0].Children[0] as PAT0TextureNode; GifDecoder d = new GifDecoder(); d.Read(file); int f = d.GetFrameCount(); using (TextureConverterDialog dlg = new TextureConverterDialog()) { dlg.Source = (Bitmap)d.GetFrame(0); if (dlg.ShowDialog(null, b) == DialogResult.OK) { for (int i = 1; i < f; i++) { dlg.Source = (Bitmap)d.GetFrame(i); dlg.EncodeSource(); } } } return(b); }
public void GetSource() { Source = BRESNode.FindChild("Textures(NW4R)/" + Name, true) as TEX0Node; }