optimization setting
This commit is contained in:
parent
7932341de1
commit
b6f03dd225
@ -237,7 +237,7 @@ class HitGraph extends Sprite
|
||||
|
||||
/*if (i == 0)
|
||||
gfx.moveTo(graphX, _axis.y + pointY);*/
|
||||
gfx.drawRect(graphX + fitX(history[i][2]), pointY,4,4);
|
||||
gfx.drawRect(fitX(history[i][2]), pointY,4,4);
|
||||
|
||||
gfx.endFill();
|
||||
}
|
||||
|
@ -90,6 +90,9 @@ class KadeEngineData
|
||||
if (FlxG.save.data.inputShow == null)
|
||||
FlxG.save.data.inputShow = false;
|
||||
|
||||
if (FlxG.save.data.optimize == null)
|
||||
FlxG.save.data.optimize = false;
|
||||
|
||||
Conductor.recalculateTimings();
|
||||
PlayerSettings.player1.controls.loadKeyBinds();
|
||||
KeyBinds.keyCheck();
|
||||
|
@ -504,6 +504,27 @@ class RainbowFPSOption extends Option
|
||||
}
|
||||
}
|
||||
|
||||
class Optimization extends Option
|
||||
{
|
||||
public function new(desc:String)
|
||||
{
|
||||
super();
|
||||
description = desc;
|
||||
}
|
||||
|
||||
public override function press():Bool
|
||||
{
|
||||
FlxG.save.data.optimize = !FlxG.save.data.optimize;
|
||||
display = updateDisplay();
|
||||
return true;
|
||||
}
|
||||
|
||||
private override function updateDisplay():String
|
||||
{
|
||||
return "Optimization " + (FlxG.save.data.optimize ? "ON" : "OFF");
|
||||
}
|
||||
}
|
||||
|
||||
class NPSDisplayOption extends Option
|
||||
{
|
||||
public function new(desc:String)
|
||||
|
@ -57,9 +57,10 @@ class OptionsMenu extends MusicBeatState
|
||||
#end
|
||||
new FlashingLightsOption("Toggle flashing lights that can cause epileptic seizures and strain."),
|
||||
new WatermarkOption("Enable and disable all watermarks from the engine."),
|
||||
new BotPlay("Showcase your charts and mods with autoplay."),
|
||||
new ScoreScreen("Show the score screen after the end of a song"),
|
||||
new ShowInput("Display every single input in the score screen.")
|
||||
new ShowInput("Display every single input in the score screen."),
|
||||
new Optimization("No backgrounds, no characters, centered notes, no player 2."),
|
||||
new BotPlay("Showcase your charts and mods with autoplay."),
|
||||
])
|
||||
|
||||
];
|
||||
|
@ -258,7 +258,7 @@ class PlayState extends MusicBeatState
|
||||
PlayStateChangeables.safeFrames = FlxG.save.data.frames;
|
||||
PlayStateChangeables.scrollSpeed = FlxG.save.data.scrollSpeed;
|
||||
PlayStateChangeables.botPlay = FlxG.save.data.botplay;
|
||||
|
||||
PlayStateChangeables.Optimize = FlxG.save.data.optimize;
|
||||
|
||||
// pre lowercasing the song name (create)
|
||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||
@ -271,6 +271,8 @@ class PlayState extends MusicBeatState
|
||||
|
||||
#if windows
|
||||
executeModchart = FileSystem.exists(Paths.lua(songLowercase + "/modchart"));
|
||||
if (executeModchart)
|
||||
PlayStateChangeables.Optimize = false;
|
||||
#end
|
||||
#if !cpp
|
||||
executeModchart = false; // FORCE disable for non cpp targets
|
||||
@ -377,6 +379,9 @@ class PlayState extends MusicBeatState
|
||||
}
|
||||
} else {stageCheck = SONG.stage;}
|
||||
|
||||
if (!PlayStateChangeables.Optimize)
|
||||
{
|
||||
|
||||
switch(stageCheck)
|
||||
{
|
||||
case 'halloween':
|
||||
@ -756,7 +761,7 @@ class PlayState extends MusicBeatState
|
||||
add(stageCurtains);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//defaults if no gf was found in chart
|
||||
var gfCheck:String = 'gf';
|
||||
|
||||
@ -870,6 +875,8 @@ class PlayState extends MusicBeatState
|
||||
gf.y += 300;
|
||||
}
|
||||
|
||||
if (!PlayStateChangeables.Optimize)
|
||||
{
|
||||
add(gf);
|
||||
|
||||
// Shitty layering but whatev it works LOL
|
||||
@ -878,6 +885,9 @@ class PlayState extends MusicBeatState
|
||||
|
||||
add(dad);
|
||||
add(boyfriend);
|
||||
}
|
||||
|
||||
|
||||
if (loadRep)
|
||||
{
|
||||
FlxG.watch.addQuick('rep rpesses',repPresses);
|
||||
@ -1538,6 +1548,10 @@ class PlayState extends MusicBeatState
|
||||
oldNote = null;
|
||||
|
||||
var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote);
|
||||
|
||||
if (!gottaHitNote && PlayStateChangeables.Optimize)
|
||||
continue;
|
||||
|
||||
swagNote.sustainLength = songNotes[2];
|
||||
swagNote.scrollFactor.set(0, 0);
|
||||
|
||||
@ -1598,6 +1612,9 @@ class PlayState extends MusicBeatState
|
||||
//defaults if no noteStyle was found in chart
|
||||
var noteTypeCheck:String = 'normal';
|
||||
|
||||
if (PlayStateChangeables.Optimize && player == 0)
|
||||
continue;
|
||||
|
||||
if (SONG.noteStyle == null) {
|
||||
switch(storyWeek) {case 6: noteTypeCheck = 'pixel';}
|
||||
} else {noteTypeCheck = SONG.noteStyle;}
|
||||
@ -1732,6 +1749,9 @@ class PlayState extends MusicBeatState
|
||||
babyArrow.x += 50;
|
||||
babyArrow.x += ((FlxG.width / 2) * player);
|
||||
|
||||
if (PlayStateChangeables.Optimize)
|
||||
babyArrow.x -= 275;
|
||||
|
||||
cpuStrums.forEach(function(spr:FlxSprite)
|
||||
{
|
||||
spr.centerOffsets(); //CPU arrows start out slightly off-center
|
||||
@ -1929,7 +1949,7 @@ class PlayState extends MusicBeatState
|
||||
switch (curStage)
|
||||
{
|
||||
case 'philly':
|
||||
if (trainMoving)
|
||||
if (trainMoving && !PlayStateChangeables.Optimize)
|
||||
{
|
||||
trainFrameTiming += elapsed;
|
||||
|
||||
|
@ -4,4 +4,5 @@ class PlayStateChangeables
|
||||
public static var safeFrames:Int;
|
||||
public static var scrollSpeed:Float;
|
||||
public static var botPlay:Bool;
|
||||
public static var Optimize:Bool;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user