Added support for floating-point difficulty values (v13).
Thanks to Marcin for the info and FieryLight for the report.
This commit is contained in:
@@ -72,8 +72,8 @@ public class Circle {
|
||||
* @param circleSize the map's circleSize value
|
||||
* @throws SlickException
|
||||
*/
|
||||
public static void init(GameContainer container, byte circleSize) throws SlickException {
|
||||
int diameter = 96 - (circleSize * 8);
|
||||
public static void init(GameContainer container, float circleSize) throws SlickException {
|
||||
int diameter = (int) (96 - (circleSize * 8));
|
||||
diameter = diameter * container.getWidth() / 640; // convert from Osupixels (640x480)
|
||||
hitCircle = new Image("hitcircle.png").getScaledCopy(diameter, diameter);
|
||||
hitCircleOverlay = new Image("hitcircleoverlay.png").getScaledCopy(diameter, diameter);
|
||||
|
||||
@@ -253,8 +253,8 @@ public class Slider {
|
||||
* @param osu the associated OsuFile object
|
||||
* @throws SlickException
|
||||
*/
|
||||
public static void init(GameContainer container, byte circleSize, OsuFile osu) throws SlickException {
|
||||
int diameter = 96 - (circleSize * 8);
|
||||
public static void init(GameContainer container, float circleSize, OsuFile osu) throws SlickException {
|
||||
int diameter = (int) (96 - (circleSize * 8));
|
||||
diameter = diameter * container.getWidth() / 640; // convert from Osupixels (640x480)
|
||||
|
||||
sliderBall = new Animation();
|
||||
|
||||
@@ -109,8 +109,8 @@ public class Spinner {
|
||||
this.score = score;
|
||||
|
||||
// calculate rotations needed
|
||||
int spinsPerMinute = 100 + (score.getDifficulty() * 15);
|
||||
rotationsNeeded = (float) spinsPerMinute * (hitObject.endTime - hitObject.time) / 60000f;
|
||||
float spinsPerMinute = 100 + (score.getDifficulty() * 15);
|
||||
rotationsNeeded = spinsPerMinute * (hitObject.endTime - hitObject.time) / 60000f;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user