aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-08-13 20:34:46 +0100
committerJustin Clark-Casey (justincc)2010-08-13 20:34:46 +0100
commit5f5c65e4bae1f2a84d6972697d0413137f6b1da1 (patch)
tree9d02b3aa7b4e6417ca4cf2661cc530d71637acab /OpenSim/Region/Framework
parentrefactor: Use SOP.Flags rather than SOP.ObjectFlags (diff)
downloadopensim-SC_OLD-5f5c65e4bae1f2a84d6972697d0413137f6b1da1.zip
opensim-SC_OLD-5f5c65e4bae1f2a84d6972697d0413137f6b1da1.tar.gz
opensim-SC_OLD-5f5c65e4bae1f2a84d6972697d0413137f6b1da1.tar.bz2
opensim-SC_OLD-5f5c65e4bae1f2a84d6972697d0413137f6b1da1.tar.xz
refactor: move more map tile generation code from scene to IWorldMapModule
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs27
2 files changed, 4 insertions, 28 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs b/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs
index ac6afed..d6e31f4 100644
--- a/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IWorldMapModule.cs
@@ -29,6 +29,9 @@ namespace OpenSim.Region.Framework.Interfaces
29{ 29{
30 public interface IWorldMapModule 30 public interface IWorldMapModule
31 { 31 {
32 void RegenerateMaptile(byte[] data); 32 /// <summary>
33 /// Generate a map tile for the scene. a terrain texture for this scene
34 /// </summary>
35 void GenerateMaptile();
33 } 36 }
34} 37}
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index afdb95b..4d5c1e7 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1812,33 +1812,6 @@ namespace OpenSim.Region.Framework.Scenes
1812 1812
1813 } 1813 }
1814 1814
1815 /// <summary>
1816 /// Create a terrain texture for this scene
1817 /// </summary>
1818 public void CreateTerrainTexture()
1819 {
1820 //create a texture asset of the terrain
1821 IMapImageGenerator terrain = RequestModuleInterface<IMapImageGenerator>();
1822
1823 // Cannot create a map for a nonexistant heightmap yet.
1824 if (Heightmap == null)
1825 return;
1826
1827 if (terrain == null)
1828 return;
1829
1830 byte[] data = terrain.WriteJpeg2000Image("defaultstripe.png");
1831 if (data != null)
1832 {
1833 IWorldMapModule mapModule = RequestModuleInterface<IWorldMapModule>();
1834
1835 if (mapModule != null)
1836 mapModule.RegenerateMaptile(data);
1837 else
1838 m_log.DebugFormat("[SCENE]: MapModule is null, can't save maptile");
1839 }
1840 }
1841
1842 #endregion 1815 #endregion
1843 1816
1844 #region Load Land 1817 #region Load Land