Merge branch 'rgbcircles'
This commit is contained in:
commit
c200778588
|
@ -666,6 +666,20 @@ public class Options {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
DANCE_RGB_OBJECTS ("Use rgb objects", "RGBObj", "Give each object a new color", false) {
|
||||||
|
@Override
|
||||||
|
public void click(GameContainer container) {
|
||||||
|
bool = !bool;
|
||||||
|
Dancer.rgbobj = bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void read(String s) {
|
||||||
|
super.read(s);
|
||||||
|
Dancer.rgbobj = bool;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
PIPPI_ENABLE ("Pippi", "Pippi", "Move in circles like dancing pippi (osu! april fools joke 2016)", false) {
|
PIPPI_ENABLE ("Pippi", "Pippi", "Move in circles like dancing pippi (osu! april fools joke 2016)", false) {
|
||||||
// TODO
|
// TODO
|
||||||
},
|
},
|
||||||
|
|
|
@ -23,6 +23,7 @@ import itdelatrisu.opsu.audio.SoundEffect;
|
||||||
import itdelatrisu.opsu.beatmap.HitObject;
|
import itdelatrisu.opsu.beatmap.HitObject;
|
||||||
import itdelatrisu.opsu.downloads.Download;
|
import itdelatrisu.opsu.downloads.Download;
|
||||||
import itdelatrisu.opsu.downloads.DownloadNode;
|
import itdelatrisu.opsu.downloads.DownloadNode;
|
||||||
|
import itdelatrisu.opsu.objects.Circle;
|
||||||
import itdelatrisu.opsu.replay.PlaybackSpeed;
|
import itdelatrisu.opsu.replay.PlaybackSpeed;
|
||||||
import itdelatrisu.opsu.ui.Fonts;
|
import itdelatrisu.opsu.ui.Fonts;
|
||||||
import itdelatrisu.opsu.ui.UI;
|
import itdelatrisu.opsu.ui.UI;
|
||||||
|
@ -587,4 +588,13 @@ public class Utils {
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Color nextColor() {
|
||||||
|
Circle.hue += 10;
|
||||||
|
return new Color(java.awt.Color.getHSBColor(Circle.hue / 360f, 1.0f, 1.0f).getRGB());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Color currentShiftColor() {
|
||||||
|
return new Color(java.awt.Color.getHSBColor((Circle.hue + 180f) / 360f, 1.0f, 1.0f).getRGB());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,6 +59,8 @@ public class Circle extends GameObject {
|
||||||
/** Whether or not the circle result ends the combo streak. */
|
/** Whether or not the circle result ends the combo streak. */
|
||||||
private boolean comboEnd;
|
private boolean comboEnd;
|
||||||
|
|
||||||
|
public static int hue;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the Circle data type with map modifiers, images, and dimensions.
|
* Initializes the Circle data type with map modifiers, images, and dimensions.
|
||||||
* @param container the game container
|
* @param container the game container
|
||||||
|
@ -87,13 +89,17 @@ public class Circle extends GameObject {
|
||||||
this.color = color;
|
this.color = color;
|
||||||
this.comboEnd = comboEnd;
|
this.comboEnd = comboEnd;
|
||||||
updatePosition();
|
updatePosition();
|
||||||
|
if (Dancer.rgbobj) {
|
||||||
|
this.color = Utils.nextColor();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(Graphics g, int trackPosition, boolean mirror) {
|
public void draw(Graphics g, int trackPosition, boolean mirror) {
|
||||||
Color orig = color;
|
Color orig = color;
|
||||||
if (mirror) {
|
if (mirror) {
|
||||||
color = Utils.shiftHue(color, 180d);
|
//color = Utils.currentShiftColor();
|
||||||
|
color = Utils.shiftHue(color, 180f);
|
||||||
}
|
}
|
||||||
|
|
||||||
int timeDiff = hitObject.getTime() - trackPosition;
|
int timeDiff = hitObject.getTime() - trackPosition;
|
||||||
|
|
|
@ -159,6 +159,9 @@ public class Slider extends GameObject {
|
||||||
this.data = data;
|
this.data = data;
|
||||||
this.color = color;
|
this.color = color;
|
||||||
this.comboEnd = comboEnd;
|
this.comboEnd = comboEnd;
|
||||||
|
if (Dancer.rgbobj) {
|
||||||
|
this.color = Utils.nextColor();
|
||||||
|
}
|
||||||
updatePosition();
|
updatePosition();
|
||||||
|
|
||||||
// slider time calculations
|
// slider time calculations
|
||||||
|
@ -183,7 +186,8 @@ public class Slider extends GameObject {
|
||||||
public void draw(Graphics g, int trackPosition, boolean mirror) {
|
public void draw(Graphics g, int trackPosition, boolean mirror) {
|
||||||
Color orig = color;
|
Color orig = color;
|
||||||
if (mirror) {
|
if (mirror) {
|
||||||
color = Utils.shiftHue(color, 180d);
|
//color = Utils.currentShiftColor();
|
||||||
|
color = Utils.shiftHue(color, 180f);
|
||||||
}
|
}
|
||||||
|
|
||||||
int timeDiff = hitObject.getTime() - trackPosition;
|
int timeDiff = hitObject.getTime() - trackPosition;
|
||||||
|
|
|
@ -112,6 +112,7 @@ public class OptionsMenu extends BasicGameState {
|
||||||
GameOption.DANCE_ONLY_CIRCLE_STACKS,
|
GameOption.DANCE_ONLY_CIRCLE_STACKS,
|
||||||
GameOption.DANCE_MIRROR,
|
GameOption.DANCE_MIRROR,
|
||||||
GameOption.DANCE_DRAW_APPROACH,
|
GameOption.DANCE_DRAW_APPROACH,
|
||||||
|
GameOption.DANCE_RGB_OBJECTS,
|
||||||
}),
|
}),
|
||||||
PIPPI ("Pippi", new GameOption[] {
|
PIPPI ("Pippi", new GameOption[] {
|
||||||
GameOption.PIPPI_ENABLE,
|
GameOption.PIPPI_ENABLE,
|
||||||
|
|
|
@ -52,6 +52,7 @@ public class Dancer {
|
||||||
|
|
||||||
public static boolean mirror; // this should really get its own place somewhere...
|
public static boolean mirror; // this should really get its own place somewhere...
|
||||||
public static boolean drawApproach; // this should really get its own place somewhere...
|
public static boolean drawApproach; // this should really get its own place somewhere...
|
||||||
|
public static boolean rgbobj; // this should really get its own place somewhere...
|
||||||
|
|
||||||
private int dir;
|
private int dir;
|
||||||
private GameObject p;
|
private GameObject p;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user