Description:
Extend outlining.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -10,3 +10,4 | |||||
|
10 | /Users/alys/repos/isometric-park-fna/FNA/bin/Release/FNA.dll |
|
10 | /Users/alys/repos/isometric-park-fna/FNA/bin/Release/FNA.dll |
|
11 | /Users/alys/repos/isometric-park-fna/FNA/obj/Release/FNA.csproj.CoreCompileInputs.cache |
|
11 | /Users/alys/repos/isometric-park-fna/FNA/obj/Release/FNA.csproj.CoreCompileInputs.cache |
|
12 | /Users/alys/repos/isometric-park-fna/FNA/obj/Release/FNA.dll |
|
12 | /Users/alys/repos/isometric-park-fna/FNA/obj/Release/FNA.dll |
|
|
13 | /Users/alys/repos/isometric-park-fna/FNA/obj/Release/FNA.csprojAssemblyReference.cache |
|
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
|
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
|
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -674,12 +674,19 | |||||
|
674 | if (MathUtils.Between(this.mouseGrid.X, -1, this.simulation.map.MapWidth) |
|
674 | if (MathUtils.Between(this.mouseGrid.X, -1, this.simulation.map.MapWidth) |
|
675 | && MathUtils.Between(this.mouseGrid.Y, -1, this.simulation.map.MapHeight)) |
|
675 | && MathUtils.Between(this.mouseGrid.Y, -1, this.simulation.map.MapHeight)) |
|
676 | { |
|
676 | { |
|
677 | OutlineSquare(this.mouseGrid.X, this.mouseGrid.Y, Color.Yellow); |
|
677 | OutlineSquare(this.mouseGrid.X, this.mouseGrid.Y, Color.Yellow, 1); |
|
678 | } |
|
678 | } |
|
679 |
|
679 | ||
|
|
680 | OutlineSquare(1, 1, Color.Red, 2); | ||
|
|
681 | OutlineSquare(3, 1, Color.Blue, 2); | ||
|
|
682 | OutlineSquare(5, 1, Color.Green, 2); | ||
|
|
683 | OutlineSquare(7, 1, Color.Orange, 2); | ||
|
680 |
|
684 | ||
|
681 | #endregion draw_cursor |
|
685 | |
|
682 | /* |
|
686 | |
|
|
687 | |||
|
|
688 | #endregion draw_cursor | ||
|
|
689 | /* | ||
|
683 |
|
690 | ||
|
684 | for (int i = 0; i< 80; i++) |
|
691 | for (int i = 0; i< 80; i++) |
|
685 | { |
|
692 | { |
@@ -700,8 +707,8 | |||||
|
700 | } |
|
707 | } |
|
701 | }//*/ |
|
708 | }//*/ |
|
702 |
|
709 | ||
|
703 |
|
|
710 | #region draw_trees |
|
704 |
|
|
711 | for (int i = 0; i < this.simulation.map.MapHeight; i++) |
|
705 | { |
|
712 | { |
|
706 | for (int j = 0; j < this.simulation.map.MapWidth; j += 1) |
|
713 | for (int j = 0; j < this.simulation.map.MapWidth; j += 1) |
|
707 | { |
|
714 | { |
@@ -815,8 +822,12 | |||||
|
815 |
|
822 | ||
|
816 | base.Draw(gameTime); |
|
823 | base.Draw(gameTime); |
|
817 | } |
|
824 | } |
|
|
825 | private void OutlineSquare(float x, float y, Color color) | ||
|
|
826 | { | ||
|
|
827 | this.OutlineSquare(x, y, color, 1); | ||
|
|
828 | } | ||
|
818 |
|
829 | ||
|
819 |
|
|
830 | private void OutlineSquare(float x, float y, Color color, int size) |
|
820 | { |
|
831 | { |
|
821 | Vector2 adjust2 = new Vector2(Tile.TileSpriteWidth / 2, Tile.TileSpriteHeight); //TODO figure out why this second value shouldn't be halved |
|
832 | Vector2 adjust2 = new Vector2(Tile.TileSpriteWidth / 2, Tile.TileSpriteHeight); //TODO figure out why this second value shouldn't be halved |
|
822 |
|
833 | ||
@@ -826,26 +837,26 | |||||
|
826 | Line.drawLine(batch, |
|
837 | Line.drawLine(batch, |
|
827 | new Vector2(((x - y) * Tile.TileSpriteWidth / 2), (x + y) * Tile.TileSpriteHeight / 2) + adjust2, |
|
838 | new Vector2(((x - y) * Tile.TileSpriteWidth / 2), (x + y) * Tile.TileSpriteHeight / 2) + adjust2, |
|
828 | //new Vector2(this.squaresAcross * Tile.TileSpriteWidth, (y+1) * Tile.TileSpriteHeight), |
|
839 | //new Vector2(this.squaresAcross * Tile.TileSpriteWidth, (y+1) * Tile.TileSpriteHeight), |
|
829 |
new Vector2(((x - y + |
|
840 | new Vector2(((x - y + size) * Tile.TileSpriteWidth / 2), (x + y + size) * Tile.TileSpriteHeight / 2) + adjust2, |
|
830 | color, 0.79f); |
|
841 | color, 0.79f); |
|
831 |
|
842 | ||
|
832 | //Bottom right |
|
843 | //Bottom right |
|
833 | Line.drawLine(batch, |
|
844 | Line.drawLine(batch, |
|
834 |
new Vector2(((x + |
|
845 | new Vector2(((x + size - y) * Tile.TileSpriteWidth / 2), (x + size + y) * Tile.TileSpriteHeight / 2) + adjust2, |
|
835 | //new Vector2(this.squaresAcross * Tile.TileSpriteWidth, (y+1) * Tile.TileSpriteHeight), |
|
846 | //new Vector2(this.squaresAcross * Tile.TileSpriteWidth, (y+1) * Tile.TileSpriteHeight), |
|
836 |
new Vector2(((x + |
|
847 | new Vector2(((x + size - (y + size)) * Tile.TileSpriteWidth / 2), (x + size + (y + size)) * Tile.TileSpriteHeight / 2) + adjust2, |
|
837 | color, 0.79f); |
|
848 | color, 0.79f); |
|
838 | //Bottom left |
|
849 | //Bottom left |
|
839 | Line.drawLine(batch, |
|
850 | Line.drawLine(batch, |
|
840 |
new Vector2(((x - (y + |
|
851 | new Vector2(((x - (y + size)) * Tile.TileSpriteWidth / 2), (x + y + size) * Tile.TileSpriteHeight / 2) + adjust2, |
|
841 | //new Vector2(this.squaresAcross * Tile.TileSpriteWidth, (y+1) * Tile.TileSpriteHeight), |
|
852 | //new Vector2(this.squaresAcross * Tile.TileSpriteWidth, (y+1) * Tile.TileSpriteHeight), |
|
842 |
new Vector2(((x + |
|
853 | new Vector2(((x + size - (y + size)) * Tile.TileSpriteWidth / 2), (x + size + (y + size)) * Tile.TileSpriteHeight / 2) + adjust2, |
|
843 | color, 0.79f); |
|
854 | color, 0.79f); |
|
844 | //Upper left |
|
855 | //Upper left |
|
845 | Line.drawLine(batch, |
|
856 | Line.drawLine(batch, |
|
846 | new Vector2(((x - y) * Tile.TileSpriteWidth / 2), (x + y) * Tile.TileSpriteHeight / 2) + adjust2, |
|
857 | new Vector2(((x - y) * Tile.TileSpriteWidth / 2), (x + y) * Tile.TileSpriteHeight / 2) + adjust2, |
|
847 | //new Vector2(this.squaresAcross * Tile.TileSpriteWidth, (y+1) * Tile.TileSpriteHeight), |
|
858 | //new Vector2(this.squaresAcross * Tile.TileSpriteWidth, (y+1) * Tile.TileSpriteHeight), |
|
848 |
new Vector2(((x - (y + |
|
859 | new Vector2(((x - (y + size)) * Tile.TileSpriteWidth / 2), (x + (y + size)) * Tile.TileSpriteHeight / 2) + adjust2, |
|
849 | color, 0.79f); |
|
860 | color, 0.79f); |
|
850 | } |
|
861 | } |
|
851 | } |
|
862 | } |
You need to be logged in to leave comments.
Login now