示例#1
0
        public FormMain()
        {
            InitializeComponent();

            CurrentSettings = new MapSettings();
            CurrentState    = SessionStates.Waiting;
        }
示例#2
0
        private void ApplySettings(Map m, MapSettings s)
        {
            if (m == null)
            {
                return;
            }

            m.DrawBiomes      = s.DrawBiomes;
            m.DrawElevation   = s.DrawElevation;
            m.DrawTemperature = s.DrawTemperature;
            m.DrawRainfall    = s.DrawRainfall;

            #region Elevation
            m.WaterElevation = s.ElevationWater;
            m.MaxElevation   = s.ElevationMax;

            m.SmoothnessFactor = s.Smoothness;
            m.AddSmooth01      = true; // hard coded, must have at least 1 smoothing
            m.AddSmooth02      = s.AddSmooth02;
            m.AddSmooth03      = s.AddSmooth03;
            m.AddSmooth04      = s.AddSmooth04;

            m.SmoothnessFactor   = s.SmoothnessFactor;
            m.SmoothnessFactor02 = s.SmoothnessFactor02;
            m.SmoothnessFactor03 = s.SmoothnessFactor03;
            m.SmoothnessFactor04 = s.SmoothnessFactor04;

            m.Amp01 = s.Amp01;
            m.Amp02 = s.Amp02;
            m.Amp03 = s.Amp03;
            m.Amp04 = s.Amp04;

            m.ContinentBias = s.ContinentBias;
            m.RiverBias     = s.RiverBias;
            m.RiverSourceElevationMinimum = s.RiverSourceElevationMin;
            m.LakeSize = s.LakeSize;
            #endregion

            #region Temparature
            m.TSmoothnessFactor = s.Smoothness;
            m.AddTSmooth01      = true; // hard coded, must have at least 1 smoothing
            m.AddTSmooth02      = s.AddTSmooth02;
            m.AddTSmooth03      = s.AddTSmooth03;
            m.AddTSmooth04      = s.AddTSmooth04;

            m.TSmoothnessFactor   = s.TSmoothnessFactor;
            m.TSmoothnessFactor02 = s.TSmoothnessFactor02;
            m.TSmoothnessFactor03 = s.TSmoothnessFactor03;
            m.TSmoothnessFactor04 = s.TSmoothnessFactor04;

            m.TAmp01 = s.TAmp01;
            m.TAmp02 = s.TAmp02;
            m.TAmp03 = s.TAmp03;
            m.TAmp04 = s.TAmp04;

            m.PolarBias     = s.PolarBias;
            m.ElevationBias = s.ElevationBias;
            #endregion

            #region Rainfall
            m.RSmoothnessFactor = s.Smoothness;
            m.AddRSmooth01      = true; // hard coded, must have at least 1 smoothing
            m.AddRSmooth02      = s.AddRGrain02;
            m.AddRSmooth03      = s.AddRGrain03;
            m.AddRSmooth04      = s.AddRGrain04;

            m.RSmoothnessFactor   = s.SmoothnessFactor;
            m.RSmoothnessFactor02 = s.RSmoothnessFactor02;
            m.RSmoothnessFactor03 = s.RSmoothnessFactor03;
            m.RSmoothnessFactor04 = s.RSmoothnessFactor04;

            m.RAmp01 = s.RAmp01;
            m.RAmp02 = s.RAmp02;
            m.RAmp03 = s.RAmp03;
            m.RAmp04 = s.RAmp04;

            m.RainfallBias = s.RainfallBias;
            #endregion
        }