diff options
author | Adam Frisby | 2008-01-22 00:33:05 +0000 |
---|---|---|
committer | Adam Frisby | 2008-01-22 00:33:05 +0000 |
commit | 7d61705c3c669cea77536f6bad4383790277c167 (patch) | |
tree | bbed6281b4215da0f3475b83d24c2bada959ed6d /OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | |
parent | * Added an army of exception handlers to the InterRegion logoff message (diff) | |
download | opensim-SC_OLD-7d61705c3c669cea77536f6bad4383790277c167.zip opensim-SC_OLD-7d61705c3c669cea77536f6bad4383790277c167.tar.gz opensim-SC_OLD-7d61705c3c669cea77536f6bad4383790277c167.tar.bz2 opensim-SC_OLD-7d61705c3c669cea77536f6bad4383790277c167.tar.xz |
* Renamed a number of TerrainEngine functions to conform naming standards better.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs index fdbbb5e..7605122 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/TerrainEngine.cs | |||
@@ -123,12 +123,12 @@ namespace OpenSim.Region.Terrain | |||
123 | tainted++; | 123 | tainted++; |
124 | } | 124 | } |
125 | 125 | ||
126 | public bool Tainted() | 126 | public bool IsTainted() |
127 | { | 127 | { |
128 | return (tainted != 0); | 128 | return (tainted != 0); |
129 | } | 129 | } |
130 | 130 | ||
131 | public bool StillEditing() | 131 | public bool IsUserStillEditing() |
132 | { | 132 | { |
133 | TimeSpan gap = DateTime.Now - lastEdit; | 133 | TimeSpan gap = DateTime.Now - lastEdit; |
134 | 134 | ||
@@ -138,7 +138,7 @@ namespace OpenSim.Region.Terrain | |||
138 | return false; | 138 | return false; |
139 | } | 139 | } |
140 | 140 | ||
141 | public bool Tainted(int x, int y) | 141 | public bool IsTainted(int x, int y) |
142 | { | 142 | { |
143 | return (heightmap.diff[x/16, y/16] != 0); | 143 | return (heightmap.diff[x/16, y/16] != 0); |
144 | } | 144 | } |
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Terrain | |||
284 | { | 284 | { |
285 | for (int y = 0; y < 16; y++) | 285 | for (int y = 0; y < 16; y++) |
286 | { | 286 | { |
287 | if (Tainted(x*16, y*16)) | 287 | if (IsTainted(x*16, y*16)) |
288 | { | 288 | { |
289 | remoteUser.SendLayerData(x, y, GetHeights1D()); | 289 | remoteUser.SendLayerData(x, y, GetHeights1D()); |
290 | } | 290 | } |
@@ -300,7 +300,7 @@ namespace OpenSim.Region.Terrain | |||
300 | /// <summary> | 300 | /// <summary> |
301 | /// Checks to make sure the terrain is within baked values +/- maxRaise/minLower | 301 | /// Checks to make sure the terrain is within baked values +/- maxRaise/minLower |
302 | /// </summary> | 302 | /// </summary> |
303 | public void CheckHeightValues() | 303 | private void SetTerrainWithinBounds() |
304 | { | 304 | { |
305 | int x, y; | 305 | int x, y; |
306 | for (x = 0; x < w; x++) | 306 | for (x = 0; x < w; x++) |
@@ -518,7 +518,7 @@ namespace OpenSim.Region.Terrain | |||
518 | return ConsoleHills(args, ref resultText); | 518 | return ConsoleHills(args, ref resultText); |
519 | 519 | ||
520 | case "regenerate": | 520 | case "regenerate": |
521 | HillsGenerator(); | 521 | SetDefaultTerrain(); |
522 | break; | 522 | break; |
523 | 523 | ||
524 | case "rescale": | 524 | case "rescale": |
@@ -618,9 +618,9 @@ namespace OpenSim.Region.Terrain | |||
618 | 618 | ||
619 | case "grdmap": | 619 | case "grdmap": |
620 | if (args.Length >= 4) | 620 | if (args.Length >= 4) |
621 | ExportImage(filename, args[3]); | 621 | WriteImage(filename, args[3]); |
622 | else | 622 | else |
623 | ExportImage(filename, "defaultstripe.png"); | 623 | WriteImage(filename, "defaultstripe.png"); |
624 | break; | 624 | break; |
625 | 625 | ||
626 | case "png": | 626 | case "png": |
@@ -1272,7 +1272,7 @@ namespace OpenSim.Region.Terrain | |||
1272 | /// <summary> | 1272 | /// <summary> |
1273 | /// Generates a simple set of hills in the shape of an island | 1273 | /// Generates a simple set of hills in the shape of an island |
1274 | /// </summary> | 1274 | /// </summary> |
1275 | public void HillsGenerator() | 1275 | public void SetDefaultTerrain() |
1276 | { | 1276 | { |
1277 | lock (heightmap) | 1277 | lock (heightmap) |
1278 | { | 1278 | { |
@@ -1317,7 +1317,7 @@ namespace OpenSim.Region.Terrain | |||
1317 | /// </summary> | 1317 | /// </summary> |
1318 | /// <param name="filename">The destination filename for the image</param> | 1318 | /// <param name="filename">The destination filename for the image</param> |
1319 | /// <param name="gradientmap">A 1x*height* image which contains the colour gradient to export with. Must be at least 1x2 pixels, 1x256 or more is ideal.</param> | 1319 | /// <param name="gradientmap">A 1x*height* image which contains the colour gradient to export with. Must be at least 1x2 pixels, 1x256 or more is ideal.</param> |
1320 | public void ExportImage(string filename, string gradientmap) | 1320 | public void WriteImage(string filename, string gradientmap) |
1321 | { | 1321 | { |
1322 | try | 1322 | try |
1323 | { | 1323 | { |
@@ -1335,7 +1335,7 @@ namespace OpenSim.Region.Terrain | |||
1335 | /// Exports the current heightmap in Jpeg2000 format to a byte[] | 1335 | /// Exports the current heightmap in Jpeg2000 format to a byte[] |
1336 | /// </summary> | 1336 | /// </summary> |
1337 | /// <param name="gradientmap">A 1x*height* image which contains the colour gradient to export with. Must be at least 1x2 pixels, 1x256 or more is ideal.</param> | 1337 | /// <param name="gradientmap">A 1x*height* image which contains the colour gradient to export with. Must be at least 1x2 pixels, 1x256 or more is ideal.</param> |
1338 | public byte[] ExportJpegImage(string gradientmap) | 1338 | public byte[] WriteJpegImage(string gradientmap) |
1339 | { | 1339 | { |
1340 | byte[] imageData = null; | 1340 | byte[] imageData = null; |
1341 | try | 1341 | try |