diff --git a/OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/RaiseArea.cs b/OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/RaiseArea.cs
index 8fd957b2da..258b3635b7 100644
--- a/OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/RaiseArea.cs
+++ b/OpenSim/Region/Environment/Modules/Terrain/FloodBrushes/RaiseArea.cs
@@ -6,7 +6,7 @@ using OpenSim.Region.Environment.Interfaces;
namespace OpenSim.Region.Environment.Modules.Terrain.FloodBrushes
{
- class RaiseArea : ITerrainFloodEffect
+ public class RaiseArea : ITerrainFloodEffect
{
#region ITerrainFloodEffect Members
diff --git a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RaiseSphere.cs b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RaiseSphere.cs
index be4a0b7671..ff7ec0b69e 100644
--- a/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RaiseSphere.cs
+++ b/OpenSim/Region/Environment/Modules/Terrain/PaintBrushes/RaiseSphere.cs
@@ -6,7 +6,7 @@ using OpenSim.Region.Environment.Interfaces;
namespace OpenSim.Region.Environment.Modules.Terrain.PaintBrushes
{
- class RaiseSphere : ITerrainPaintableEffect
+ public class RaiseSphere : ITerrainPaintableEffect
{
#region ITerrainPaintableEffect Members
diff --git a/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs
index 24b3f506c7..f70483538c 100644
--- a/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/Environment/Modules/Terrain/TerrainModule.cs
@@ -54,6 +54,12 @@ namespace OpenSim.Region.Environment.Modules.Terrain
void RunEffect(ITerrainChannel map, double strength);
}
+ public interface ITerrainLoader
+ {
+ ITerrainChannel LoadFile(string filename);
+ void SaveFile(string filename);
+ }
+
///
/// A new version of the old Channel class, simplified
///
@@ -126,6 +132,7 @@ namespace OpenSim.Region.Environment.Modules.Terrain
new Dictionary();
private Dictionary m_floodeffects =
new Dictionary();
+ private Dictionary m_loaders = new Dictionary();
Scene m_scene;
ITerrainChannel m_channel;
private IConfigSource m_gConfig;
@@ -134,6 +141,34 @@ namespace OpenSim.Region.Environment.Modules.Terrain
{
m_painteffects[StandardTerrainEffects.Raise] = new PaintBrushes.RaiseSphere();
m_floodeffects[StandardTerrainEffects.Raise] = new FloodBrushes.RaiseArea();
+
+ // Float[256,256] array format (RAW32)
+ m_loaders[".r32"] = new FileLoaders.RAW32();
+ m_loaders[".f32"] = m_loaders[".r32"];
+ }
+
+ public void LoadFromFile(string filename)
+ {
+ foreach (KeyValuePair loader in m_loaders)
+ {
+ if (filename.EndsWith(loader.Key))
+ {
+ loader.Value.LoadFile(filename);
+ return;
+ }
+ }
+ }
+
+ public void SaveToFile(string filename)
+ {
+ foreach (KeyValuePair loader in m_loaders)
+ {
+ if (filename.EndsWith(loader.Key))
+ {
+ loader.Value.SaveFile(filename);
+ return;
+ }
+ }
}
public void Initialise(Scene scene, IConfigSource config)