From 79de35aea2d9c694ece9a0d6af7142bdf4aab491 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 2 Jun 2007 03:00:37 +0000 Subject: * Fixing world map generation issues (thankyou LL for using different coordinates than the rest of the graphics community! =p) --- OpenSim/OpenSim.RegionServer/world/World.cs | 4 ++-- OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/OpenSim/OpenSim.RegionServer/world/World.cs b/OpenSim/OpenSim.RegionServer/world/World.cs index 22beb0e..ad1ce30 100644 --- a/OpenSim/OpenSim.RegionServer/world/World.cs +++ b/OpenSim/OpenSim.RegionServer/world/World.cs @@ -230,7 +230,7 @@ namespace OpenSim.world OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain tainted, saving."); localStorage.SaveMap(Terrain.getHeights1D()); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Rebuilding world map image."); - Terrain.exportImage("map_" + m_regInfo.RegionName + ".png", "defaultstripe.png"); + Terrain.exportImage("map_" + m_regInfo.RegionName.ToLower() + ".png", "defaultstripe.png"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW, "World.cs: Backup() - Terrain saved, informing Physics."); phyScene.SetTerrain(Terrain.getHeights1D()); @@ -435,7 +435,7 @@ namespace OpenSim.world } catch (Exception e) { - Console.WriteLine("Unable to load default terrain (" + e.ToString() + "), procedurally generating instead..."); + Console.WriteLine("Unable to load default terrain, procedurally generating instead..."); Terrain.hills(); } this.localStorage.SaveMap(this.Terrain.getHeights1D()); diff --git a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs b/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs index aa785b0..047187a 100644 --- a/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs +++ b/OpenSim/OpenSim.Terrain.BasicTerrain/TerrainEngine.cs @@ -469,7 +469,7 @@ namespace OpenSim.Terrain { // 512 is the largest possible height before colours clamp int colorindex = (int)(Math.Max(Math.Min(1.0, copy.get(x, y) / 512.0), 0.0) * pallete); - bmp.SetPixel(x, y, colours[colorindex]); + bmp.SetPixel(y, 255 - x, colours[colorindex]); } } -- cgit v1.1