diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-07 22:37:50 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2016-02-07 22:37:50 +0100 |
commit | 6a7c983dafb3d204f32a04d134e2e14121c1c635 (patch) | |
tree | e37e333c1ce0457c528e6bd3a47cd53242834b9c /tools/debug_pools.patch | |
parent | 004392e5a72b39abdbd6d85d7a5602d5c236b6f5 (diff) | |
download | RustAndDust-6a7c983dafb3d204f32a04d134e2e14121c1c635.zip RustAndDust-6a7c983dafb3d204f32a04d134e2e14121c1c635.tar.gz |
remove tools/debug_pools.patch
Diffstat (limited to 'tools/debug_pools.patch')
-rw-r--r-- | tools/debug_pools.patch | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/tools/debug_pools.patch b/tools/debug_pools.patch deleted file mode 100644 index db732f4..0000000 --- a/tools/debug_pools.patch +++ /dev/null @@ -1,104 +0,0 @@ -diff --git a/core/src/ch/asynk/creepingarmor/engine/Move.java b/core/src/ch/asynk/creepingarmor/engine/Move.java -index 06035c3..1bb55b1 100644 ---- a/core/src/ch/asynk/creepingarmor/engine/Move.java -+++ b/core/src/ch/asynk/creepingarmor/engine/Move.java -@@ -15,12 +15,30 @@ public class Move extends Path implements Iterable<Vector3> - EXIT; - } - -+ static int count = 0; -+ - private static final Pool<Move> movePool = new Pool<Move>() - { - @Override - protected Move newObject() { - return new Move(); - } -+ -+ @Override -+ public Move obtain() -+ { -+ count += 1; -+ System.err.println(" MovePool " + count + "/" + getFree()); -+ return super.obtain(); -+ } -+ -+ @Override -+ public void free(Move cmd) -+ { -+ count -= 1; -+ super.free(cmd); -+ System.err.println(" MovePool " + count + "/" + getFree()); -+ } - }; - - public static Move get(Pawn pawn, Tile from, Tile to, Orientation orientation, Path path) -diff --git a/core/src/ch/asynk/creepingarmor/game/Command.java b/core/src/ch/asynk/creepingarmor/game/Command.java -index 0d39e6c..db3c910 100644 ---- a/core/src/ch/asynk/creepingarmor/game/Command.java -+++ b/core/src/ch/asynk/creepingarmor/game/Command.java -@@ -19,12 +19,30 @@ public class Command extends Order - END_OF_TURN; - } - -+ static int count = 0; -+ - private static final Pool<Command> commandPool = new Pool<Command>() - { - @Override - protected Command newObject() { - return new Command(); - } -+ -+ @Override -+ public Command obtain() -+ { -+ count += 1; -+ System.err.println(" CommandPool " + count + "/" + getFree()); -+ return super.obtain(); -+ } -+ -+ @Override -+ public void free(Command cmd) -+ { -+ count -= 1; -+ super.free(cmd); -+ System.err.println(" CommandPool " + count + "/" + getFree()); -+ } - }; - - public static void clearPool() -diff --git a/core/src/ch/asynk/creepingarmor/game/Engagement.java b/core/src/ch/asynk/creepingarmor/game/Engagement.java -index 8f01008..d06ac6d 100644 ---- a/core/src/ch/asynk/creepingarmor/game/Engagement.java -+++ b/core/src/ch/asynk/creepingarmor/game/Engagement.java -@@ -8,11 +8,29 @@ import com.badlogic.gdx.utils.Disposable; - - public class Engagement implements Disposable, Pool.Poolable - { -+ static int count = 0; -+ - private static final Pool<Engagement> engagementPool = new Pool<Engagement>() { - @Override - protected Engagement newObject() { - return new Engagement(); - } -+ -+ @Override -+ public Engagement obtain() -+ { -+ count += 1; -+ System.err.println(" EngagementPool " + count + "/" + getFree()); -+ return super.obtain(); -+ } -+ -+ @Override -+ public void free(Engagement cmd) -+ { -+ count -= 1; -+ super.free(cmd); -+ System.err.println(" EngagementPool " + count + "/" + getFree()); -+ } - }; - - public static Engagement get(Unit attacker, Unit defender) |