diff --git a/src/itdelatrisu/opsu/objects/Circle.java b/src/itdelatrisu/opsu/objects/Circle.java index f67be5ec..fca7073e 100644 --- a/src/itdelatrisu/opsu/objects/Circle.java +++ b/src/itdelatrisu/opsu/objects/Circle.java @@ -60,11 +60,10 @@ public class Circle implements GameObject { /** * Initializes the Circle data type with map modifiers, images, and dimensions. * @param container the game container - * @param circleSize the map's circleSize value + * @param circleDiameter the circle diameter */ - public static void init(GameContainer container, float circleSize) { - diameter = (104 - (circleSize * 8)); - diameter = (diameter * HitObject.getXMultiplier()); // convert from Osupixels (640x480) + public static void init(GameContainer container, float circleDiameter) { + diameter = circleDiameter * HitObject.getXMultiplier(); // convert from Osupixels (640x480) int diameterInt = (int) diameter; GameImage.HITCIRCLE.setImage(GameImage.HITCIRCLE.getImage().getScaledCopy(diameterInt, diameterInt)); GameImage.HITCIRCLE_OVERLAY.setImage(GameImage.HITCIRCLE_OVERLAY.getImage().getScaledCopy(diameterInt, diameterInt)); diff --git a/src/itdelatrisu/opsu/objects/Slider.java b/src/itdelatrisu/opsu/objects/Slider.java index 82f48355..12bfa93a 100644 --- a/src/itdelatrisu/opsu/objects/Slider.java +++ b/src/itdelatrisu/opsu/objects/Slider.java @@ -111,15 +111,14 @@ public class Slider implements GameObject { /** * Initializes the Slider data type with images and dimensions. * @param container the game container - * @param circleSize the map's circleSize value + * @param circleDiameter the circle diameter * @param beatmap the associated beatmap */ - public static void init(GameContainer container, float circleSize, Beatmap beatmap) { + public static void init(GameContainer container, float circleDiameter, Beatmap beatmap) { containerWidth = container.getWidth(); containerHeight = container.getHeight(); - diameter = (104 - (circleSize * 8)); - diameter = (diameter * HitObject.getXMultiplier()); // convert from Osupixels (640x480) + diameter = circleDiameter * HitObject.getXMultiplier(); // convert from Osupixels (640x480) int diameterInt = (int) diameter; followRadius = diameter / 2 * 3f; diff --git a/src/itdelatrisu/opsu/objects/curves/Curve.java b/src/itdelatrisu/opsu/objects/curves/Curve.java index ec8a199d..9caabe41 100644 --- a/src/itdelatrisu/opsu/objects/curves/Curve.java +++ b/src/itdelatrisu/opsu/objects/curves/Curve.java @@ -80,16 +80,16 @@ public abstract class Curve { * Should be called before any curves are drawn. * @param width the container width * @param height the container height - * @param circleSize the circle size + * @param circleDiameter the circle diameter * @param borderColor the curve border color */ - public static void init(int width, int height, float circleSize, Color borderColor) { + public static void init(int width, int height, float circleDiameter, Color borderColor) { Curve.borderColor = borderColor; ContextCapabilities capabilities = GLContext.getCapabilities(); mmsliderSupported = capabilities.GL_EXT_framebuffer_object; if (mmsliderSupported) - CurveRenderState.init(width, height, circleSize); + CurveRenderState.init(width, height, circleDiameter); else { if (Options.getSkin().getSliderStyle() != Skin.STYLE_PEPPYSLIDER) Log.warn("New slider style requires FBO support."); diff --git a/src/itdelatrisu/opsu/render/CurveRenderState.java b/src/itdelatrisu/opsu/render/CurveRenderState.java index dffd91f7..2d1ac1ad 100644 --- a/src/itdelatrisu/opsu/render/CurveRenderState.java +++ b/src/itdelatrisu/opsu/render/CurveRenderState.java @@ -64,15 +64,14 @@ public class CurveRenderState { * Should be called before any curves are drawn. * @param width the container width * @param height the container height - * @param circleSize the circle size + * @param circleDiameter the circle diameter */ - public static void init(int width, int height, float circleSize) { + public static void init(int width, int height, float circleDiameter) { containerWidth = width; containerHeight = height; // equivalent to what happens in Slider.init() - scale = (int) (104 - (circleSize * 8)); - scale = (int) (scale * HitObject.getXMultiplier()); // convert from Osupixels (640x480) + scale = (int) (circleDiameter * HitObject.getXMultiplier()); // convert from Osupixels (640x480) //scale = scale * 118 / 128; //for curves exactly as big as the sliderball FrameBufferCache.init(width, height); } diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index eb3b02d3..61a5e41e 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -1482,14 +1482,15 @@ public class Game extends BasicGameState { // Stack modifier scales with hit object size // StackOffset = HitObjectRadius / 10 - int diameter = (int) (104 - (circleSize * 8)); + //int diameter = (int) (104 - (circleSize * 8)); + float diameter = 108.848f - (circleSize * 8.9646f); HitObject.setStackOffset(diameter * STACK_OFFSET_MODIFIER); // initialize objects - Circle.init(container, circleSize); - Slider.init(container, circleSize, beatmap); + Circle.init(container, diameter); + Slider.init(container, diameter, beatmap); Spinner.init(container, overallDifficulty); - Curve.init(container.getWidth(), container.getHeight(), circleSize, (Options.isBeatmapSkinIgnored()) ? + Curve.init(container.getWidth(), container.getHeight(), diameter, (Options.isBeatmapSkinIgnored()) ? Options.getSkin().getSliderBorderColor() : beatmap.getSliderBorderColor()); // approachRate (hit object approach time) @@ -1500,9 +1501,9 @@ public class Game extends BasicGameState { // overallDifficulty (hit result time offsets) hitResultOffset = new int[GameData.HIT_MAX]; - hitResultOffset[GameData.HIT_300] = (int) (78 - (overallDifficulty * 6)); - hitResultOffset[GameData.HIT_100] = (int) (138 - (overallDifficulty * 8)); - hitResultOffset[GameData.HIT_50] = (int) (198 - (overallDifficulty * 10)); + hitResultOffset[GameData.HIT_300] = (int) (79.5f - (overallDifficulty * 6)); + hitResultOffset[GameData.HIT_100] = (int) (139.5f - (overallDifficulty * 8)); + hitResultOffset[GameData.HIT_50] = (int) (199.5f - (overallDifficulty * 10)); hitResultOffset[GameData.HIT_MISS] = (int) (500 - (overallDifficulty * 10)); //final float mult = 0.608f; //hitResultOffset[GameData.HIT_300] = (int) ((128 - (overallDifficulty * 9.6)) * mult);