예제 #1
0
        public void DumpTAHEntries(Stream source)
        {
            TAHFile tah = new TAHFile(source);

            try
            {
                tah.LoadEntries();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: " + ex);
                return;
            }
            foreach (TAHEntry ent in tah.EntrySet.Entries)
            {
                if (Path.GetExtension(ent.FileName) == ".tso")
                {
                    Console.WriteLine(ent.FileName);
                    byte[] data = TAHUtil.ReadEntryData(tah.Reader, ent);
                    using (MemoryStream ms = new MemoryStream(data))
                        LoadTSOFile(ms);
                    current_TSOFileName = ent.FileName;
                    AssignCurrentTMOFile(current_TSOFileName);
                    {
                        FrameMove();
                        Render();
                        SaveToBitmap();
                        ClearFigureList();
                        Application.DoEvents();
                    }
                    current_TSOFileName = null;
                }
            }
        }
예제 #2
0
        public static void DumpTAHEntries(Stream source)
        {
            TAHFile tah = new TAHFile(source);

            try
            {
                tah.LoadEntries();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: " + ex);
                return;
            }
            foreach (TAHEntry ent in tah.EntrySet.Entries)
            {
                if (ent.FileName != null && Path.GetExtension(ent.FileName).ToLower() == ".tso")
                {
                    byte[]        data = TAHUtil.ReadEntryData(tah.Reader, ent);
                    byte[]        hash = md5.ComputeHash(data);
                    StringBuilder sb   = new StringBuilder();
                    foreach (byte b in hash)
                    {
                        sb.Append(b.ToString("x2"));
                    }
                    string md5sum = sb.ToString();
                    Console.WriteLine("{0} {1}", md5sum, ent.FileName);
                }
            }
        }
예제 #3
0
 public TAHContent LoadContent(BinaryReader br, TAHEntry e)
 {
     return(new TAHContent(e, TAHUtil.ReadEntryData(br, e)));
 }