diff options
author | Adam Frisby | 2008-04-21 06:39:16 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-21 06:39:16 +0000 |
commit | 05e24c8f58e5cc41b3e7704b1912dfbe9703d4fe (patch) | |
tree | 09f7aa55e82ede0839373e85895a34fb3e797b31 /OpenSim/Region/Environment/Modules/Terrain/Effects | |
parent | * Written a improved self-contained version of the XML Object Serialiser for ... (diff) | |
download | opensim-SC-05e24c8f58e5cc41b3e7704b1912dfbe9703d4fe.zip opensim-SC-05e24c8f58e5cc41b3e7704b1912dfbe9703d4fe.tar.gz opensim-SC-05e24c8f58e5cc41b3e7704b1912dfbe9703d4fe.tar.bz2 opensim-SC-05e24c8f58e5cc41b3e7704b1912dfbe9703d4fe.tar.xz |
* Terrain Module code has been reformatted to comply with guidelines.
* Fixed a variety of code quality issues. (Yes, I've found ReSharper.)
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Terrain/Effects')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Terrain/Effects/CookieCutter.cs | 27 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/Terrain/Effects/DefaultTerrainGenerator.cs | 10 |
2 files changed, 16 insertions, 21 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/Effects/CookieCutter.cs b/OpenSim/Region/Environment/Modules/Terrain/Effects/CookieCutter.cs index 8e51d40..6d41eba 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/Effects/CookieCutter.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/Effects/CookieCutter.cs | |||
@@ -25,26 +25,24 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | using System; | 27 | using System; |
28 | using System.Collections.Generic; | ||
29 | using System.Text; | ||
30 | using OpenSim.Region.Environment.Modules.Terrain; | ||
31 | using OpenSim.Region.Environment.Interfaces; | 28 | using OpenSim.Region.Environment.Interfaces; |
32 | using OpenSim.Framework; | 29 | using OpenSim.Region.Environment.Modules.Terrain.FloodBrushes; |
30 | using OpenSim.Region.Environment.Modules.Terrain.PaintBrushes; | ||
33 | 31 | ||
34 | namespace OpenSim.Region.Environment.Modules.Terrain.Effects | 32 | namespace OpenSim.Region.Environment.Modules.Terrain.Effects |
35 | { | 33 | { |
36 | class CookieCutter : ITerrainEffect | 34 | internal class CookieCutter : ITerrainEffect |
37 | { | 35 | { |
38 | #region ITerrainEffect Members | 36 | #region ITerrainEffect Members |
39 | 37 | ||
40 | public void RunEffect(ITerrainChannel map) | 38 | public void RunEffect(ITerrainChannel map) |
41 | { | 39 | { |
42 | FloodBrushes.SmoothArea smooth = new FloodBrushes.SmoothArea(); | 40 | SmoothArea smooth = new SmoothArea(); |
43 | ITerrainPaintableEffect eroder = new PaintBrushes.WeatherSphere(); | 41 | ITerrainPaintableEffect eroder = new WeatherSphere(); |
44 | 42 | ||
45 | bool[,] cliffMask = new bool[map.Width, map.Height]; | 43 | bool[,] cliffMask = new bool[map.Width,map.Height]; |
46 | bool[,] channelMask = new bool[map.Width, map.Height]; | 44 | bool[,] channelMask = new bool[map.Width,map.Height]; |
47 | bool[,] smoothMask = new bool[map.Width, map.Height]; | 45 | bool[,] smoothMask = new bool[map.Width,map.Height]; |
48 | 46 | ||
49 | Console.WriteLine("S1"); | 47 | Console.WriteLine("S1"); |
50 | 48 | ||
@@ -98,7 +96,10 @@ namespace OpenSim.Region.Environment.Modules.Terrain.Effects | |||
98 | //smooth.FloodEffect(map, smoothMask, 4.0); | 96 | //smooth.FloodEffect(map, smoothMask, 4.0); |
99 | } | 97 | } |
100 | 98 | ||
101 | private static void SetLowerChannel(ITerrainChannel map, bool[,] cliffMask, bool[,] channelMask, int x, int y, int numChannels, int channelWidth, int mapSize, int rp) | 99 | #endregion |
100 | |||
101 | private static void SetLowerChannel(ITerrainChannel map, bool[,] cliffMask, bool[,] channelMask, int x, int y, int numChannels, int channelWidth, | ||
102 | int mapSize, int rp) | ||
102 | { | 103 | { |
103 | for (int i = 0; i < numChannels; i++) | 104 | for (int i = 0; i < numChannels; i++) |
104 | { | 105 | { |
@@ -119,7 +120,5 @@ namespace OpenSim.Region.Environment.Modules.Terrain.Effects | |||
119 | } | 120 | } |
120 | } | 121 | } |
121 | } | 122 | } |
122 | |||
123 | #endregion | ||
124 | } | 123 | } |
125 | } | 124 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/Terrain/Effects/DefaultTerrainGenerator.cs b/OpenSim/Region/Environment/Modules/Terrain/Effects/DefaultTerrainGenerator.cs index 4f91ee5..2327275 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/Effects/DefaultTerrainGenerator.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/Effects/DefaultTerrainGenerator.cs | |||
@@ -24,16 +24,12 @@ | |||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | */ | 26 | */ |
27 | using System; | ||
28 | using System.Collections.Generic; | ||
29 | using System.Text; | ||
30 | using OpenSim.Region.Environment.Modules.Terrain; | ||
31 | using OpenSim.Region.Environment.Interfaces; | ||
32 | using OpenSim.Framework; | 27 | using OpenSim.Framework; |
28 | using OpenSim.Region.Environment.Interfaces; | ||
33 | 29 | ||
34 | namespace OpenSim.Region.Environment.Modules.Terrain.Effects | 30 | namespace OpenSim.Region.Environment.Modules.Terrain.Effects |
35 | { | 31 | { |
36 | class DefaultTerrainGenerator : ITerrainEffect | 32 | internal class DefaultTerrainGenerator : ITerrainEffect |
37 | { | 33 | { |
38 | #region ITerrainEffect Members | 34 | #region ITerrainEffect Members |
39 | 35 | ||
@@ -56,4 +52,4 @@ namespace OpenSim.Region.Environment.Modules.Terrain.Effects | |||
56 | 52 | ||
57 | #endregion | 53 | #endregion |
58 | } | 54 | } |
59 | } | 55 | } \ No newline at end of file |