prevent hue shifting when hue inc or obj color override is changed by sb
This commit is contained in:
parent
81890effd3
commit
cf14bca4a5
|
@ -102,8 +102,4 @@ public class FakeGameObject extends GameObject {
|
|||
this.halfTime = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateColor() {
|
||||
}
|
||||
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -100,8 +100,4 @@ public class DummyObject extends GameObject {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateColor() {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -438,7 +438,4 @@ public class Spinner extends GameObject {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateColor() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -231,6 +232,9 @@ public class SBOverlay {
|
|||
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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user