aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs b/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs
new file mode 100644
index 0000000..2076490
--- /dev/null
+++ b/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs
@@ -0,0 +1,33 @@
1using System;
2using System.Collections.Generic;
3using System.Drawing;
4using libsecondlife;
5using Nini.Config;
6using OpenSim.Framework;
7using OpenSim.Region.Environment.Interfaces;
8using OpenSim.Region.Environment.Scenes;
9using OpenSim.Region.Environment.Modules.ModuleFramework;
10using OpenSim.Region.Environment.Modules.Terrain;
11
12namespace OpenSim.Region.Environment.Modules.ExportSerialiser
13{
14 class SerialiseTerrain : IFileSerialiser
15 {
16 #region IFileSerialiser Members
17
18 public string WriteToFile(Scene scene, string dir)
19 {
20 ITerrainLoader fileSystemExporter = new Terrain.FileLoaders.RAW32();
21 string targetFileName = dir + "heightmap.r32";
22
23 lock (scene.Heightmap)
24 {
25 fileSystemExporter.SaveFile(targetFileName, scene.Heightmap);
26 }
27
28 return "heightmap.r32";
29 }
30
31 #endregion
32 }
33}