Example #1
0
        private static void ProcessReader(String name, String ext, BinaryReader br)
        {
            switch (ext)
            {
            case "fat":     // Map written in text mode, actually it doesn't exist in the packed files
                break;

            case "fam":     // Map
                SectorMap.Read(name, br);
                break;

            case "xml":     // Xml
                using (var sw = new StreamWriter(name))
                    sw.WriteLine(Xml.Read(name, br).Content);

                break;

            case "txt":     // Text
                Txt.Read(name, br);
                break;

            case "ndw":
                NDW.Read(name, br);
                break;

            // Not needed for the server (yet or anyways)
            case "cat":     // Catalog
            case "dds":
            case "DDS":
            case "png":     // Png
            case "tga":     // Tga
            case "pgm":
            case "bak":     // Backup
            case "anm":     // Animation
            case "fx":
            case "fxh":
            case "fxi":
            case "geo":
            case "geo01":
            case "ogg":     // Ogg
                break;

            // Unknown yet
            case "tec":
            case "sha":
            case "spt":
            case "scc":
            case "cache":
            case "tk":
            case "lnk":
                break;

            default:
                Console.WriteLine(ext);
                break;
            }
        }