aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMelanie2010-10-06 01:42:18 +0100
committerMelanie2010-10-06 01:42:18 +0100
commitc97398575cf576d214edcc15636c45e4dc287b52 (patch)
tree174bf2623264f88cd14a8d2c6f23cf2050cef324
parentRemove sirikata project (diff)
downloadopensim-SC_OLD-c97398575cf576d214edcc15636c45e4dc287b52.zip
opensim-SC_OLD-c97398575cf576d214edcc15636c45e4dc287b52.tar.gz
opensim-SC_OLD-c97398575cf576d214edcc15636c45e4dc287b52.tar.bz2
opensim-SC_OLD-c97398575cf576d214edcc15636c45e4dc287b52.tar.xz
Convert the map image modules to new style modules
-rw-r--r--OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml2
-rw-r--r--OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs26
-rw-r--r--OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs26
3 files changed, 42 insertions, 12 deletions
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
index e85e4e9..730ee25 100644
--- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
+++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
@@ -76,6 +76,8 @@
76 <RegionModule id="GridInfoServiceInConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid.GridInfoServiceInConnectorModule" /> \ 76 <RegionModule id="GridInfoServiceInConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Grid.GridInfoServiceInConnectorModule" /> \
77 <RegionModule id="AuthenticationServiceInConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication.AuthenticationServiceInConnectorModule" /> 77 <RegionModule id="AuthenticationServiceInConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsIn.Authentication.AuthenticationServiceInConnectorModule" />
78 <RegionModule id="AccessModule" type="OpenSim.Region.CoreModules.World.AccessModule" /> \ 78 <RegionModule id="AccessModule" type="OpenSim.Region.CoreModules.World.AccessModule" /> \
79 <RegionModule id="MapImageModule" type="OpenSim.Region.CoreModules.World.LegacyMap.MapImageModule" /> \
80 <RegionModule id="Warp3DImageModule" type="OpenSim.Region.CoreModules.World.Warp3DMap/Warp3DImageModule" /> \
79 81
80 </Extension> 82 </Extension>
81 83
diff --git a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
index 8408bf9..c9ef1f4 100644
--- a/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/LegacyMap/MapImageModule.cs
@@ -59,7 +59,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
59 public face[] trns; 59 public face[] trns;
60 } 60 }
61 61
62 public class MapImageModule : IMapImageGenerator, IRegionModule 62 public class MapImageModule : IMapImageGenerator, INonSharedRegionModule
63 { 63 {
64 private static readonly ILog m_log = 64 private static readonly ILog m_log =
65 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 65 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -67,6 +67,7 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
67 private Scene m_scene; 67 private Scene m_scene;
68 private IConfigSource m_config; 68 private IConfigSource m_config;
69 private IMapTileTerrainRenderer terrainRenderer; 69 private IMapTileTerrainRenderer terrainRenderer;
70 private bool m_Enabled = false;
70 71
71 #region IMapImageGenerator Members 72 #region IMapImageGenerator Members
72 73
@@ -132,9 +133,8 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
132 133
133 #region IRegionModule Members 134 #region IRegionModule Members
134 135
135 public void Initialise(Scene scene, IConfigSource source) 136 public void Initialise(IConfigSource source)
136 { 137 {
137 m_scene = scene;
138 m_config = source; 138 m_config = source;
139 139
140 IConfig startupConfig = m_config.Configs["Startup"]; 140 IConfig startupConfig = m_config.Configs["Startup"];
@@ -142,10 +142,24 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
142 "MapImageModule") 142 "MapImageModule")
143 return; 143 return;
144 144
145 m_Enabled = true;
146 }
147
148 public void AddRegion(Scene scene)
149 {
150 if (!m_Enabled)
151 return;
152
153 m_scene = scene;
154
145 m_scene.RegisterModuleInterface<IMapImageGenerator>(this); 155 m_scene.RegisterModuleInterface<IMapImageGenerator>(this);
146 } 156 }
147 157
148 public void PostInitialise() 158 public void RegionLoaded(Scene scene)
159 {
160 }
161
162 public void RemoveRegion(Scene scene)
149 { 163 {
150 } 164 }
151 165
@@ -158,9 +172,9 @@ namespace OpenSim.Region.CoreModules.World.LegacyMap
158 get { return "MapImageModule"; } 172 get { return "MapImageModule"; }
159 } 173 }
160 174
161 public bool IsSharedModule 175 public Type ReplaceableInterface
162 { 176 {
163 get { return false; } 177 get { return null; }
164 } 178 }
165 179
166 #endregion 180 #endregion
diff --git a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs
index 803a33a..eca85d3 100644
--- a/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs
+++ b/OpenSim/Region/CoreModules/World/Warp3DMap/MapImageModule.cs
@@ -49,7 +49,7 @@ using WarpRenderer = global::Warp3D.Warp3D;
49 49
50namespace OpenSim.Region.CoreModules.World.Warp3DMap 50namespace OpenSim.Region.CoreModules.World.Warp3DMap
51{ 51{
52 public class Warp3DImageModule : IMapImageGenerator, IRegionModule 52 public class Warp3DImageModule : IMapImageGenerator, INonSharedRegionModule
53 { 53 {
54 private static readonly UUID TEXTURE_METADATA_MAGIC = new UUID("802dc0e0-f080-4931-8b57-d1be8611c4f3"); 54 private static readonly UUID TEXTURE_METADATA_MAGIC = new UUID("802dc0e0-f080-4931-8b57-d1be8611c4f3");
55 private static readonly Color4 WATER_COLOR = new Color4(29, 71, 95, 216); 55 private static readonly Color4 WATER_COLOR = new Color4(29, 71, 95, 216);
@@ -62,18 +62,28 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
62 private IConfigSource m_config; 62 private IConfigSource m_config;
63 private Dictionary<UUID, Color4> m_colors = new Dictionary<UUID, Color4>(); 63 private Dictionary<UUID, Color4> m_colors = new Dictionary<UUID, Color4>();
64 private bool m_useAntiAliasing = true; // TODO: Make this a config option 64 private bool m_useAntiAliasing = true; // TODO: Make this a config option
65 private bool m_Enabled = false;
65 66
66 #region IRegionModule Members 67 #region IRegionModule Members
67 68
68 public void Initialise(Scene scene, IConfigSource source) 69 public void Initialise(IConfigSource source)
69 { 70 {
70 m_scene = scene;
71 m_config = source; 71 m_config = source;
72 72
73 IConfig startupConfig = m_config.Configs["Startup"]; 73 IConfig startupConfig = m_config.Configs["Startup"];
74 if (startupConfig.GetString("MapImageModule", "MapImageModule") != "Warp3DImageModule") 74 if (startupConfig.GetString("MapImageModule", "MapImageModule") != "Warp3DImageModule")
75 return; 75 return;
76 76
77 m_Enabled = true;
78 }
79
80 public void AddRegion(Scene scene)
81 {
82 if (!m_Enabled)
83 return;
84
85 m_scene = scene;
86
77 List<string> renderers = RenderingLoader.ListRenderers(Util.ExecutingDirectory()); 87 List<string> renderers = RenderingLoader.ListRenderers(Util.ExecutingDirectory());
78 if (renderers.Count > 0) 88 if (renderers.Count > 0)
79 { 89 {
@@ -88,7 +98,11 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
88 m_scene.RegisterModuleInterface<IMapImageGenerator>(this); 98 m_scene.RegisterModuleInterface<IMapImageGenerator>(this);
89 } 99 }
90 100
91 public void PostInitialise() 101 public void RegionLoaded(Scene scene)
102 {
103 }
104
105 public void RemoveRegion(Scene scene)
92 { 106 {
93 } 107 }
94 108
@@ -101,9 +115,9 @@ namespace OpenSim.Region.CoreModules.World.Warp3DMap
101 get { return "Warp3DImageModule"; } 115 get { return "Warp3DImageModule"; }
102 } 116 }
103 117
104 public bool IsSharedModule 118 public Type ReplaceableInterface
105 { 119 {
106 get { return false; } 120 get { return null; }
107 } 121 }
108 122
109 #endregion 123 #endregion