From 3a507453f9c2f1893243625d849d1386384c4ae8 Mon Sep 17 00:00:00 2001 From: yugecin Date: Sat, 1 Oct 2016 15:00:12 +0200 Subject: [PATCH] Use map title to get initial rainbow colors --- src/itdelatrisu/opsu/states/Game.java | 3 +++ src/yugecin/opsudance/CursorColorOverrides.java | 4 ++++ src/yugecin/opsudance/ObjectColorOverrides.java | 4 ++++ 3 files changed, 11 insertions(+) diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index de58bf5b..d0c987f7 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -1331,6 +1331,9 @@ public class Game extends BasicGameState { mirrorFrom = 0; mirrorTo = gameObjects.length; + ObjectColorOverrides.reset(beatmap.getTitle()); + CursorColorOverrides.reset(beatmap.getTitle()); + skipButton.resetHover(); if (isReplay || GameMod.AUTO.isActive()) playbackSpeed.getButton().resetHover(); diff --git a/src/yugecin/opsudance/CursorColorOverrides.java b/src/yugecin/opsudance/CursorColorOverrides.java index 2f35e3c6..641fb4cd 100644 --- a/src/yugecin/opsudance/CursorColorOverrides.java +++ b/src/yugecin/opsudance/CursorColorOverrides.java @@ -76,6 +76,10 @@ public enum CursorColorOverrides { this.nr = nr; } + public static void reset(String mapname) { + hue = mapname.hashCode() % 360; + } + @Override public String toString() { return displayText; diff --git a/src/yugecin/opsudance/ObjectColorOverrides.java b/src/yugecin/opsudance/ObjectColorOverrides.java index 80fd1a70..18fb89e9 100644 --- a/src/yugecin/opsudance/ObjectColorOverrides.java +++ b/src/yugecin/opsudance/ObjectColorOverrides.java @@ -78,6 +78,10 @@ public enum ObjectColorOverrides { this.nr = nr; } + public static void reset(String mapname) { + hue = mapname.hashCode() % 360; + } + @Override public String toString() { return displayText;