Continuation of 53c79c5 - HitObject name changes.

Attempts to eliminate any confusion between OsuHitObject (raw, parsed hit objects) and HitObject (interface for game object types).
- Renamed "HitObject" interface to "GameObject", since these objects are specific to gameplay.
- Renamed "OsuHitObject" to "HitObject", since these objects are primarily containers for parsed data.

Sorry if the name-swapping is confusing; these should be better names in the long run.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-05-16 21:42:03 -04:00
parent 53c79c5d85
commit 250f7acc93
18 changed files with 130 additions and 130 deletions

View File

@@ -19,7 +19,7 @@
package itdelatrisu.opsu.objects.curves;
import itdelatrisu.opsu.ErrorHandler;
import itdelatrisu.opsu.beatmap.OsuHitObject;
import itdelatrisu.opsu.beatmap.HitObject;
import java.util.LinkedList;
@@ -34,10 +34,10 @@ import org.newdawn.slick.SlickException;
public class CatmullCurve extends EqualDistanceMultiCurve {
/**
* Constructor.
* @param hitObject the associated OsuHitObject
* @param hitObject the associated HitObject
* @param color the color of this curve
*/
public CatmullCurve(OsuHitObject hitObject, Color color) {
public CatmullCurve(HitObject hitObject, Color color) {
super(hitObject, color);
LinkedList<CurveType> catmulls = new LinkedList<CurveType>();
int ncontrolPoints = hitObject.getSliderX().length + 1;

View File

@@ -19,7 +19,7 @@
package itdelatrisu.opsu.objects.curves;
import itdelatrisu.opsu.ErrorHandler;
import itdelatrisu.opsu.beatmap.OsuHitObject;
import itdelatrisu.opsu.beatmap.HitObject;
import org.newdawn.slick.Color;
@@ -52,10 +52,10 @@ public class CircumscribedCircle extends Curve {
/**
* Constructor.
* @param hitObject the associated OsuHitObject
* @param hitObject the associated HitObject
* @param color the color of this curve
*/
public CircumscribedCircle(OsuHitObject hitObject, Color color) {
public CircumscribedCircle(HitObject hitObject, Color color) {
super(hitObject, color);
// construct the three points
@@ -103,7 +103,7 @@ public class CircumscribedCircle extends Curve {
// find an angle with an arc length of pixelLength along this circle
this.radius = startAngPoint.len();
float pixelLength = hitObject.getPixelLength() * OsuHitObject.getXMultiplier();
float pixelLength = hitObject.getPixelLength() * HitObject.getXMultiplier();
float arcAng = pixelLength / radius; // len = theta * r / theta = len / r
// now use it for our new end angle

View File

@@ -20,7 +20,7 @@ package itdelatrisu.opsu.objects.curves;
import itdelatrisu.opsu.GameImage;
import itdelatrisu.opsu.Utils;
import itdelatrisu.opsu.beatmap.OsuHitObject;
import itdelatrisu.opsu.beatmap.HitObject;
import org.newdawn.slick.Color;
import org.newdawn.slick.Image;
@@ -34,8 +34,8 @@ public abstract class Curve {
/** Points generated along the curve should be spaced this far apart. */
protected static float CURVE_POINTS_SEPERATION = 5;
/** The associated OsuHitObject. */
protected OsuHitObject hitObject;
/** The associated HitObject. */
protected HitObject hitObject;
/** The scaled starting x, y coordinates. */
protected float x, y;
@@ -48,10 +48,10 @@ public abstract class Curve {
/**
* Constructor.
* @param hitObject the associated OsuHitObject
* @param hitObject the associated HitObject
* @param color the color of this curve
*/
protected Curve(OsuHitObject hitObject, Color color) {
protected Curve(HitObject hitObject, Color color) {
this.hitObject = hitObject;
this.x = hitObject.getScaledX();
this.y = hitObject.getScaledY();

View File

@@ -18,7 +18,7 @@
package itdelatrisu.opsu.objects.curves;
import itdelatrisu.opsu.beatmap.OsuHitObject;
import itdelatrisu.opsu.beatmap.HitObject;
import java.util.Iterator;
import java.util.LinkedList;
@@ -40,10 +40,10 @@ public abstract class EqualDistanceMultiCurve extends Curve {
/**
* Constructor.
* @param hitObject the associated OsuHitObject
* @param hitObject the associated HitObject
* @param color the color of this curve
*/
public EqualDistanceMultiCurve(OsuHitObject hitObject, Color color) {
public EqualDistanceMultiCurve(HitObject hitObject, Color color) {
super(hitObject, color);
}
@@ -65,7 +65,7 @@ public abstract class EqualDistanceMultiCurve extends Curve {
float lastDistanceAt = 0;
// length of Curve should equal pixel length (in 640x480)
float pixelLength = hitObject.getPixelLength() * OsuHitObject.getXMultiplier();
float pixelLength = hitObject.getPixelLength() * HitObject.getXMultiplier();
// for each distance, try to get in between the two points that are between it
for (int i = 0; i < ncurve + 1; i++) {

View File

@@ -18,7 +18,7 @@
package itdelatrisu.opsu.objects.curves;
import itdelatrisu.opsu.beatmap.OsuHitObject;
import itdelatrisu.opsu.beatmap.HitObject;
import java.util.LinkedList;
@@ -33,11 +33,11 @@ import org.newdawn.slick.Color;
public class LinearBezier extends EqualDistanceMultiCurve {
/**
* Constructor.
* @param hitObject the associated OsuHitObject
* @param hitObject the associated HitObject
* @param color the color of this curve
* @param line whether a new curve should be generated for each sequential pair
*/
public LinearBezier(OsuHitObject hitObject, Color color, boolean line) {
public LinearBezier(HitObject hitObject, Color color, boolean line) {
super(hitObject, color);
LinkedList<CurveType> beziers = new LinkedList<CurveType>();