diff --git a/src/awlex/ospu/FakeGameObject.java b/src/awlex/ospu/FakeGameObject.java index b746b023..7777baf9 100644 --- a/src/awlex/ospu/FakeGameObject.java +++ b/src/awlex/ospu/FakeGameObject.java @@ -102,8 +102,4 @@ public class FakeGameObject extends GameObject { this.halfTime = time; } - @Override - public void updateColor() { - } - } \ No newline at end of file diff --git a/src/itdelatrisu/opsu/objects/Circle.java b/src/itdelatrisu/opsu/objects/Circle.java index 44718a38..acc138df 100644 --- a/src/itdelatrisu/opsu/objects/Circle.java +++ b/src/itdelatrisu/opsu/objects/Circle.java @@ -269,6 +269,7 @@ public class Circle extends GameObject { @Override public void updateColor() { + super.updateColor(); color = Dancer.colorOverride.getColor(comboColorIndex); mirrorColor = Dancer.colorMirrorOverride.getColor(comboColorIndex); } diff --git a/src/itdelatrisu/opsu/objects/DummyObject.java b/src/itdelatrisu/opsu/objects/DummyObject.java index f545d501..ce5adebd 100644 --- a/src/itdelatrisu/opsu/objects/DummyObject.java +++ b/src/itdelatrisu/opsu/objects/DummyObject.java @@ -100,8 +100,4 @@ public class DummyObject extends GameObject { return null; } - @Override - public void updateColor() { - } - } diff --git a/src/itdelatrisu/opsu/objects/GameObject.java b/src/itdelatrisu/opsu/objects/GameObject.java index b819ac32..039e8a3c 100644 --- a/src/itdelatrisu/opsu/objects/GameObject.java +++ b/src/itdelatrisu/opsu/objects/GameObject.java @@ -22,6 +22,7 @@ import itdelatrisu.opsu.objects.curves.Vec2f; import org.newdawn.slick.Color; import org.newdawn.slick.Graphics; +import yugecin.opsudance.ObjectColorOverrides; /** * Interface for hit object types used during gameplay. @@ -33,6 +34,8 @@ public abstract class GameObject { private int time; + private float hue; + public void updateStartEndPositions(int startTime) { time = startTime; start = getPointAt(startTime); @@ -101,6 +104,14 @@ public abstract class GameObject { public abstract Color getColor(); public abstract Color getMirroredColor(); - public abstract void updateColor(); + + public void updateColor() { + hue = ObjectColorOverrides.hue; + } + + // the hue of objectcoloroverrides at the point of this circle..... i know, shit placement... used for sb when hue inc changes / rainbow override + public float getHue() { + return hue; + } } diff --git a/src/itdelatrisu/opsu/objects/Slider.java b/src/itdelatrisu/opsu/objects/Slider.java index 53035ca8..92116e78 100644 --- a/src/itdelatrisu/opsu/objects/Slider.java +++ b/src/itdelatrisu/opsu/objects/Slider.java @@ -714,6 +714,7 @@ public class Slider extends GameObject { @Override public void updateColor() { + super.updateColor(); color = Dancer.colorOverride.getColor(comboColorIndex); mirrorColor = Dancer.colorMirrorOverride.getColor(comboColorIndex); } diff --git a/src/itdelatrisu/opsu/objects/Spinner.java b/src/itdelatrisu/opsu/objects/Spinner.java index e507e080..251f4e0d 100644 --- a/src/itdelatrisu/opsu/objects/Spinner.java +++ b/src/itdelatrisu/opsu/objects/Spinner.java @@ -438,7 +438,4 @@ public class Spinner extends GameObject { return null; } - @Override - public void updateColor() { - } } diff --git a/src/yugecin/opsudance/ui/SBOverlay.java b/src/yugecin/opsudance/ui/SBOverlay.java index 63a434ed..5a0bb3eb 100644 --- a/src/yugecin/opsudance/ui/SBOverlay.java +++ b/src/yugecin/opsudance/ui/SBOverlay.java @@ -27,6 +27,7 @@ import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; import org.newdawn.slick.Input; import org.newdawn.slick.state.StateBasedGame; +import yugecin.opsudance.ObjectColorOverrides; import java.util.HashMap; import java.util.Map; @@ -79,7 +80,7 @@ public class SBOverlay { int i = 0; for (Object o : optionsMap[index].entrySet()) { Map.Entry option = (Map.Entry) o; - Fonts.SMALL.drawString(10, 50 + i * lh, option.getKey().getDisplayName(), Color.cyan); + Fonts.SMALL.drawString(10, 50 + i++ * lh, option.getKey().getDisplayName(), Color.cyan); } } if (menu) { @@ -175,6 +176,7 @@ public class SBOverlay { optionsMap[index] = new HashMap<>(); } optionsMap[index].put(option, option.write()); + readOption(option); } public boolean mousePressed(int button, int x, int y) { @@ -227,7 +229,12 @@ public class SBOverlay { // needed for object color overrides... private void readOption(Options.GameOption o) { - if (o == Options.GameOption.DANCE_OBJECT_COLOR_OVERRIDE || o == Options.GameOption.DANCE_OBJECT_COLOR_OVERRIDE_MIRRORED) { + if (o == Options.GameOption.DANCE_OBJECT_COLOR_OVERRIDE + || o == Options.GameOption.DANCE_OBJECT_COLOR_OVERRIDE_MIRRORED + || o == Options.GameOption.DANCE_RGB_OBJECT_INC) { + if (index < gameObjects.length) { + ObjectColorOverrides.hue = gameObjects[index].getHue(); + } for (int i = index; i < gameObjects.length; i++) { gameObjects[i].updateColor(); }