summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--android/assets/data/hex-overlays.atlas19
-rw-r--r--android/assets/data/hex-overlays.pngbin126149 -> 128366 bytes
-rw-r--r--core/src/ch/asynk/tankontank/game/Hex.java7
-rw-r--r--core/src/ch/asynk/tankontank/game/Map.java12
-rw-r--r--core/src/ch/asynk/tankontank/game/ObjectiveSet.java2
-rw-r--r--data/assets/hex-overlays/06_objective.pngbin23747 -> 24482 bytes
-rw-r--r--data/assets/hex-overlays/07_hold_objective.pngbin0 -> 23747 bytes
-rw-r--r--data/assets/hex-overlays/07_objective_ge.pngbin21616 -> 0 bytes
-rw-r--r--data/assets/hex-overlays/08_objective_ge.pngbin0 -> 5861 bytes
-rw-r--r--data/assets/hex-overlays/08_objective_us.pngbin28344 -> 0 bytes
-rw-r--r--data/assets/hex-overlays/09_objective_us.pngbin0 -> 12159 bytes
11 files changed, 23 insertions, 17 deletions
diff --git a/android/assets/data/hex-overlays.atlas b/android/assets/data/hex-overlays.atlas
index f746f9f..72fae15 100644
--- a/android/assets/data/hex-overlays.atlas
+++ b/android/assets/data/hex-overlays.atlas
@@ -26,7 +26,7 @@ repeat: none
index: -1
03_move
rotate: false
- xy: 810, 330
+ xy: 618, 8
size: 100, 114
orig: 100, 114
offset: 0, 0
@@ -52,17 +52,24 @@ repeat: none
orig: 190, 217
offset: 0, 0
index: -1
-07_objective_ge
+07_hold_objective
rotate: false
xy: 618, 227
size: 190, 217
orig: 190, 217
offset: 0, 0
index: -1
-08_objective_us
+08_objective_ge
rotate: false
- xy: 618, 8
- size: 190, 217
- orig: 190, 217
+ xy: 618, 124
+ size: 153, 101
+ orig: 153, 101
+ offset: 0, 0
+ index: -1
+09_objective_us
+ rotate: false
+ xy: 810, 346
+ size: 153, 98
+ orig: 153, 98
offset: 0, 0
index: -1
diff --git a/android/assets/data/hex-overlays.png b/android/assets/data/hex-overlays.png
index e4e8150..4a3a8ce 100644
--- a/android/assets/data/hex-overlays.png
+++ b/android/assets/data/hex-overlays.png
Binary files differ
diff --git a/core/src/ch/asynk/tankontank/game/Hex.java b/core/src/ch/asynk/tankontank/game/Hex.java
index 0abd9d6..6e89df4 100644
--- a/core/src/ch/asynk/tankontank/game/Hex.java
+++ b/core/src/ch/asynk/tankontank/game/Hex.java
@@ -29,9 +29,10 @@ public class Hex extends Tile
public static final int MOVE = 3;
public static final int DIRECTIONS = 4;
public static final int ORIENTATION = 5;
- public static final int OBJECTIVE = 6; // unclaimed
- public static final int OBJECTIVE_GE= 7;
- public static final int OBJECTIVE_US= 8;
+ public static final int OBJECTIVE = 6;
+ public static final int OBJECTIVE_HOLD = 7;
+ public static final int OBJECTIVE_GE = 8;
+ public static final int OBJECTIVE_US = 9;
public Terrain terrain;
public int roads;
diff --git a/core/src/ch/asynk/tankontank/game/Map.java b/core/src/ch/asynk/tankontank/game/Map.java
index b059aab..71f29c7 100644
--- a/core/src/ch/asynk/tankontank/game/Map.java
+++ b/core/src/ch/asynk/tankontank/game/Map.java
@@ -489,11 +489,12 @@ public abstract class Map extends Board
public void showOrientation(Hex hex, Orientation o) { enableOverlayOn(hex, Hex.ORIENTATION, o, true); }
public void hideOrientation(Hex hex) { enableOverlayOn(hex, Hex.ORIENTATION, false); }
- public void hideObjective(Hex hex)
+ public void showObjective(Hex hex, Army army, boolean hold)
{
- enableOverlayOn(hex, Hex.OBJECTIVE, false);
- enableOverlayOn(hex, Hex.OBJECTIVE_US, false);
- enableOverlayOn(hex, Hex.OBJECTIVE_GE, false);
+ if (hold)
+ enableOverlayOn(hex, Hex.OBJECTIVE_HOLD, true);
+ else
+ enableOverlayOn(hex, Hex.OBJECTIVE, true);
}
public void showObjective(Hex hex, Army army)
@@ -502,18 +503,15 @@ public abstract class Map extends Board
case GE:
enableOverlayOn(hex, Hex.OBJECTIVE_GE, true);
enableOverlayOn(hex, Hex.OBJECTIVE_US, false);
- enableOverlayOn(hex, Hex.OBJECTIVE, false);
break;
case US:
enableOverlayOn(hex, Hex.OBJECTIVE_GE, false);
enableOverlayOn(hex, Hex.OBJECTIVE_US, true);
- enableOverlayOn(hex, Hex.OBJECTIVE, false);
break;
case NONE:
default:
enableOverlayOn(hex, Hex.OBJECTIVE_GE, false);
enableOverlayOn(hex, Hex.OBJECTIVE_US, false);
- enableOverlayOn(hex, Hex.OBJECTIVE, true);
break;
}
}
diff --git a/core/src/ch/asynk/tankontank/game/ObjectiveSet.java b/core/src/ch/asynk/tankontank/game/ObjectiveSet.java
index 2a4f3ee..ab827f6 100644
--- a/core/src/ch/asynk/tankontank/game/ObjectiveSet.java
+++ b/core/src/ch/asynk/tankontank/game/ObjectiveSet.java
@@ -21,7 +21,7 @@ public class ObjectiveSet extends HashMap<Hex, Objective> implements MoveToAnima
public void add(Hex hex, Army army, boolean persistent)
{
put(hex, new Objective(army, persistent));
- map.showObjective(hex, army);
+ map.showObjective(hex, army, !persistent);
}
public int count(Army army)
diff --git a/data/assets/hex-overlays/06_objective.png b/data/assets/hex-overlays/06_objective.png
index e076771..11e5178 100644
--- a/data/assets/hex-overlays/06_objective.png
+++ b/data/assets/hex-overlays/06_objective.png
Binary files differ
diff --git a/data/assets/hex-overlays/07_hold_objective.png b/data/assets/hex-overlays/07_hold_objective.png
new file mode 100644
index 0000000..e076771
--- /dev/null
+++ b/data/assets/hex-overlays/07_hold_objective.png
Binary files differ
diff --git a/data/assets/hex-overlays/07_objective_ge.png b/data/assets/hex-overlays/07_objective_ge.png
deleted file mode 100644
index a88a08e..0000000
--- a/data/assets/hex-overlays/07_objective_ge.png
+++ /dev/null
Binary files differ
diff --git a/data/assets/hex-overlays/08_objective_ge.png b/data/assets/hex-overlays/08_objective_ge.png
new file mode 100644
index 0000000..076be81
--- /dev/null
+++ b/data/assets/hex-overlays/08_objective_ge.png
Binary files differ
diff --git a/data/assets/hex-overlays/08_objective_us.png b/data/assets/hex-overlays/08_objective_us.png
deleted file mode 100644
index 156964d..0000000
--- a/data/assets/hex-overlays/08_objective_us.png
+++ /dev/null
Binary files differ
diff --git a/data/assets/hex-overlays/09_objective_us.png b/data/assets/hex-overlays/09_objective_us.png
new file mode 100644
index 0000000..1f4b754
--- /dev/null
+++ b/data/assets/hex-overlays/09_objective_us.png
Binary files differ