From 2aaf5e73bed1d5570cd14efda6513e9cfafface6 Mon Sep 17 00:00:00 2001 From: Pavel Kolchev Date: Sat, 28 Mar 2015 21:48:29 +0300 Subject: [PATCH] Remove unnecessary methods. --- src/itdelatrisu/opsu/objects/Circle.java | 3 --- src/itdelatrisu/opsu/objects/DummyObject.java | 3 --- src/itdelatrisu/opsu/objects/HitObject.java | 6 ------ src/itdelatrisu/opsu/objects/Slider.java | 3 --- src/itdelatrisu/opsu/objects/Spinner.java | 3 --- src/itdelatrisu/opsu/states/Game.java | 6 +++--- 6 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/itdelatrisu/opsu/objects/Circle.java b/src/itdelatrisu/opsu/objects/Circle.java index b4e2e4b8..f783253e 100644 --- a/src/itdelatrisu/opsu/objects/Circle.java +++ b/src/itdelatrisu/opsu/objects/Circle.java @@ -184,9 +184,6 @@ public class Circle implements HitObject { @Override public int getEndTime() { return hitObject.getTime(); } - @Override - public OsuHitObject getHitObject() { return hitObject; } - @Override public void updatePosition() { this.x = hitObject.getScaledX(); diff --git a/src/itdelatrisu/opsu/objects/DummyObject.java b/src/itdelatrisu/opsu/objects/DummyObject.java index a8ae3458..4934e199 100644 --- a/src/itdelatrisu/opsu/objects/DummyObject.java +++ b/src/itdelatrisu/opsu/objects/DummyObject.java @@ -53,9 +53,6 @@ public class DummyObject implements HitObject { @Override public boolean mousePressed(int x, int y, int trackPosition) { return false; } - @Override - public OsuHitObject getHitObject() { return hitObject; } - @Override public void updatePosition() { this.x = hitObject.getScaledX(); diff --git a/src/itdelatrisu/opsu/objects/HitObject.java b/src/itdelatrisu/opsu/objects/HitObject.java index 13631a21..ee5db7c6 100644 --- a/src/itdelatrisu/opsu/objects/HitObject.java +++ b/src/itdelatrisu/opsu/objects/HitObject.java @@ -66,12 +66,6 @@ public interface HitObject { */ public int getEndTime(); - /** - * Return associated OsuHitObject. - * @return hit object as OsuHitObject - */ - public OsuHitObject getHitObject(); - /** * Updates position of hit object. */ diff --git a/src/itdelatrisu/opsu/objects/Slider.java b/src/itdelatrisu/opsu/objects/Slider.java index ac4f4a6e..edc83749 100644 --- a/src/itdelatrisu/opsu/objects/Slider.java +++ b/src/itdelatrisu/opsu/objects/Slider.java @@ -451,9 +451,6 @@ public class Slider implements HitObject { return false; } - @Override - public OsuHitObject getHitObject() { return hitObject; } - @Override public void updatePosition() { this.x = hitObject.getScaledX(); diff --git a/src/itdelatrisu/opsu/objects/Spinner.java b/src/itdelatrisu/opsu/objects/Spinner.java index e3e25241..1f5033d5 100644 --- a/src/itdelatrisu/opsu/objects/Spinner.java +++ b/src/itdelatrisu/opsu/objects/Spinner.java @@ -263,9 +263,6 @@ public class Spinner implements HitObject { return false; } - @Override - public OsuHitObject getHitObject() { return hitObject; } - @Override public void updatePosition() {} diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index 17c5e6c4..9bcdf263 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -1066,7 +1066,7 @@ public class Game extends BasicGameState { // stack calculation for (int i = hitObjects.length - 1; i > 0; i--) { - OsuHitObject hitObjectI = hitObjects[i].getHitObject(); + OsuHitObject hitObjectI = osu.objects[i]; // already calculated if (hitObjectI.getStack() != 0 || hitObjectI.isSpinner()) @@ -1074,7 +1074,7 @@ public class Game extends BasicGameState { // search for hit objects in stack for (int n = i -1; n >= 0; n--) { - OsuHitObject hitObjectN = hitObjects[n].getHitObject(); + OsuHitObject hitObjectN = osu.objects[n]; if (hitObjectN.isSpinner()) continue; @@ -1098,7 +1098,7 @@ public class Game extends BasicGameState { if (distance < STACK_LENIENCE * OsuHitObject.getXMultiplier()) { int offset = hitObjectI.getStack() - hitObjectN.getStack() + 1; for (int j = n + 1; j <= i; j++) { - OsuHitObject hitObjectJ = hitObjects[j].getHitObject(); + OsuHitObject hitObjectJ = osu.objects[j]; x1 = hitObjects[j].getPointAt(hitObjectJ.getTime())[0]; y1 = hitObjects[j].getPointAt(hitObjectJ.getTime())[1]; distance = Utils.distance(x1, y1, x2, y2);