diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs index fe36cf7..5dc2aa5 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs | |||
@@ -43,10 +43,19 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
43 | 43 | ||
44 | public ITerrainChannel LoadFile(string filename) | 44 | public ITerrainChannel LoadFile(string filename) |
45 | { | 45 | { |
46 | TerrainChannel retval = new TerrainChannel(); | ||
47 | |||
48 | FileInfo file = new FileInfo(filename); | 46 | FileInfo file = new FileInfo(filename); |
49 | FileStream s = file.Open(FileMode.Open, FileAccess.Read); | 47 | FileStream s = file.Open(FileMode.Open, FileAccess.Read); |
48 | ITerrainChannel retval = LoadStream(s); | ||
49 | |||
50 | s.Close(); | ||
51 | |||
52 | return retval; | ||
53 | } | ||
54 | |||
55 | public ITerrainChannel LoadStream(Stream s) | ||
56 | { | ||
57 | TerrainChannel retval = new TerrainChannel(); | ||
58 | |||
50 | BinaryReader bs = new BinaryReader(s); | 59 | BinaryReader bs = new BinaryReader(s); |
51 | 60 | ||
52 | bool eof = false; | 61 | bool eof = false; |
@@ -98,8 +107,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
98 | } | 107 | } |
99 | 108 | ||
100 | bs.Close(); | 109 | bs.Close(); |
101 | s.Close(); | 110 | |
102 | |||
103 | return retval; | 111 | return retval; |
104 | } | 112 | } |
105 | 113 | ||
@@ -107,6 +115,11 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
107 | { | 115 | { |
108 | throw new NotImplementedException(); | 116 | throw new NotImplementedException(); |
109 | } | 117 | } |
118 | |||
119 | public void SaveStream(Stream stream, ITerrainChannel map) | ||
120 | { | ||
121 | throw new NotImplementedException(); | ||
122 | } | ||
110 | 123 | ||
111 | public string FileExtension | 124 | public string FileExtension |
112 | { | 125 | { |