public override void Perform(Vec3S32[] marks, Brush brush, DrawOpOutput output) { Vec3U16 p1 = Clamp(Min), p2 = Clamp(Max); wallOp.Min = Min; wallOp.Max = Max; baseOp.Min = Min; baseOp.Max = Max; wallOp.SetLevel(Level); baseOp.SetLevel(Level); wallOp.Player = Player; baseOp.Player = Player; while (true) { wallOp.Perform(marks, brush, output); if (p1.Y >= Level.Height || Math.Abs(p2.X - p1.X) <= 1 || Math.Abs(p2.Z - p1.Z) <= 1) { return; } p1.X++; p2.X--; p1.Z++; p2.Z--; wallOp.Min = p1; wallOp.Max = p2; baseOp.Min = p1; baseOp.Max = p2; baseOp.Perform(marks, airBrush, output); p1.Y = (ushort)(p1.Y + yDir); p2.Y = p1.Y; wallOp.Min = p1; wallOp.Max = p2; baseOp.Min = p1; baseOp.Max = p2; } }
public static Level Setup(DrawOp op, Player p, Vec3S32[] marks) { op.SetMarks(marks); Level lvl = p.level; op.SetLevel(lvl); op.Player = p; return(lvl); }
public override void Perform(Vec3S32[] marks, Brush brush, DrawOpOutput output) { Vec3S32 p1 = Min, p2 = Max; baseOp.SetLevel(Level); baseOp.Player = Player; while (p1.Y >= 0 && p1.Y < Level.Height && p1.X <= p2.X && p1.Z <= p2.Z) { baseOp.Min = p1; baseOp.Max = p2; baseOp.Perform(marks, brush, output); p1.X++; p2.X--; p1.Z++; p2.Z--; p1.Y += yDir; p2.Y = p1.Y; } }