New optional slider style

New slider rendering works by rendering the slider to an
offscreen buffer

Add CurveRenderState.java and FrameBufferCache.java that were forgotten in the last commit
This commit is contained in:
Peter Tissen
2015-03-30 14:19:39 +02:00
parent 90c8c9e705
commit 41c7825728
11 changed files with 790 additions and 28 deletions

View File

@@ -41,6 +41,7 @@ import itdelatrisu.opsu.objects.DummyObject;
import itdelatrisu.opsu.objects.GameObject;
import itdelatrisu.opsu.objects.Slider;
import itdelatrisu.opsu.objects.Spinner;
import itdelatrisu.opsu.render.FrameBufferCache;
import itdelatrisu.opsu.replay.PlaybackSpeed;
import itdelatrisu.opsu.replay.Replay;
import itdelatrisu.opsu.replay.ReplayFrame;
@@ -1023,6 +1024,9 @@ public class Game extends BasicGameState {
if (beatmap == null || beatmap.objects == null)
throw new RuntimeException("Running game with no beatmap loaded.");
//@TODO: find a better place to clean the SliderCache
FrameBufferCache.getInstance().freeMap();
// grab the mouse (not working for touchscreen)
// container.setMouseGrabbed(true);

View File

@@ -59,7 +59,8 @@ public class OptionsMenu extends BasicGameState {
GameOption.SCREENSHOT_FORMAT,
GameOption.NEW_CURSOR,
GameOption.DYNAMIC_BACKGROUND,
GameOption.LOAD_VERBOSE
GameOption.LOAD_VERBOSE,
GameOption.NEW_SLIDER
}),
MUSIC ("Music", new GameOption[] {
GameOption.MASTER_VOLUME,