Files
CodenameEngine/source/funkin/options/Options.hx
T
6e23da8e86 Add more stuff from the OG game and more PART 1 (#228)
* senpai fucking dies

* final flash fadeout

* made cutscene not play on restart

* winter horrorland + fixes

* fix for pixel perfect shader

* trail + fixes

* better + shaking

last update about it, i swear

* never fucking mind + repacks + accuracy

* more fixes + chromatic aberration

* i hate how pixel shader fucks everything up

* aberration in the cutscene & its cool twitch

* camera beats when twitching

* tank stuff pt1

now the cutscenes look 99% like og (still gotta freeze the stage animated sprites n stuff)
PS: Deleting the lipSycn function in ugh and guns cutscenes cause its not needed + sometimes breaks the animations so lets just leave it in stress only like it was in og

* week 5 completed + retrocompatibility with altanim

now chrima parents work

* philly train

* gameplay shaders option

better adding it now

* tank stuff pt2

* blue balled text (death counter)

* winter horrorland better rework WIP

colored vignette usable by everyone (you can change its color, amount and strength)
wip cuz i wanna edit the amount/strength based on the zoom, i'll do later, now i dont have time gotta do christmas irl stuff yay

* winter horrorland better rework completed

* seen cutscene variable

finally

* even better cutscenes

* oops

* tank stuff pt3

* tank stuff pt4

WIP running tanks

Co-Authored-By: Ne_Eo <NeeEoo@users.noreply.github.com>

* tankstuff pt4.5

imma check tmr why do some tankmen spawn too much up

* tank stuff pt4.75

* dumb

* tank stuff pt 4.9

* type on xml sprite type fix and more

Co-Authored-By: Ne_Eo <NeeEoo@users.noreply.github.com>

---------

Co-authored-by: Ne_Eo <NeeEoo@users.noreply.github.com>
Co-authored-by: lunarcleint <88809950+lunarcleint@users.noreply.github.com>
2024-02-04 00:54:00 -07:00

151 lines
5.1 KiB
Haxe

package funkin.options;
import funkin.backend.system.Controls;
import openfl.Lib;
import flixel.util.FlxSave;
import flixel.input.keyboard.FlxKey;
@:build(funkin.backend.system.macros.OptionsMacro.build())
@:build(funkin.backend.system.macros.FunkinSaveMacro.build("__save", "__flush", "__load"))
class Options
{
@:dox(hide) @:doNotSave
public static var __save:FlxSave;
@:dox(hide) @:doNotSave
private static var __eventAdded = false;
/**
* SETTINGS
*/
public static var naughtyness:Bool = true;
public static var downscroll:Bool = false;
public static var ghostTapping:Bool = true;
public static var flashingMenu:Bool = true;
public static var camZoomOnBeat:Bool = true;
public static var fpsCounter:Bool = true;
public static var autoPause:Bool = true;
public static var antialiasing:Bool = true;
public static var volume:Float = 1;
public static var week6PixelPerfect:Bool = true;
public static var gameplayShaders:Bool = true;
public static var colorHealthBar:Bool = true;
public static var lowMemoryMode:Bool = false;
public static var betaUpdates:Bool = false;
public static var splashesEnabled:Bool = true;
public static var hitWindow:Float = 250;
public static var songOffset:Float = 0;
public static var framerate:Int = 120;
public static var gpuOnlyBitmaps:Bool = #if (mac || web) false #else true #end; // causes issues on mac and web
public static var lastLoadedMod:String = null;
/**
* EDITORS SETTINGS
*/
public static var intensiveBlur:Bool = true;
public static var editorSFX:Bool = true;
public static var resizableEditors:Bool = true;
public static var maxUndos:Int = 120;
/**
* QOL FEATURES
*/
public static var freeplayLastSong:String = null;
public static var freeplayLastDifficulty:String = "normal";
public static var contributors:Array<funkin.backend.system.github.GitHubContributor> = [];
public static var lastUpdated:Null<Float>;
/**
* CHARTER
*/
public static var charterMetronomeEnabled:Bool = false;
public static var charterShowSections:Bool = true;
public static var charterShowBeats:Bool = true;
public static var charterEnablePlaytestScripts:Bool = true;
/**
* PLAYER 1 CONTROLS
*/
public static var P1_NOTE_LEFT:Array<FlxKey> = [A];
public static var P1_NOTE_DOWN:Array<FlxKey> = [S];
public static var P1_NOTE_UP:Array<FlxKey> = [W];
public static var P1_NOTE_RIGHT:Array<FlxKey> = [D];
public static var P1_LEFT:Array<FlxKey> = [A];
public static var P1_DOWN:Array<FlxKey> = [S];
public static var P1_UP:Array<FlxKey> = [W];
public static var P1_RIGHT:Array<FlxKey> = [D];
public static var P1_ACCEPT:Array<FlxKey> = [ENTER];
public static var P1_BACK:Array<FlxKey> = [BACKSPACE];
public static var P1_PAUSE:Array<FlxKey> = [ENTER];
public static var P1_RESET:Array<FlxKey> = [R];
public static var P1_SWITCHMOD:Array<FlxKey> = [TAB];
/**
* PLAYER 2 CONTROLS (ALT)
*/
public static var P2_NOTE_LEFT:Array<FlxKey> = [LEFT];
public static var P2_NOTE_DOWN:Array<FlxKey> = [DOWN];
public static var P2_NOTE_UP:Array<FlxKey> = [UP];
public static var P2_NOTE_RIGHT:Array<FlxKey> = [RIGHT];
public static var P2_LEFT:Array<FlxKey> = [LEFT];
public static var P2_DOWN:Array<FlxKey> = [DOWN];
public static var P2_UP:Array<FlxKey> = [UP];
public static var P2_RIGHT:Array<FlxKey> = [RIGHT];
public static var P2_ACCEPT:Array<FlxKey> = [SPACE];
public static var P2_BACK:Array<FlxKey> = [ESCAPE];
public static var P2_PAUSE:Array<FlxKey> = [ESCAPE];
public static var P2_RESET:Array<FlxKey> = [];
public static var P2_SWITCHMOD:Array<FlxKey> = [];
/**
* SOLO GETTERS
*/
public static var SOLO_NOTE_LEFT(get, null):Array<FlxKey>;
public static var SOLO_NOTE_DOWN(get, null):Array<FlxKey>;
public static var SOLO_NOTE_UP(get, null):Array<FlxKey>;
public static var SOLO_NOTE_RIGHT(get, null):Array<FlxKey>;
public static var SOLO_LEFT(get, null):Array<FlxKey>;
public static var SOLO_DOWN(get, null):Array<FlxKey>;
public static var SOLO_UP(get, null):Array<FlxKey>;
public static var SOLO_RIGHT(get, null):Array<FlxKey>;
public static var SOLO_ACCEPT(get, null):Array<FlxKey>;
public static var SOLO_BACK(get, null):Array<FlxKey>;
public static var SOLO_PAUSE(get, null):Array<FlxKey>;
public static var SOLO_RESET(get, null):Array<FlxKey>;
public static var SOLO_SWITCHMOD(get, null):Array<FlxKey>;
public static function load() {
if (__save == null) __save = new FlxSave();
__save.bind("options", "CodenameEngine");
__load();
if (!__eventAdded) {
Lib.application.onExit.add(function(i:Int) {
trace("Saving settings...");
save();
});
__eventAdded = true;
}
FlxG.sound.volume = volume;
applySettings();
}
public static function applySettings() {
applyKeybinds();
FlxG.game.stage.quality = (FlxG.enableAntialiasing = antialiasing) ? LOW : BEST;
FlxG.autoPause = autoPause;
FlxG.drawFramerate = FlxG.updateFramerate = framerate;
}
public static function applyKeybinds() {
PlayerSettings.solo.setKeyboardScheme(Solo);
PlayerSettings.player1.setKeyboardScheme(Duo(true));
PlayerSettings.player2.setKeyboardScheme(Duo(false));
}
public static function save() {
volume = FlxG.sound.volume;
__flush();
}
}