optimization setting
This commit is contained in:
parent
7932341de1
commit
b6f03dd225
@ -237,7 +237,7 @@ class HitGraph extends Sprite
|
|||||||
|
|
||||||
/*if (i == 0)
|
/*if (i == 0)
|
||||||
gfx.moveTo(graphX, _axis.y + pointY);*/
|
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();
|
gfx.endFill();
|
||||||
}
|
}
|
||||||
|
@ -90,6 +90,9 @@ class KadeEngineData
|
|||||||
if (FlxG.save.data.inputShow == null)
|
if (FlxG.save.data.inputShow == null)
|
||||||
FlxG.save.data.inputShow = false;
|
FlxG.save.data.inputShow = false;
|
||||||
|
|
||||||
|
if (FlxG.save.data.optimize == null)
|
||||||
|
FlxG.save.data.optimize = false;
|
||||||
|
|
||||||
Conductor.recalculateTimings();
|
Conductor.recalculateTimings();
|
||||||
PlayerSettings.player1.controls.loadKeyBinds();
|
PlayerSettings.player1.controls.loadKeyBinds();
|
||||||
KeyBinds.keyCheck();
|
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
|
class NPSDisplayOption extends Option
|
||||||
{
|
{
|
||||||
public function new(desc:String)
|
public function new(desc:String)
|
||||||
|
@ -57,9 +57,10 @@ class OptionsMenu extends MusicBeatState
|
|||||||
#end
|
#end
|
||||||
new FlashingLightsOption("Toggle flashing lights that can cause epileptic seizures and strain."),
|
new FlashingLightsOption("Toggle flashing lights that can cause epileptic seizures and strain."),
|
||||||
new WatermarkOption("Enable and disable all watermarks from the engine."),
|
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 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.safeFrames = FlxG.save.data.frames;
|
||||||
PlayStateChangeables.scrollSpeed = FlxG.save.data.scrollSpeed;
|
PlayStateChangeables.scrollSpeed = FlxG.save.data.scrollSpeed;
|
||||||
PlayStateChangeables.botPlay = FlxG.save.data.botplay;
|
PlayStateChangeables.botPlay = FlxG.save.data.botplay;
|
||||||
|
PlayStateChangeables.Optimize = FlxG.save.data.optimize;
|
||||||
|
|
||||||
// pre lowercasing the song name (create)
|
// pre lowercasing the song name (create)
|
||||||
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
var songLowercase = StringTools.replace(PlayState.SONG.song, " ", "-").toLowerCase();
|
||||||
@ -271,6 +271,8 @@ class PlayState extends MusicBeatState
|
|||||||
|
|
||||||
#if windows
|
#if windows
|
||||||
executeModchart = FileSystem.exists(Paths.lua(songLowercase + "/modchart"));
|
executeModchart = FileSystem.exists(Paths.lua(songLowercase + "/modchart"));
|
||||||
|
if (executeModchart)
|
||||||
|
PlayStateChangeables.Optimize = false;
|
||||||
#end
|
#end
|
||||||
#if !cpp
|
#if !cpp
|
||||||
executeModchart = false; // FORCE disable for non cpp targets
|
executeModchart = false; // FORCE disable for non cpp targets
|
||||||
@ -377,6 +379,9 @@ class PlayState extends MusicBeatState
|
|||||||
}
|
}
|
||||||
} else {stageCheck = SONG.stage;}
|
} else {stageCheck = SONG.stage;}
|
||||||
|
|
||||||
|
if (!PlayStateChangeables.Optimize)
|
||||||
|
{
|
||||||
|
|
||||||
switch(stageCheck)
|
switch(stageCheck)
|
||||||
{
|
{
|
||||||
case 'halloween':
|
case 'halloween':
|
||||||
@ -756,7 +761,7 @@ class PlayState extends MusicBeatState
|
|||||||
add(stageCurtains);
|
add(stageCurtains);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//defaults if no gf was found in chart
|
//defaults if no gf was found in chart
|
||||||
var gfCheck:String = 'gf';
|
var gfCheck:String = 'gf';
|
||||||
|
|
||||||
@ -781,7 +786,7 @@ class PlayState extends MusicBeatState
|
|||||||
default:
|
default:
|
||||||
curGf = 'gf';
|
curGf = 'gf';
|
||||||
}
|
}
|
||||||
|
|
||||||
gf = new Character(400, 130, curGf);
|
gf = new Character(400, 130, curGf);
|
||||||
gf.scrollFactor.set(0.95, 0.95);
|
gf.scrollFactor.set(0.95, 0.95);
|
||||||
|
|
||||||
@ -870,14 +875,19 @@ class PlayState extends MusicBeatState
|
|||||||
gf.y += 300;
|
gf.y += 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
add(gf);
|
if (!PlayStateChangeables.Optimize)
|
||||||
|
{
|
||||||
|
add(gf);
|
||||||
|
|
||||||
|
// Shitty layering but whatev it works LOL
|
||||||
|
if (curStage == 'limo')
|
||||||
|
add(limo);
|
||||||
|
|
||||||
|
add(dad);
|
||||||
|
add(boyfriend);
|
||||||
|
}
|
||||||
|
|
||||||
// Shitty layering but whatev it works LOL
|
|
||||||
if (curStage == 'limo')
|
|
||||||
add(limo);
|
|
||||||
|
|
||||||
add(dad);
|
|
||||||
add(boyfriend);
|
|
||||||
if (loadRep)
|
if (loadRep)
|
||||||
{
|
{
|
||||||
FlxG.watch.addQuick('rep rpesses',repPresses);
|
FlxG.watch.addQuick('rep rpesses',repPresses);
|
||||||
@ -1538,6 +1548,10 @@ class PlayState extends MusicBeatState
|
|||||||
oldNote = null;
|
oldNote = null;
|
||||||
|
|
||||||
var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote);
|
var swagNote:Note = new Note(daStrumTime, daNoteData, oldNote);
|
||||||
|
|
||||||
|
if (!gottaHitNote && PlayStateChangeables.Optimize)
|
||||||
|
continue;
|
||||||
|
|
||||||
swagNote.sustainLength = songNotes[2];
|
swagNote.sustainLength = songNotes[2];
|
||||||
swagNote.scrollFactor.set(0, 0);
|
swagNote.scrollFactor.set(0, 0);
|
||||||
|
|
||||||
@ -1598,6 +1612,9 @@ class PlayState extends MusicBeatState
|
|||||||
//defaults if no noteStyle was found in chart
|
//defaults if no noteStyle was found in chart
|
||||||
var noteTypeCheck:String = 'normal';
|
var noteTypeCheck:String = 'normal';
|
||||||
|
|
||||||
|
if (PlayStateChangeables.Optimize && player == 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (SONG.noteStyle == null) {
|
if (SONG.noteStyle == null) {
|
||||||
switch(storyWeek) {case 6: noteTypeCheck = 'pixel';}
|
switch(storyWeek) {case 6: noteTypeCheck = 'pixel';}
|
||||||
} else {noteTypeCheck = SONG.noteStyle;}
|
} else {noteTypeCheck = SONG.noteStyle;}
|
||||||
@ -1732,6 +1749,9 @@ class PlayState extends MusicBeatState
|
|||||||
babyArrow.x += 50;
|
babyArrow.x += 50;
|
||||||
babyArrow.x += ((FlxG.width / 2) * player);
|
babyArrow.x += ((FlxG.width / 2) * player);
|
||||||
|
|
||||||
|
if (PlayStateChangeables.Optimize)
|
||||||
|
babyArrow.x -= 275;
|
||||||
|
|
||||||
cpuStrums.forEach(function(spr:FlxSprite)
|
cpuStrums.forEach(function(spr:FlxSprite)
|
||||||
{
|
{
|
||||||
spr.centerOffsets(); //CPU arrows start out slightly off-center
|
spr.centerOffsets(); //CPU arrows start out slightly off-center
|
||||||
@ -1929,7 +1949,7 @@ class PlayState extends MusicBeatState
|
|||||||
switch (curStage)
|
switch (curStage)
|
||||||
{
|
{
|
||||||
case 'philly':
|
case 'philly':
|
||||||
if (trainMoving)
|
if (trainMoving && !PlayStateChangeables.Optimize)
|
||||||
{
|
{
|
||||||
trainFrameTiming += elapsed;
|
trainFrameTiming += elapsed;
|
||||||
|
|
||||||
|
@ -4,4 +4,5 @@ class PlayStateChangeables
|
|||||||
public static var safeFrames:Int;
|
public static var safeFrames:Int;
|
||||||
public static var scrollSpeed:Float;
|
public static var scrollSpeed:Float;
|
||||||
public static var botPlay:Bool;
|
public static var botPlay:Bool;
|
||||||
|
public static var Optimize:Bool;
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user