diff options
Diffstat (limited to 'OpenSim/Region/Terrain.BasicTerrain')
23 files changed, 40 insertions, 39 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs index 3c0facb..3195140 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs | |||
@@ -62,4 +62,4 @@ using System.Runtime.InteropServices; | |||
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
65 | [assembly : AssemblyFileVersion("1.0.0.0")] | 65 | [assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index e89ff62..2405e86 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | |||
@@ -159,12 +159,13 @@ namespace OpenSim.Region.Terrain | |||
159 | /// <param name="action">The action to be performed</param> | 159 | /// <param name="action">The action to be performed</param> |
160 | /// <param name="north">Distance from the north border where the cursor is located</param> | 160 | /// <param name="north">Distance from the north border where the cursor is located</param> |
161 | /// <param name="west">Distance from the west border where the cursor is located</param> | 161 | /// <param name="west">Distance from the west border where the cursor is located</param> |
162 | public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west, float south, float east, | 162 | public void ModifyTerrain(float height, float seconds, byte brushsize, byte action, float north, float west, |
163 | float south, float east, | ||
163 | IClientAPI remoteUser) | 164 | IClientAPI remoteUser) |
164 | { | 165 | { |
165 | // Shiny. | 166 | // Shiny. |
166 | double size = (double) (1 << brushsize); | 167 | double size = (double) (1 << brushsize); |
167 | 168 | ||
168 | /* Okay, so here's the deal | 169 | /* Okay, so here's the deal |
169 | * This has to handle both when a user draws on the terrain *and* when a user selects | 170 | * This has to handle both when a user draws on the terrain *and* when a user selects |
170 | * a selection of AABB on terrain and applies whatever routine the client requests | 171 | * a selection of AABB on terrain and applies whatever routine the client requests |
@@ -189,8 +190,8 @@ namespace OpenSim.Region.Terrain | |||
189 | * Again, libTerrain is yx instead of xy.. so, it's reflected in the function calls | 190 | * Again, libTerrain is yx instead of xy.. so, it's reflected in the function calls |
190 | * | 191 | * |
191 | */ | 192 | */ |
192 | 193 | ||
193 | 194 | ||
194 | switch (action) | 195 | switch (action) |
195 | { | 196 | { |
196 | case 0: | 197 | case 0: |
@@ -199,7 +200,7 @@ namespace OpenSim.Region.Terrain | |||
199 | { | 200 | { |
200 | for (float y = west; y <= east; y++) | 201 | for (float y = west; y <= east; y++) |
201 | { | 202 | { |
202 | FlattenTerrain(y, x, size, (double)seconds / 5.0); | 203 | FlattenTerrain(y, x, size, (double) seconds/5.0); |
203 | lastEdit = DateTime.Now; | 204 | lastEdit = DateTime.Now; |
204 | } | 205 | } |
205 | } | 206 | } |
@@ -210,7 +211,7 @@ namespace OpenSim.Region.Terrain | |||
210 | { | 211 | { |
211 | for (float y = west; y <= east; y++) | 212 | for (float y = west; y <= east; y++) |
212 | { | 213 | { |
213 | RaiseTerrain(y, x, size, (double)seconds / 5.0); | 214 | RaiseTerrain(y, x, size, (double) seconds/5.0); |
214 | lastEdit = DateTime.Now; | 215 | lastEdit = DateTime.Now; |
215 | } | 216 | } |
216 | } | 217 | } |
@@ -221,7 +222,7 @@ namespace OpenSim.Region.Terrain | |||
221 | { | 222 | { |
222 | for (float y = west; y <= east; y++) | 223 | for (float y = west; y <= east; y++) |
223 | { | 224 | { |
224 | LowerTerrain(y, x, size, (double)seconds / 5.0); | 225 | LowerTerrain(y, x, size, (double) seconds/5.0); |
225 | lastEdit = DateTime.Now; | 226 | lastEdit = DateTime.Now; |
226 | } | 227 | } |
227 | } | 228 | } |
@@ -235,13 +236,13 @@ namespace OpenSim.Region.Terrain | |||
235 | // | 236 | // |
236 | //for (float x = south; x <= north; x++) | 237 | //for (float x = south; x <= north; x++) |
237 | //{ | 238 | //{ |
238 | //for (float y = west; y <= east; y++) | 239 | //for (float y = west; y <= east; y++) |
239 | //{ | 240 | //{ |
240 | //SmoothTerrain(y, x , size, (double)seconds / 5.0); | 241 | //SmoothTerrain(y, x , size, (double)seconds / 5.0); |
241 | //} | 242 | //} |
242 | //} | 243 | //} |
243 | 244 | ||
244 | SmoothTerrain(west, north, size, (double)seconds / 5.0); | 245 | SmoothTerrain(west, north, size, (double) seconds/5.0); |
245 | 246 | ||
246 | break; | 247 | break; |
247 | case 4: | 248 | case 4: |
@@ -250,7 +251,7 @@ namespace OpenSim.Region.Terrain | |||
250 | { | 251 | { |
251 | for (float y = west; y <= east; y++) | 252 | for (float y = west; y <= east; y++) |
252 | { | 253 | { |
253 | NoiseTerrain(y, x, size, (double)seconds / 5.0); | 254 | NoiseTerrain(y, x, size, (double) seconds/5.0); |
254 | lastEdit = DateTime.Now; | 255 | lastEdit = DateTime.Now; |
255 | } | 256 | } |
256 | } | 257 | } |
@@ -261,7 +262,7 @@ namespace OpenSim.Region.Terrain | |||
261 | { | 262 | { |
262 | for (float y = west; y <= east; y++) | 263 | for (float y = west; y <= east; y++) |
263 | { | 264 | { |
264 | RevertTerrain(y, x, size, (double)seconds / 5.0); | 265 | RevertTerrain(y, x, size, (double) seconds/5.0); |
265 | lastEdit = DateTime.Now; | 266 | lastEdit = DateTime.Now; |
266 | } | 267 | } |
267 | } | 268 | } |
@@ -1351,16 +1352,16 @@ namespace OpenSim.Region.Terrain | |||
1351 | } | 1352 | } |
1352 | 1353 | ||
1353 | Channel copy = heightmap.Copy(); | 1354 | Channel copy = heightmap.Copy(); |
1354 | for (int y = 0; y <copy.h; y++) | 1355 | for (int y = 0; y < copy.h; y++) |
1355 | { | 1356 | { |
1356 | for (int x = 0; x < copy.w; x++) | 1357 | for (int x = 0; x < copy.w; x++) |
1357 | { | 1358 | { |
1358 | // 512 is the largest possible height before colours clamp | 1359 | // 512 is the largest possible height before colours clamp |
1359 | int colorindex = (int) (Math.Max(Math.Min(1.0, copy.Get(x, y)/512.0), 0.0)*(pallete - 1)); | 1360 | int colorindex = (int) (Math.Max(Math.Min(1.0, copy.Get(x, y)/512.0), 0.0)*(pallete - 1)); |
1360 | bmp.SetPixel(x, copy.h-y-1, colours[colorindex]); | 1361 | bmp.SetPixel(x, copy.h - y - 1, colours[colorindex]); |
1361 | } | 1362 | } |
1362 | } | 1363 | } |
1363 | return bmp; | 1364 | return bmp; |
1364 | } | 1365 | } |
1365 | } | 1366 | } |
1366 | } | 1367 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs index 4daa4b4..c56e29e 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainFilter.cs | |||
@@ -122,4 +122,4 @@ namespace OpenSim.Region.Terrain | |||
122 | LoadFilter(compiler, filename); | 122 | LoadFilter(compiler, filename); |
123 | } | 123 | } |
124 | } | 124 | } |
125 | } | 125 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Bitmap/Bitmap.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Bitmap/Bitmap.cs index 3aa321c..b761f1e 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Bitmap/Bitmap.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Bitmap/Bitmap.cs | |||
@@ -83,4 +83,4 @@ namespace libTerrain | |||
83 | gd.DrawString(txt, new Font(font, (float) size), new SolidBrush(Color.White), area, sf); | 83 | gd.DrawString(txt, new Font(font, (float) size), new SolidBrush(Color.White), area, sf); |
84 | } | 84 | } |
85 | } | 85 | } |
86 | } | 86 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Channel.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Channel.cs index 9c7ab35..a7f7246 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Channel.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Channel.cs | |||
@@ -57,4 +57,4 @@ namespace libTerrain | |||
57 | diff = new int[(int) (w/16),(int) (h/16)]; | 57 | diff = new int[(int) (w/16),(int) (h/16)]; |
58 | } | 58 | } |
59 | } | 59 | } |
60 | } | 60 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs index 083d2f5..8bc4a04 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Common.cs | |||
@@ -280,4 +280,4 @@ namespace libTerrain | |||
280 | return false; | 280 | return false; |
281 | } | 281 | } |
282 | } | 282 | } |
283 | } | 283 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs index b4784f0..df34eeb 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Flatten.cs | |||
@@ -143,4 +143,4 @@ namespace libTerrain | |||
143 | Blend(flat, temp); | 143 | Blend(flat, temp); |
144 | } | 144 | } |
145 | } | 145 | } |
146 | } | 146 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs index 5517c52..9a8b8f5 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Editing/Raise.cs | |||
@@ -134,4 +134,4 @@ namespace libTerrain | |||
134 | } | 134 | } |
135 | } | 135 | } |
136 | } | 136 | } |
137 | } | 137 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/File.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/File.cs index fa3840f..3d51583 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/File.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/File.cs | |||
@@ -73,4 +73,4 @@ namespace libTerrain | |||
73 | bit.Save(filename); | 73 | bit.Save(filename); |
74 | } | 74 | } |
75 | } | 75 | } |
76 | } | 76 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Fracture.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Fracture.cs index 549fe0b..992377f 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Fracture.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Fracture.cs | |||
@@ -140,4 +140,4 @@ namespace libTerrain | |||
140 | Normalise(); | 140 | Normalise(); |
141 | } | 141 | } |
142 | } | 142 | } |
143 | } | 143 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Gradient.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Gradient.cs index 3ac1ed7..6cdf7ce 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Gradient.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Gradient.cs | |||
@@ -58,4 +58,4 @@ namespace libTerrain | |||
58 | Normalise(); | 58 | Normalise(); |
59 | } | 59 | } |
60 | } | 60 | } |
61 | } | 61 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/HillPlanter.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/HillPlanter.cs index 9e86aaf..000bfcc 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/HillPlanter.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/HillPlanter.cs | |||
@@ -279,4 +279,4 @@ namespace libTerrain | |||
279 | Normalise(); | 279 | Normalise(); |
280 | } | 280 | } |
281 | } | 281 | } |
282 | } | 282 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Noise.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Noise.cs index 80e10ba..0bce1b2 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Noise.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Noise.cs | |||
@@ -51,4 +51,4 @@ namespace libTerrain | |||
51 | } | 51 | } |
52 | } | 52 | } |
53 | } | 53 | } |
54 | } | 54 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs index 330e7f5..414f844 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Spiral.cs | |||
@@ -154,4 +154,4 @@ namespace libTerrain | |||
154 | Normalise(); | 154 | Normalise(); |
155 | } | 155 | } |
156 | } | 156 | } |
157 | } | 157 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Voronoi.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Voronoi.cs index dc53343..e188486 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Voronoi.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Voronoi.cs | |||
@@ -209,4 +209,4 @@ namespace libTerrain | |||
209 | Normalise(); | 209 | Normalise(); |
210 | } | 210 | } |
211 | } | 211 | } |
212 | } | 212 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Worms.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Worms.cs index 7727344..8f9f14b 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Worms.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Generators/Worms.cs | |||
@@ -69,4 +69,4 @@ namespace libTerrain | |||
69 | } | 69 | } |
70 | } | 70 | } |
71 | } | 71 | } |
72 | } | 72 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs index 41f6ece..4ff8e78 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Grid.cs | |||
@@ -356,4 +356,4 @@ namespace libTerrain | |||
356 | return this; | 356 | return this; |
357 | } | 357 | } |
358 | } | 358 | } |
359 | } | 359 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs index 3560a80..8e8d30f 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/AerobicErosion.cs | |||
@@ -209,4 +209,4 @@ namespace libTerrain | |||
209 | SaveImage("testimg/output.png"); | 209 | SaveImage("testimg/output.png"); |
210 | } | 210 | } |
211 | } | 211 | } |
212 | } | 212 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/HydraulicErosion.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/HydraulicErosion.cs index 35f5288..abb620a 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/HydraulicErosion.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/HydraulicErosion.cs | |||
@@ -142,4 +142,4 @@ namespace libTerrain | |||
142 | } | 142 | } |
143 | } | 143 | } |
144 | } | 144 | } |
145 | } | 145 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs index f14cea7..896c354 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/NavierStokes.cs | |||
@@ -304,4 +304,4 @@ namespace libTerrain | |||
304 | nsBufferToDoubles(ref dens, N, ref map); | 304 | nsBufferToDoubles(ref dens, N, ref map); |
305 | } | 305 | } |
306 | } | 306 | } |
307 | } | 307 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs index 6767bb9..5be239f 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Manipulators/ThermalWeathering.cs | |||
@@ -105,4 +105,4 @@ namespace libTerrain | |||
105 | return this; | 105 | return this; |
106 | } | 106 | } |
107 | } | 107 | } |
108 | } | 108 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Neighbours.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Neighbours.cs index 2ffa231..a946b09 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Neighbours.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Neighbours.cs | |||
@@ -134,4 +134,4 @@ namespace libTerrain | |||
134 | return coord; | 134 | return coord; |
135 | } | 135 | } |
136 | } | 136 | } |
137 | } | 137 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Operators.cs b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Operators.cs index 0cca110..6de16ff 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Operators.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/libTerrainBSD/Channel/Operators.cs | |||
@@ -237,4 +237,4 @@ namespace libTerrain | |||
237 | return A; | 237 | return A; |
238 | } | 238 | } |
239 | } | 239 | } |
240 | } | 240 | } \ No newline at end of file |