diff --git a/assets/shaders/engine/editorBlurFast.frag b/assets/shaders/engine/editorBlurFast.frag
index 74317dfc1..8c83ac631 100644
--- a/assets/shaders/engine/editorBlurFast.frag
+++ b/assets/shaders/engine/editorBlurFast.frag
@@ -11,10 +11,10 @@ float uBrightness = 0.6;
vec4 getColor(vec2 pos) {
vec2 ps = (pos);
- if (ps.x < 0) ps.x = 0;
+ if (ps.x < 0.0) ps.x = 0.0;
//else if (ps.x > 1.0 - (1.0 / iResolution.x)) ps.x = 1.0 - (1.0 / iResolution.x);
else if (ps.x > 1.0) return vec4(0.0);
- if (ps.y < 0) ps.y = 0;
+ if (ps.y < 0.0) ps.y = 0.0;
//else if (ps.y > 1.0 - (1.0 / iResolution.y)) return ps.y = 1.0 - (1.0 / iResolution.y);
else if (ps.y > 1.0) return vec4(0.0);
return flixel_texture2D(bitmap, (ps));
@@ -42,7 +42,7 @@ vec2 random(vec2 p) {
void main() {
vec2 camPos = (openfl_TextureCoordv);
//vec2 camPos = openfl_TextureCoordv;
- if (camPos.x < 0 || camPos.x > 1 || camPos.y < 0 || camPos.y > 1)
+ if (camPos.x < 0.0 || camPos.x > 1.0 || camPos.y < 0.0 || camPos.y > 1.0)
return;
//vec4 color = getColor(camPos);
diff --git a/project.xml b/project.xml
index a9eaed1d0..1a0082404 100644
--- a/project.xml
+++ b/project.xml
@@ -111,8 +111,9 @@
-
+
+
@@ -144,10 +145,10 @@
-
+
-
+
diff --git a/source/funkin/backend/assets/ModdableAssetsFolder.hx b/source/funkin/backend/assets/ModdableAssetsFolder.hx
index 25dd4943b..0da7ed5fb 100644
--- a/source/funkin/backend/assets/ModdableAssetsFolder.hx
+++ b/source/funkin/backend/assets/ModdableAssetsFolder.hx
@@ -2,6 +2,7 @@ package funkin.backend.assets;
import lime.utils.AssetLibrary;
+#if sys
/**
* Used to prevent crashes
*/
@@ -36,4 +37,5 @@ class ModdableAssetsFolder extends ModsFolderLibrary {
_parsedAsset = asset.substr(prefix.length);
return true;
}
-}
\ No newline at end of file
+}
+#end
\ No newline at end of file
diff --git a/source/funkin/backend/system/CommandLineHandler.hx b/source/funkin/backend/system/CommandLineHandler.hx
index 5b2f05eec..d00af9a55 100644
--- a/source/funkin/backend/system/CommandLineHandler.hx
+++ b/source/funkin/backend/system/CommandLineHandler.hx
@@ -1,7 +1,7 @@
package funkin.backend.system;
-import sys.FileSystem;
#if sys
+import sys.FileSystem;
class CommandLineHandler {
public static function parseCommandLine(cmd:Array) {
var i:Int = 0;
diff --git a/source/funkin/backend/system/Conductor.hx b/source/funkin/backend/system/Conductor.hx
index 94ffd17f9..9b82e268a 100644
--- a/source/funkin/backend/system/Conductor.hx
+++ b/source/funkin/backend/system/Conductor.hx
@@ -67,7 +67,7 @@ class Conductor
/**
* Offset of the song
*/
- public static var songOffset:Float = 0;
+ public static var songOffset:Float = 0;
/**
* Current step
diff --git a/source/funkin/backend/system/Main.hx b/source/funkin/backend/system/Main.hx
index 673d28aa6..b3efb4d50 100644
--- a/source/funkin/backend/system/Main.hx
+++ b/source/funkin/backend/system/Main.hx
@@ -71,7 +71,7 @@ class Main extends Sprite
addChild(game = new FunkinGame(gameWidth, gameHeight, MainState, Options.framerate, Options.framerate, skipSplash, startFullscreen));
- #if !mobile
+ #if (!mobile && !web)
addChild(framerateSprite = new funkin.backend.system.framerate.Framerate());
framerateSprite.scaleX = framerateSprite.scaleY = stage.window.scale;
SystemInfo.init();
diff --git a/source/funkin/backend/system/macros/ScriptsMacro.hx b/source/funkin/backend/system/macros/ScriptsMacro.hx
index 53ddccd7a..db0f9f55a 100644
--- a/source/funkin/backend/system/macros/ScriptsMacro.hx
+++ b/source/funkin/backend/system/macros/ScriptsMacro.hx
@@ -20,7 +20,6 @@ class ScriptsMacro {
"flixel.addons.plugin", "flixel.addons.text", "flixel.addons.tile", "flixel.addons.transition",
"flixel.addons.util",
// OTHER LIBRARIES & STUFF
- "funkin",
"away3d", "flx3d",
#if VIDEO_CUTSCENES "hxcodec.flixel", "hxcodec.openfl", "hxcodec.lime", #end
// BASE HAXE
@@ -28,7 +27,7 @@ class ScriptsMacro {
])
Compiler.include(inc);
- for(inc in [#if sys "sys", #end "openfl.net", "funkin.backend.system.net"]) {
+ for(inc in [#if SYS "sys", "openfl.net", "funkin.backend.system.net" #end]) {
#if !HL
Compiler.include(inc);
#else
@@ -37,6 +36,8 @@ class ScriptsMacro {
#end
}
+ Compiler.include("funkin", #if !UPDATE_CHECKING ['funkin.backend.system.updating'] #end);
+
// FOR ABSTRACTS
Compiler.addGlobalMetadata('haxe.xml', '@:build(hscript.UsingHandler.build())');
Compiler.addGlobalMetadata('haxe.CallStack', '@:build(hscript.UsingHandler.build())');
diff --git a/source/funkin/backend/utils/NativeAPI.hx b/source/funkin/backend/utils/NativeAPI.hx
index d2ff0d125..061021bc3 100644
--- a/source/funkin/backend/utils/NativeAPI.hx
+++ b/source/funkin/backend/utils/NativeAPI.hx
@@ -62,12 +62,14 @@ class NativeAPI {
var bg = cast(backgroundColor, Int);
Windows.setConsoleColors((bg * 16) + fg);
#else
+ #if sys
Sys.print("\x1b[0m");
if(foregroundColor != NONE)
Sys.print("\x1b[" + Std.int(consoleColorToANSI(foregroundColor)) + "m");
if(backgroundColor != NONE)
Sys.print("\x1b[" + Std.int(consoleColorToANSI(backgroundColor) + 10) + "m");
#end
+ #end
}
public static function consoleColorToANSI(color:ConsoleColor) {
diff --git a/source/funkin/editors/character/CharacterSelection.hx b/source/funkin/editors/character/CharacterSelection.hx
index c7e897b2f..dd213c391 100644
--- a/source/funkin/editors/character/CharacterSelection.hx
+++ b/source/funkin/editors/character/CharacterSelection.hx
@@ -8,7 +8,6 @@ import funkin.backend.chart.Chart;
import funkin.options.type.TextOption;
import funkin.options.type.IconOption;
import funkin.options.OptionsScreen;
-import sys.FileSystem;
class CharacterSelection extends EditorTreeMenu
{
diff --git a/source/funkin/options/Options.hx b/source/funkin/options/Options.hx
index 39d983e98..1309b1444 100644
--- a/source/funkin/options/Options.hx
+++ b/source/funkin/options/Options.hx
@@ -34,7 +34,10 @@ class Options
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 false #else true #end; // causes issues on mac
+ public static var gpuOnlyBitmaps:Bool =
+ #if mac false
+ #elseif !web false
+ #else true #end; // causes issues on mac
public static var lastLoadedMod:String = null;