Merge branch 'main' into new-editors
This commit is contained in:
@@ -64,8 +64,8 @@ final class CommandLineHandler {
|
||||
Main.noCwdFix = true;
|
||||
case "-livereload":
|
||||
// do nothing
|
||||
case "-verbose":
|
||||
// do nothing
|
||||
case "-v" | "-verbose" | "--verbose":
|
||||
Main.verbose = true;
|
||||
default:
|
||||
Sys.println("Unknown command");
|
||||
}
|
||||
|
||||
@@ -143,25 +143,20 @@ final class Logs {
|
||||
traceColored(text, level);
|
||||
}
|
||||
|
||||
public inline static function getPrefix(prefix:String) {
|
||||
public inline static function getPrefix(prefix:String)
|
||||
return logText('[${prefix}] ', BLUE);
|
||||
}
|
||||
|
||||
public inline static function infos(text:String, color:ConsoleColor = LIGHTGRAY, ?prefix:String) {
|
||||
public inline static function infos(text:String, color:ConsoleColor = LIGHTGRAY, ?prefix:String)
|
||||
Logs.trace(text, INFO, color, prefix);
|
||||
}
|
||||
|
||||
public inline static function verbose(text:String, color:ConsoleColor = LIGHTGRAY, ?prefix:String) {
|
||||
Logs.trace(text, VERBOSE, color, prefix);
|
||||
}
|
||||
public inline static function verbose(text:String, color:ConsoleColor = LIGHTGRAY, ?prefix:String)
|
||||
if (Main.verbose) Logs.trace(text, VERBOSE, color, prefix);
|
||||
|
||||
public inline static function warn(text:String, color:ConsoleColor = YELLOW, ?prefix:String) {
|
||||
public inline static function warn(text:String, color:ConsoleColor = YELLOW, ?prefix:String)
|
||||
Logs.trace(text, WARNING, color, prefix);
|
||||
}
|
||||
|
||||
public inline static function error(text:String, color:ConsoleColor = RED, ?prefix:String) {
|
||||
public inline static function error(text:String, color:ConsoleColor = RED, ?prefix:String)
|
||||
Logs.trace(text, ERROR, color, prefix);
|
||||
}
|
||||
}
|
||||
|
||||
enum abstract Level(Int) {
|
||||
|
||||
@@ -35,6 +35,7 @@ class Main extends Sprite
|
||||
public static var modToLoad:String = null;
|
||||
public static var forceGPUOnlyBitmapsOff:Bool = #if desktop false #else true #end;
|
||||
public static var noTerminalColor:Bool = false;
|
||||
public static var verbose:Bool = false;
|
||||
|
||||
public static var scaleMode:FunkinRatioScaleMode;
|
||||
#if !mobile
|
||||
|
||||
@@ -33,7 +33,7 @@ class FramerateCounter extends Sprite {
|
||||
if (alpha <= 0.05) return;
|
||||
super.__enterFrame(t);
|
||||
|
||||
lastFPS = CoolUtil.fpsLerp(lastFPS, FlxG.elapsed == 0 ? 0 : (1 / FlxG.elapsed), 0.25);
|
||||
lastFPS = CoolUtil.fpsLerp(lastFPS, FlxG.rawElapsed == 0 ? 0 : (1 / FlxG.rawElapsed), 0.25);
|
||||
fpsNum.text = Std.string(Math.floor(lastFPS));
|
||||
fpsLabel.x = fpsNum.x + fpsNum.width;
|
||||
fpsLabel.y = (fpsNum.y + fpsNum.height) - fpsLabel.height;
|
||||
|
||||
@@ -21,6 +21,7 @@ class Macros {
|
||||
// OTHER LIBRARIES & STUFF
|
||||
#if THREE_D_SUPPORT "away3d", "flx3d", #end
|
||||
#if VIDEO_CUTSCENES "hxvlc.flixel", "hxvlc.openfl", #end
|
||||
#if NAPE_ENABLED "nape", "flixel.addons.nape", #end
|
||||
// BASE HAXE
|
||||
"DateTools", "EReg", "Lambda", "StringBuf", "haxe.crypto", "haxe.display", "haxe.exceptions", "haxe.extern", "scripting"
|
||||
])
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
package funkin.backend.system.modules;
|
||||
|
||||
import haxe.io.Path;
|
||||
|
||||
/*
|
||||
* A class that simply points OpenALSoft to a custom configuration file when
|
||||
* the game starts up.
|
||||
*
|
||||
* The config overrides a few global OpenALSoft settings with the aim of
|
||||
* improving audio quality on desktop targets.
|
||||
*/
|
||||
@:keepInit class ALSoftConfig
|
||||
{
|
||||
#if desktop
|
||||
static function __init__():Void
|
||||
{
|
||||
var origin:String = #if hl Sys.getCwd() #else Sys.programPath() #end;
|
||||
|
||||
var configPath:String = Path.directory(Path.withoutExtension(origin));
|
||||
#if windows
|
||||
configPath += "/plugins/alsoft.ini";
|
||||
#elseif mac
|
||||
configPath = Path.directory(configPath) + "/Resources/plugins/alsoft.conf";
|
||||
#else
|
||||
configPath += "/plugins/alsoft.conf";
|
||||
#end
|
||||
|
||||
Sys.putEnv("ALSOFT_CONF", configPath);
|
||||
}
|
||||
#end
|
||||
}
|
||||
Reference in New Issue
Block a user