diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/WorldMap/ShadedMapTileRenderer.cs | 31 |
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 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Drawing; |
30 | using System.Collections.Generic; | 30 | using System.Reflection; |
31 | using System.Drawing; | 31 | using log4net; |
32 | using System.Drawing.Drawing2D; | 32 | using Nini.Config; |
33 | using System.Drawing.Imaging; | 33 | using OpenSim.Region.Framework.Scenes; |
34 | using System.Reflection; | 34 | |
35 | using OpenMetaverse; | ||
36 | using OpenMetaverse.Imaging; | ||
37 | using Nini.Config; | ||
38 | using log4net; | ||
39 | using OpenSim.Region.Framework.Interfaces; | ||
40 | using OpenSim.Region.Framework.Scenes; | ||
41 | |||
42 | namespace OpenSim.Region.CoreModules.World.WorldMap | 35 | namespace 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 | } |