diff options
author | Jeff Ames | 2008-03-14 14:20:05 +0000 |
---|---|---|
committer | Jeff Ames | 2008-03-14 14:20:05 +0000 |
commit | 3778840f36fad24582d283db3c422fe5631305c3 (patch) | |
tree | f4b7e7795857e640c3990af3ed01e81e043e6d91 | |
parent | * Fixed 'flatten area' brush, so it now has a 'force' instead of instantly fl... (diff) | |
download | opensim-SC_OLD-3778840f36fad24582d283db3c422fe5631305c3.zip opensim-SC_OLD-3778840f36fad24582d283db3c422fe5631305c3.tar.gz opensim-SC_OLD-3778840f36fad24582d283db3c422fe5631305c3.tar.bz2 opensim-SC_OLD-3778840f36fad24582d283db3c422fe5631305c3.tar.xz |
Update svn properties.
5 files changed, 265 insertions, 265 deletions
diff --git a/OpenSim/Region/Environment/Modules/Terrain/ITerrainEffect.cs b/OpenSim/Region/Environment/Modules/Terrain/ITerrainEffect.cs index e7fcf68..9150582 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/ITerrainEffect.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/ITerrainEffect.cs | |||
@@ -1,36 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using OpenSim.Region.Environment.Interfaces; | 28 | using OpenSim.Region.Environment.Interfaces; |
29 | 29 | ||
30 | namespace OpenSim.Region.Environment.Modules.Terrain | 30 | namespace OpenSim.Region.Environment.Modules.Terrain |
31 | { | 31 | { |
32 | public interface ITerrainEffect | 32 | public interface ITerrainEffect |
33 | { | 33 | { |
34 | void RunEffect(ITerrainChannel map, double strength); | 34 | void RunEffect(ITerrainChannel map, double strength); |
35 | } | 35 | } |
36 | } | 36 | } |
diff --git a/OpenSim/Region/Environment/Modules/Terrain/ITerrainFloodEffect.cs b/OpenSim/Region/Environment/Modules/Terrain/ITerrainFloodEffect.cs index aabd19b..d573af6 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/ITerrainFloodEffect.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/ITerrainFloodEffect.cs | |||
@@ -1,37 +1,37 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using OpenSim.Region.Environment.Interfaces; | 28 | using OpenSim.Region.Environment.Interfaces; |
29 | using System; | 29 | using System; |
30 | 30 | ||
31 | namespace OpenSim.Region.Environment.Modules.Terrain | 31 | namespace OpenSim.Region.Environment.Modules.Terrain |
32 | { | 32 | { |
33 | public interface ITerrainFloodEffect | 33 | public interface ITerrainFloodEffect |
34 | { | 34 | { |
35 | void FloodEffect(ITerrainChannel map, Boolean[,] fillArea, double strength); | 35 | void FloodEffect(ITerrainChannel map, Boolean[,] fillArea, double strength); |
36 | } | 36 | } |
37 | } | 37 | } |
diff --git a/OpenSim/Region/Environment/Modules/Terrain/ITerrainLoader.cs b/OpenSim/Region/Environment/Modules/Terrain/ITerrainLoader.cs index b67c8f2..aff7fa4 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/ITerrainLoader.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/ITerrainLoader.cs | |||
@@ -1,37 +1,37 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using OpenSim.Region.Environment.Interfaces; | 28 | using OpenSim.Region.Environment.Interfaces; |
29 | 29 | ||
30 | namespace OpenSim.Region.Environment.Modules.Terrain | 30 | namespace OpenSim.Region.Environment.Modules.Terrain |
31 | { | 31 | { |
32 | public interface ITerrainLoader | 32 | public interface ITerrainLoader |
33 | { | 33 | { |
34 | ITerrainChannel LoadFile(string filename); | 34 | ITerrainChannel LoadFile(string filename); |
35 | void SaveFile(string filename, ITerrainChannel map); | 35 | void SaveFile(string filename, ITerrainChannel map); |
36 | } | 36 | } |
37 | } | 37 | } |
diff --git a/OpenSim/Region/Environment/Modules/Terrain/ITerrainPaintableEffect.cs b/OpenSim/Region/Environment/Modules/Terrain/ITerrainPaintableEffect.cs index cf1ea4e..d69a62b 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/ITerrainPaintableEffect.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/ITerrainPaintableEffect.cs | |||
@@ -1,36 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
6 | * modification, are permitted provided that the following conditions are met: | 6 | * modification, are permitted provided that the following conditions are met: |
7 | * * Redistributions of source code must retain the above copyright | 7 | * * Redistributions of source code must retain the above copyright |
8 | * notice, this list of conditions and the following disclaimer. | 8 | * notice, this list of conditions and the following disclaimer. |
9 | * * Redistributions in binary form must reproduce the above copyright | 9 | * * Redistributions in binary form must reproduce the above copyright |
10 | * notice, this list of conditions and the following disclaimer in the | 10 | * notice, this list of conditions and the following disclaimer in the |
11 | * documentation and/or other materials provided with the distribution. | 11 | * documentation and/or other materials provided with the distribution. |
12 | * * Neither the name of the OpenSim Project nor the | 12 | * * Neither the name of the OpenSim Project nor the |
13 | * names of its contributors may be used to endorse or promote products | 13 | * names of its contributors may be used to endorse or promote products |
14 | * derived from this software without specific prior written permission. | 14 | * derived from this software without specific prior written permission. |
15 | * | 15 | * |
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | 16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY |
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | 19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY |
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using OpenSim.Region.Environment.Interfaces; | 28 | using OpenSim.Region.Environment.Interfaces; |
29 | 29 | ||
30 | namespace OpenSim.Region.Environment.Modules.Terrain | 30 | namespace OpenSim.Region.Environment.Modules.Terrain |
31 | { | 31 | { |
32 | public interface ITerrainPaintableEffect | 32 | public interface ITerrainPaintableEffect |
33 | { | 33 | { |
34 | void PaintEffect(ITerrainChannel map, double x, double y, double strength, double duration); | 34 | void PaintEffect(ITerrainChannel map, double x, double y, double strength, double duration); |
35 | } | 35 | } |
36 | } | 36 | } |
diff --git a/OpenSim/Region/Environment/Modules/Terrain/TerrainChannel.cs b/OpenSim/Region/Environment/Modules/Terrain/TerrainChannel.cs index 59937d1..64e8668 100644 --- a/OpenSim/Region/Environment/Modules/Terrain/TerrainChannel.cs +++ b/OpenSim/Region/Environment/Modules/Terrain/TerrainChannel.cs | |||
@@ -1,119 +1,119 @@ | |||
1 | | 1 | |
2 | using OpenSim.Framework; | 2 | using OpenSim.Framework; |
3 | using OpenSim.Region.Environment.Interfaces; | 3 | using OpenSim.Region.Environment.Interfaces; |
4 | 4 | ||
5 | namespace OpenSim.Region.Environment.Modules.Terrain | 5 | namespace OpenSim.Region.Environment.Modules.Terrain |
6 | { | 6 | { |
7 | 7 | ||
8 | /// <summary> | 8 | /// <summary> |
9 | /// A new version of the old Channel class, simplified | 9 | /// A new version of the old Channel class, simplified |
10 | /// </summary> | 10 | /// </summary> |
11 | public class TerrainChannel : ITerrainChannel | 11 | public class TerrainChannel : ITerrainChannel |
12 | { | 12 | { |
13 | private double[,] map; | 13 | private double[,] map; |
14 | private bool[,] taint; | 14 | private bool[,] taint; |
15 | 15 | ||
16 | public int Width | 16 | public int Width |
17 | { | 17 | { |
18 | get { return map.GetLength(0); } | 18 | get { return map.GetLength(0); } |
19 | } | 19 | } |
20 | 20 | ||
21 | public int Height | 21 | public int Height |
22 | { | 22 | { |
23 | get { return map.GetLength(1); } | 23 | get { return map.GetLength(1); } |
24 | } | 24 | } |
25 | 25 | ||
26 | public TerrainChannel Copy() | 26 | public TerrainChannel Copy() |
27 | { | 27 | { |
28 | TerrainChannel copy = new TerrainChannel(false); | 28 | TerrainChannel copy = new TerrainChannel(false); |
29 | copy.map = (double[,])this.map.Clone(); | 29 | copy.map = (double[,])this.map.Clone(); |
30 | 30 | ||
31 | return copy; | 31 | return copy; |
32 | } | 32 | } |
33 | 33 | ||
34 | public float[] GetFloatsSerialised() | 34 | public float[] GetFloatsSerialised() |
35 | { | 35 | { |
36 | float[] heights = new float[Width * Height]; | 36 | float[] heights = new float[Width * Height]; |
37 | int i; | 37 | int i; |
38 | 38 | ||
39 | for (i = 0; i < Width * Height; i++) | 39 | for (i = 0; i < Width * Height; i++) |
40 | { | 40 | { |
41 | heights[i] = (float)map[i % Width, i / Width]; | 41 | heights[i] = (float)map[i % Width, i / Width]; |
42 | } | 42 | } |
43 | 43 | ||
44 | return heights; | 44 | return heights; |
45 | } | 45 | } |
46 | 46 | ||
47 | public double[,] GetDoubles() | 47 | public double[,] GetDoubles() |
48 | { | 48 | { |
49 | return map; | 49 | return map; |
50 | } | 50 | } |
51 | 51 | ||
52 | public double this[int x, int y] | 52 | public double this[int x, int y] |
53 | { | 53 | { |
54 | get | 54 | get |
55 | { | 55 | { |
56 | return map[x, y]; | 56 | return map[x, y]; |
57 | } | 57 | } |
58 | set | 58 | set |
59 | { | 59 | { |
60 | if (map[x, y] != value) | 60 | if (map[x, y] != value) |
61 | { | 61 | { |
62 | taint[x / 16, y / 16] = true; | 62 | taint[x / 16, y / 16] = true; |
63 | map[x, y] = value; | 63 | map[x, y] = value; |
64 | } | 64 | } |
65 | } | 65 | } |
66 | } | 66 | } |
67 | 67 | ||
68 | public bool Tainted(int x, int y) | 68 | public bool Tainted(int x, int y) |
69 | { | 69 | { |
70 | if (taint[x / 16, y / 16] != false) | 70 | if (taint[x / 16, y / 16] != false) |
71 | { | 71 | { |
72 | taint[x / 16, y / 16] = false; | 72 | taint[x / 16, y / 16] = false; |
73 | return true; | 73 | return true; |
74 | } | 74 | } |
75 | else | 75 | else |
76 | { | 76 | { |
77 | return false; | 77 | return false; |
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
81 | public TerrainChannel() | 81 | public TerrainChannel() |
82 | { | 82 | { |
83 | map = new double[Constants.RegionSize, Constants.RegionSize]; | 83 | map = new double[Constants.RegionSize, Constants.RegionSize]; |
84 | taint = new bool[Constants.RegionSize / 16, Constants.RegionSize / 16]; | 84 | taint = new bool[Constants.RegionSize / 16, Constants.RegionSize / 16]; |
85 | 85 | ||
86 | int x, y; | 86 | int x, y; |
87 | for (x = 0; x < Constants.RegionSize; x++) | 87 | for (x = 0; x < Constants.RegionSize; x++) |
88 | { | 88 | { |
89 | for (y = 0; y < Constants.RegionSize; y++) | 89 | for (y = 0; y < Constants.RegionSize; y++) |
90 | { | 90 | { |
91 | map[x, y] = 60.0 - // 60 = Sphere Radius | 91 | map[x, y] = 60.0 - // 60 = Sphere Radius |
92 | ((x - (Constants.RegionSize / 2)) * (x - (Constants.RegionSize / 2)) + | 92 | ((x - (Constants.RegionSize / 2)) * (x - (Constants.RegionSize / 2)) + |
93 | (y - (Constants.RegionSize / 2)) * (y - (Constants.RegionSize / 2))); | 93 | (y - (Constants.RegionSize / 2)) * (y - (Constants.RegionSize / 2))); |
94 | } | 94 | } |
95 | } | 95 | } |
96 | } | 96 | } |
97 | 97 | ||
98 | public TerrainChannel(double[,] import) | 98 | public TerrainChannel(double[,] import) |
99 | { | 99 | { |
100 | map = import; | 100 | map = import; |
101 | taint = new bool[import.GetLength(0), import.GetLength(1)]; | 101 | taint = new bool[import.GetLength(0), import.GetLength(1)]; |
102 | } | 102 | } |
103 | 103 | ||
104 | public TerrainChannel(bool createMap) | 104 | public TerrainChannel(bool createMap) |
105 | { | 105 | { |
106 | if (createMap) | 106 | if (createMap) |
107 | { | 107 | { |
108 | map = new double[Constants.RegionSize, Constants.RegionSize]; | 108 | map = new double[Constants.RegionSize, Constants.RegionSize]; |
109 | taint = new bool[Constants.RegionSize / 16, Constants.RegionSize / 16]; | 109 | taint = new bool[Constants.RegionSize / 16, Constants.RegionSize / 16]; |
110 | } | 110 | } |
111 | } | 111 | } |
112 | 112 | ||
113 | public TerrainChannel(int w, int h) | 113 | public TerrainChannel(int w, int h) |
114 | { | 114 | { |
115 | map = new double[w, h]; | 115 | map = new double[w, h]; |
116 | taint = new bool[w / 16, h / 16]; | 116 | taint = new bool[w / 16, h / 16]; |
117 | } | 117 | } |
118 | } | 118 | } |
119 | } | 119 | } |