diff options
author | Adam Frisby | 2008-05-01 16:35:00 +0000 |
---|---|---|
committer | Adam Frisby | 2008-05-01 16:35:00 +0000 |
commit | 13526097f24b7a8ad63b1d482c44b44397fa055f (patch) | |
tree | 7a82c20ed7c63e2aea5ad3863325e37f64e1cbea /OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs | |
parent | * Breaking all the code, breaking all the code..! (diff) | |
download | opensim-SC_OLD-13526097f24b7a8ad63b1d482c44b44397fa055f.zip opensim-SC_OLD-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.gz opensim-SC_OLD-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.bz2 opensim-SC_OLD-13526097f24b7a8ad63b1d482c44b44397fa055f.tar.xz |
* Spring cleaning on Region.Environment.
* Converted a large number of read-only fields to be actually, readonly.
* Reformatted code sections.
* Removed redundant code.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs index 7cb4b00..04c3f1a 100644 --- a/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs +++ b/OpenSim/Region/Environment/Modules/World/Terrain/FileLoaders/Terragen.cs | |||
@@ -50,14 +50,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
50 | BinaryReader bs = new BinaryReader(s); | 50 | BinaryReader bs = new BinaryReader(s); |
51 | 51 | ||
52 | bool eof = false; | 52 | bool eof = false; |
53 | if (ASCIIEncoding.ASCII.GetString(bs.ReadBytes(16)) == "TERRAGENTERRAIN ") | 53 | if (Encoding.ASCII.GetString(bs.ReadBytes(16)) == "TERRAGENTERRAIN ") |
54 | { | 54 | { |
55 | // Terragen file | 55 | // Terragen file |
56 | while (eof == false) | 56 | while (eof == false) |
57 | { | 57 | { |
58 | int w = 256; | 58 | int w = 256; |
59 | int h = 256; | 59 | int h = 256; |
60 | string tmp = ASCIIEncoding.ASCII.GetString(bs.ReadBytes(4)); | 60 | string tmp = Encoding.ASCII.GetString(bs.ReadBytes(4)); |
61 | switch (tmp) | 61 | switch (tmp) |
62 | { | 62 | { |
63 | case "SIZE": | 63 | case "SIZE": |
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders | |||
84 | { | 84 | { |
85 | for (y = 0; y < h; y++) | 85 | for (y = 0; y < h; y++) |
86 | { | 86 | { |
87 | retval[x, y] = (double) baseHeight + (double) bs.ReadInt16() * (double) heightScale / 65536.0; | 87 | retval[x, y] = baseHeight + bs.ReadInt16() * (double) heightScale / 65536.0; |
88 | } | 88 | } |
89 | } | 89 | } |
90 | break; | 90 | break; |