Example #1
0
        // ==== Loading =======================================================


        public static Map Load(World _world, string fileName)
        {
            if (!File.Exists(fileName))
            {
                _world.log.Log("Map.Load: Specified file does not exist: {0}", LogType.Warning, fileName);
                return(null);
            }

            switch (Path.GetExtension(fileName).ToLowerInvariant())
            {
            case ".fcm":
                return(LoadFCM(_world, fileName));

            case ".dat":
                return(MapLoaderDAT.Load(_world, fileName));

            default:
                throw new Exception("Unknown map file format.");
            }
        }