diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Terrain/FileLoaders/RAW32.cs')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Terrain/FileLoaders/RAW32.cs | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/FileLoaders/RAW32.cs b/OpenSim/Region/Environment/Modules/Terrain/FileLoaders/RAW32.cs index d0f5d07..bf716c5 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/FileLoaders/RAW32.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/FileLoaders/RAW32.cs | |||
@@ -1,43 +1,43 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using System.IO; | 4 | using System.IO; |
5 | using OpenSim.Region.Environment.Modules.Terrain; | 5 | using OpenSim.Region.Environment.Modules.Terrain; |
6 | using OpenSim.Region.Environment.Interfaces; | 6 | using OpenSim.Region.Environment.Interfaces; |
7 | 7 | ||
8 | namespace OpenSim.Region.Environment.Modules.Terrain.FileLoaders | 8 | namespace OpenSim.Region.Environment.Modules.Terrain.FileLoaders |
9 | { | 9 | { |
10 | public class RAW32 : ITerrainLoader | 10 | public class RAW32 : ITerrainLoader |
11 | { | 11 | { |
12 | #region ITerrainLoader Members | 12 | #region ITerrainLoader Members |
13 | 13 | ||
14 | public ITerrainChannel LoadFile(string filename) | 14 | public ITerrainChannel LoadFile(string filename) |
15 | { | 15 | { |
16 | TerrainChannel retval = new TerrainChannel(); | 16 | TerrainChannel retval = new TerrainChannel(); |
17 | 17 | ||
18 | FileInfo file = new FileInfo(filename); | 18 | FileInfo file = new FileInfo(filename); |
19 | FileStream s = file.Open(FileMode.Open, FileAccess.Read); | 19 | FileStream s = file.Open(FileMode.Open, FileAccess.Read); |
20 | BinaryReader bs = new BinaryReader(s); | 20 | BinaryReader bs = new BinaryReader(s); |
21 | int x, y; | 21 | int x, y; |
22 | for (y = 0; y < retval.Height; y++) | 22 | for (y = 0; y < retval.Height; y++) |
23 | { | 23 | { |
24 | for (x = 0; x < retval.Width; x++) | 24 | for (x = 0; x < retval.Width; x++) |
25 | { | 25 | { |
26 | retval[x, y] = bs.ReadSingle(); | 26 | retval[x, y] = bs.ReadSingle(); |
27 | } | 27 | } |
28 | } | 28 | } |
29 | 29 | ||
30 | bs.Close(); | 30 | bs.Close(); |
31 | s.Close(); | 31 | s.Close(); |
32 | 32 | ||
33 | return retval; | 33 | return retval; |
34 | } | 34 | } |
35 | 35 | ||
36 | public void SaveFile(string filename) | 36 | public void SaveFile(string filename) |
37 | { | 37 | { |
38 | throw new NotImplementedException(); | 38 | throw new NotImplementedException(); |
39 | } | 39 | } |
40 | 40 | ||
41 | #endregion | 41 | #endregion |
42 | } | 42 | } |
43 | } | 43 | } |