Beispiel #1
0
 void ResetLight()
 {
     Shadowlight = DefaultShadowlight;
     FastColour.GetShaded(Shadowlight, ref ShadowlightXSide,
                          ref ShadowlightZSide, ref ShadowlightYBottom);
     Sunlight = DefaultSunlight;
     FastColour.GetShaded(Sunlight, ref SunlightXSide,
                          ref SunlightZSide, ref SunlightYBottom);
 }
Beispiel #2
0
        /// <summary> Sets current shadowlight colour, and raises
        /// EnvVariableChanged event with variable 'ShadowlightColour'. </summary>
        public void SetShadowlight(FastColour col)
        {
            if (!Set(col, ref Shadowlight, EnvVar.ShadowlightColour))
            {
                return;
            }

            FastColour.GetShaded(Shadowlight, out ShadowXSide,
                                 out ShadowZSide, out ShadowYBottom);
            Shadow = Shadowlight.Pack();
            game.WorldEvents.RaiseEnvVariableChanged(EnvVar.ShadowlightColour);
        }
Beispiel #3
0
        void ResetLight()
        {
            Shadowlight = DefaultShadowlight;
            Shadow      = Shadowlight.Pack();
            FastColour.GetShaded(Shadowlight, out ShadowXSide,
                                 out ShadowZSide, out ShadowYBottom);

            Sunlight = DefaultSunlight;
            Sun      = Sunlight.Pack();
            FastColour.GetShaded(Sunlight, out SunXSide,
                                 out SunZSide, out SunYBottom);
        }
Beispiel #4
0
 /// <summary> Sets current shadowlight colour, and raises
 /// EnvVariableChanged event with variable 'ShadowlightColour'. </summary>
 public void SetShadowlight(FastColour col)
 {
     if (col == Shadowlight)
     {
         return;
     }
     Shadowlight = col;
     Set(col, ref Shadowlight, EnvVar.ShadowlightColour);
     FastColour.GetShaded(Shadowlight, ref ShadowlightXSide,
                          ref ShadowlightZSide, ref ShadowlightYBottom);
     game.WorldEvents.RaiseEnvVariableChanged(EnvVar.ShadowlightColour);
 }
Beispiel #5
0
        /// <summary> Sets current shadowlight colour, and raises
        /// EnvVariableChanged event with variable 'ShadowlightColour'. </summary>
        public void SetShadowlight(FastColour col)
        {
            if (col == Shadowlight)
            {
                return;
            }

            Shadowlight = col;
            FastColour.GetShaded(col, out ShadowXSide,
                                 out ShadowZSide, out ShadowYBottom);
            Shadow = Shadowlight.Pack();
            game.WorldEvents.RaiseEnvVariableChanged(EnvVar.ShadowlightColour);
        }
Beispiel #6
0
 void SetShadow(FastColour col)
 {
     shadow = col.Pack();
     FastColour.GetShaded(col, out shadowXSide, out shadowZSide, out shadowYBottom);
 }
Beispiel #7
0
 void SetSun(FastColour col)
 {
     Outside = col.Pack();
     FastColour.GetShaded(col, out OutsideXSide, out OutsideZSide, out OutsideYBottom);
 }
Beispiel #8
0
 void SetLightmap(int x, int y, FastColour col)
 {
     lightmap[x * 16 + y] = col.Pack();
     FastColour.GetShaded(col, out lightmapXSide[x * 16 + y],
                          out lightmapZSide[x * 16 + y], out lightmapYBottom[x * 16 + y]);
 }