Example #1
0
        public void LoadOriginalMaps()
        {
            if (decompressor == null)
            {
                decompressor = new Decompressor();
            }
            originalMaps = new List<AMap> { };
            List<string[]> uncompressedMaps;
            loader = new Loader();

            loader.LoadMultiple(originalMapsLocation);
            uncompressedMaps = loader.ParseMap2();

            foreach (string[] map in uncompressedMaps)
            {
                AMap newEntry = new AMap();

                newEntry.Name = map[0];
                newEntry.Map = decompressor.GetTheMap(map[1]);

                originalMaps.Add(newEntry);
            }

            /*foreach (AMap map in originalMaps)
            {
                Console.WriteLine("name: {0}\n", map.Name);
                foreach (string str in map.Map)
                {
                    Console.WriteLine(str);
                }
            }*/
        }
Example #2
0
 public AMap LoadUserMap(string path)
 {
     if (decompressor == null)
     {
         decompressor = new Decompressor();
     }
     AMap newMap = new AMap();
     string compressed;
     newMap.Name = Path.GetFileNameWithoutExtension(path);
     compressed = File.ReadAllText(path);
     Console.WriteLine("{0}, {1}", newMap.Name, compressed);
     newMap.Map = decompressor.GetTheMap(compressed);
     return newMap;
 }