diff --git a/Drawing/Brushes/ReplaceBrush.cs b/Drawing/Brushes/ReplaceBrushes.cs similarity index 100% rename from Drawing/Brushes/ReplaceBrush.cs rename to Drawing/Brushes/ReplaceBrushes.cs diff --git a/Drawing/Brushes/CheckeredBrush.cs b/Drawing/Brushes/SimpleBrushes.cs similarity index 55% rename from Drawing/Brushes/CheckeredBrush.cs rename to Drawing/Brushes/SimpleBrushes.cs index ea76af536..d6365bc0b 100644 --- a/Drawing/Brushes/CheckeredBrush.cs +++ b/Drawing/Brushes/SimpleBrushes.cs @@ -16,11 +16,44 @@ permissions and limitations under the Licenses. */ using System; -using System.Collections.Generic; using MCGalaxy.Commands.Building; using MCGalaxy.Drawing.Ops; -namespace MCGalaxy.Drawing.Brushes { +namespace MCGalaxy.Drawing.Brushes { + public sealed class SolidBrush : Brush { + readonly byte block, extBlock; + + public SolidBrush(byte type, byte extType) { + this.block = type; + this.extBlock = extType; + } + + public override string Name { get { return "Normal"; } } + + public override byte NextBlock(DrawOp op) { return block; } + + public override byte NextExtBlock(DrawOp op) { return extBlock; } + } + + public sealed class StripedBrush : Brush { + readonly byte block1, extBlock1, block2, extBlock2; + + public StripedBrush(byte block1, byte extBlock1, byte block2, byte extBlock2) { + this.block1 = block1; this.extBlock1 = extBlock1; + this.block2 = block2; this.extBlock2 = extBlock2; + } + + public override string Name { get { return "Striped"; } } + + public override byte NextBlock(DrawOp op) { + return ((op.Coords.X + op.Coords.Y + op.Coords.Z) & 3) <= 1 ? block1 : block2; + } + + public override byte NextExtBlock(DrawOp op) { + return ((op.Coords.X + op.Coords.Y + op.Coords.Z) & 3) <= 1 ? extBlock1 : extBlock2; + } + } + public sealed class CheckeredBrush : Brush { readonly byte block1, extBlock1, block2, extBlock2; diff --git a/Drawing/Brushes/SolidBrush.cs b/Drawing/Brushes/SolidBrush.cs deleted file mode 100644 index 32d354fd1..000000000 --- a/Drawing/Brushes/SolidBrush.cs +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright 2015 MCGalaxy - - Dual-licensed under the Educational Community License, Version 2.0 and - the GNU General Public License, Version 3 (the "Licenses"); you may - not use this file except in compliance with the Licenses. You may - obtain a copy of the Licenses at - - http://www.opensource.org/licenses/ecl2.php - http://www.gnu.org/licenses/gpl-3.0.html - - Unless required by applicable law or agreed to in writing, - software distributed under the Licenses are distributed on an "AS IS" - BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - or implied. See the Licenses for the specific language governing - permissions and limitations under the Licenses. - */ -using System; -using MCGalaxy.Commands.Building; -using MCGalaxy.Drawing.Ops; - -namespace MCGalaxy.Drawing.Brushes { - public sealed class SolidBrush : Brush { - readonly byte block, extBlock; - - public SolidBrush(byte type, byte extType) { - this.block = type; - this.extBlock = extType; - } - - public override string Name { get { return "Normal"; } } - - public override byte NextBlock(DrawOp op) { return block; } - - public override byte NextExtBlock(DrawOp op) { return extBlock; } - } -} diff --git a/Drawing/Brushes/StripedBrush.cs b/Drawing/Brushes/StripedBrush.cs deleted file mode 100644 index 752a59c71..000000000 --- a/Drawing/Brushes/StripedBrush.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright 2015 MCGalaxy - - Dual-licensed under the Educational Community License, Version 2.0 and - the GNU General Public License, Version 3 (the "Licenses"); you may - not use this file except in compliance with the Licenses. You may - obtain a copy of the Licenses at - - http://www.opensource.org/licenses/ecl2.php - http://www.gnu.org/licenses/gpl-3.0.html - - Unless required by applicable law or agreed to in writing, - software distributed under the Licenses are distributed on an "AS IS" - BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - or implied. See the Licenses for the specific language governing - permissions and limitations under the Licenses. - */ -using System; -using System.Collections.Generic; -using MCGalaxy.Commands.Building; -using MCGalaxy.Drawing.Ops; - -namespace MCGalaxy.Drawing.Brushes { - public sealed class StripedBrush : Brush { - readonly byte block1, extBlock1, block2, extBlock2; - - public StripedBrush(byte block1, byte extBlock1, byte block2, byte extBlock2) { - this.block1 = block1; this.extBlock1 = extBlock1; - this.block2 = block2; this.extBlock2 = extBlock2; - } - - public override string Name { get { return "Striped"; } } - - public override byte NextBlock(DrawOp op) { - return ((op.Coords.X + op.Coords.Y + op.Coords.Z) & 3) <= 1 ? block1 : block2; - } - - public override byte NextExtBlock(DrawOp op) { - return ((op.Coords.X + op.Coords.Y + op.Coords.Z) & 3) <= 1 ? extBlock1 : extBlock2; - } - } -} diff --git a/MCGalaxy_.csproj b/MCGalaxy_.csproj index ed8e4796f..0b2c9930f 100644 --- a/MCGalaxy_.csproj +++ b/MCGalaxy_.csproj @@ -414,14 +414,12 @@ - - - - + +