mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Code cleanup
This commit is contained in:
@@ -271,8 +271,7 @@ public class CommandCenterScreen extends FScreen implements IVCommandCenter {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
//transform image based on grid coordinates so tiles blend together better
|
g.drawImage(tileImage, x, y, w, h);
|
||||||
g.drawImageWithTransforms(tileImage.getTextureRegion(), x, y, w, h, tile.getImageRotation(), tile.flipImageX(), tile.flipImageY());
|
|
||||||
g.drawImage(FSkinImage.HEXAGON_TILE, x, y, w, h);
|
g.drawImage(FSkinImage.HEXAGON_TILE, x, y, w, h);
|
||||||
|
|
||||||
/*if (x < getWidth() / 2 && x + w > getWidth() / 2 && y < getHeight() / 2 && y + h > getHeight() / 2) {
|
/*if (x < getWidth() / 2 && x + w > getWidth() / 2 && y < getHeight() / 2 && y + h > getHeight() / 2) {
|
||||||
|
|||||||
@@ -109,9 +109,9 @@ public class ConquestPlaneMap {
|
|||||||
double regionAngle = 2 * Math.PI / regionCount;
|
double regionAngle = 2 * Math.PI / regionCount;
|
||||||
|
|
||||||
//these assume a tile width of 2, radius of 1
|
//these assume a tile width of 2, radius of 1
|
||||||
double centerY = 1.5 * center;
|
|
||||||
double centerX = sqrt3 * (center + 0.5f * (center & 1));
|
double centerX = sqrt3 * (center + 0.5f * (center & 1));
|
||||||
double maxDist = (centerY + centerX) / 2;
|
double centerY = 1.5 * center;
|
||||||
|
double maxDist = (centerX + centerY) / 2;
|
||||||
|
|
||||||
//create a circular map, divided into regions
|
//create a circular map, divided into regions
|
||||||
for (int r = 0; r < gridSize; r++) {
|
for (int r = 0; r < gridSize; r++) {
|
||||||
@@ -172,34 +172,6 @@ public class ConquestPlaneMap {
|
|||||||
return colorIndex;
|
return colorIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
public float getImageRotation() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean flipImageX() {
|
|
||||||
/*if (q % 2 == 1) {
|
|
||||||
if (q % 4 == 1) {
|
|
||||||
return r % 2 == 1;
|
|
||||||
}
|
|
||||||
return r % 2 == 0;
|
|
||||||
}*/
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean flipImageY() {
|
|
||||||
/*if (q % 2 == 0) {
|
|
||||||
if (q % 4 == 0) {
|
|
||||||
return r % 2 == 1;
|
|
||||||
}
|
|
||||||
return r % 2 == 0;
|
|
||||||
}
|
|
||||||
if (q % 4 == 1) {
|
|
||||||
return r % 2 == 1;
|
|
||||||
}
|
|
||||||
return r % 2 == 0;*/
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<HexagonTile> getNeighbors() {
|
public List<HexagonTile> getNeighbors() {
|
||||||
List<HexagonTile> neighbors = new ArrayList<HexagonTile>();
|
List<HexagonTile> neighbors = new ArrayList<HexagonTile>();
|
||||||
addToList(q, r - 1, neighbors); //tile above
|
addToList(q, r - 1, neighbors); //tile above
|
||||||
|
|||||||
Reference in New Issue
Block a user