aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs31
1 files changed, 12 insertions, 19 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs b/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs
index b783d7c..501c826 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs
@@ -25,20 +25,13 @@
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 27
28using System; 28using System;
29using System.Collections; 29using System.Drawing;
30using System.Collections.Generic; 30using System.Reflection;
31using System.Drawing; 31using log4net;
32using System.Drawing.Drawing2D; 32using Nini.Config;
33using System.Drawing.Imaging; 33using OpenSim.Region.Framework.Scenes;
34using System.Reflection; 34
35using OpenMetaverse;
36using OpenMetaverse.Imaging;
37using Nini.Config;
38using log4net;
39using OpenSim.Region.Framework.Interfaces;
40using OpenSim.Region.Framework.Scenes;
41
42namespace OpenSim.Region.CoreModules.World.WorldMap 35namespace OpenSim.Region.CoreModules.World.WorldMap
43{ 36{
44 public class ShadedMapTileRenderer : IMapTileTerrainRenderer 37 public class ShadedMapTileRenderer : IMapTileTerrainRenderer
@@ -57,7 +50,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
57 50
58 public void TerrainToBitmap(Bitmap mapbmp) 51 public void TerrainToBitmap(Bitmap mapbmp)
59 { 52 {
60 int tc = System.Environment.TickCount; 53 int tc = Environment.TickCount;
61 m_log.Info("[MAPTILE]: Generating Maptile Step 1: Terrain"); 54 m_log.Info("[MAPTILE]: Generating Maptile Step 1: Terrain");
62 55
63 double[,] hm = m_scene.Heightmap.GetDoubles(); 56 double[,] hm = m_scene.Heightmap.GetDoubles();
@@ -151,7 +144,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
151 hfdiffihighlight = hfdiffihighlight + Math.Abs((int)(((hfdiff * highlightfactor) % 1f) * 5f) - 1); 144 hfdiffihighlight = hfdiffihighlight + Math.Abs((int)(((hfdiff * highlightfactor) % 1f) * 5f) - 1);
152 } 145 }
153 } 146 }
154 catch (System.OverflowException) 147 catch (OverflowException)
155 { 148 {
156 m_log.Debug("[MAPTILE]: Shadow failed at value: " + hfdiff.ToString()); 149 m_log.Debug("[MAPTILE]: Shadow failed at value: " + hfdiff.ToString());
157 ShadowDebugContinue = false; 150 ShadowDebugContinue = false;
@@ -199,7 +192,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
199 } 192 }
200 } 193 }
201 } 194 }
202 catch (System.ArgumentException) 195 catch (ArgumentException)
203 { 196 {
204 if (!terraincorruptedwarningsaid) 197 if (!terraincorruptedwarningsaid)
205 { 198 {
@@ -230,7 +223,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
230 Color water = Color.FromArgb((int)heightvalue, (int)heightvalue, 255); 223 Color water = Color.FromArgb((int)heightvalue, (int)heightvalue, 255);
231 mapbmp.SetPixel(x, yr, water); 224 mapbmp.SetPixel(x, yr, water);
232 } 225 }
233 catch (System.ArgumentException) 226 catch (ArgumentException)
234 { 227 {
235 if (!terraincorruptedwarningsaid) 228 if (!terraincorruptedwarningsaid)
236 { 229 {
@@ -243,7 +236,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
243 } 236 }
244 } 237 }
245 } 238 }
246 m_log.Info("[MAPTILE]: Generating Maptile Step 1: Done in " + (System.Environment.TickCount - tc) + " ms"); 239 m_log.Info("[MAPTILE]: Generating Maptile Step 1: Done in " + (Environment.TickCount - tc) + " ms");
247 } 240 }
248 } 241 }
249} 242}