Skip to content

Commit 8fc068e

Browse files
committed
Libraries update
1 parent cf2c368 commit 8fc068e

17 files changed

Lines changed: 51 additions & 59 deletions

building/libs.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<!-- Other Libraries -->
2121
<git name="hxdiscord_rpc" url="https://github.com/CodenameCrew/cne-hxdiscord_rpc" skipDeps="true"/>
2222
<lib name="funkin-modchart" version="1.2.4" skipDeps="true"/>
23-
<lib name="hxvlc" version="2.2.5" skipDeps="true"/>
23+
<lib name="hxvlc" skipDeps="true"/>
2424
<lib name="hxcpp-debug-server"/>
2525
<lib name="format"/>
2626
<lib name="markdown"/>

project.xml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,13 @@
186186
<haxedef name="SOFTCODED_CLASSES" if="SOFTCODED_CLASSES"/>
187187
<haxedef name="USE_ADAPTED_ASSETS" if="USE_ADAPTED_ASSETS"/>
188188

189-
<!-- EXPERMENTAL FEATURES -->
190-
<haxedef name="EXPERIMENTAL_FLXGRAPHIC_DESTROY_FIX" />
189+
<!-- Backward Compatibilities -->
190+
<haxedef name="FLX_HEALTH" />
191+
192+
<haxedef name="FLX_NO_FOCUS_LOST_SCREEN"/>
193+
<haxedef name="FLX_NO_DEBUG" unless="debug"/>
194+
195+
<haxedef name="DISCORD_DISABLE_IO_THREAD" if="DISCORD_RPC"/>
191196

192197
<!-- <haxedef name="no-deprecation-warnings"/> -->
193198

@@ -207,19 +212,17 @@
207212

208213
<haxeflag name="--macro" value="funkin.backend.system.macros.BuildInfo.printBuildInfo()"/>
209214

215+
<!-- EXPERMENTAL FEATURES -->
216+
<haxedef name="EXPERIMENTAL_FLXGRAPHIC_DESTROY_FIX" />
210217
<haxedef name="openfl_dpi_aware"/>
211218
<haxedef name="openfl_pool_events"/>
212219
<haxedef name="openfl-enable-handle-error"/>
213220
<haxedef name="openfl_no_custom_render_event"/>
214221

215-
<haxedef name="DISCORD_DISABLE_IO_THREAD" if="DISCORD_RPC"/>
216-
217-
<haxedef name="FLX_NO_FOCUS_LOST_SCREEN"/>
218-
<haxedef name="FLX_NO_DEBUG" unless="debug"/>
219-
220222
<haxedef name="HXCPP_M32" if="32bit"/>
221223
<haxedef name="HXCPP_DEBUG_LINK" if="debug"/>
222-
<haxedef name="HXCPP_CPP20"/>
224+
<!--C++20 seems doesn't seem to do anything but causes compile warnings-->
225+
<!--<haxedef name="HXCPP_CPP20"/>-->
223226
<!--<haxedef name="HXCPP_CLANG"/>-->
224227
<!--<haxedef name="HXCPP_MSVC"/>-->
225228
<!-- This seems to causes more harm, but to be fair, its mostly because of text rendering -->

source/funkin/backend/system/Flags.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,11 +314,11 @@ class Flags {
314314
if (SUSTAINS_AS_ONE_NOTE == null) SUSTAINS_AS_ONE_NOTE = MOD_API_VERSION >= 2;
315315
if (DEFAULT_GLSL_VERSION == null) {
316316
if (MOD_API_VERSION < 2) {
317-
DEFAULT_GLSL_VERSION = "120";
317+
DEFAULT_GLSL_VERSION = #if (android || mac || web) "100" #else "120" #end;
318318
Logs.warn("Blend Mode Extensions won't work in MOD_API_VERSION below than 2");
319319
}
320320
else {
321-
DEFAULT_GLSL_VERSION = openfl.display.Shader.getDefaultGLVersion();
321+
DEFAULT_GLSL_VERSION = openfl.utils.GLSLSourceAssembler.getDefaultVersion();
322322
}
323323
}
324324
}

source/funkin/backend/system/FunkinGame.hx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ class FunkinGame extends FlxGame {
88
super.switchState();
99
// draw once to put all images in gpu then put the last update time to now to prevent lag spikes or whatever
1010
draw();
11-
_total = ticks = getTicks();
11+
ticks = getTicks();
1212
skipNextTickUpdate = true;
1313
}
1414

15-
public override function onEnterFrame(t) {
16-
if (skipNextTickUpdate != (skipNextTickUpdate = false))
17-
_total = ticks = getTicks();
18-
super.onEnterFrame(t);
15+
override function __enterFrame(deltaTime:Float) {
16+
if (skipNextTickUpdate != (skipNextTickUpdate = false)) ticks = getTicks();
17+
super.__enterFrame(deltaTime);
1918
}
2019
}

source/funkin/backend/system/Main.hx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,10 @@ class Main extends Sprite
9797
// DEPRECATED
9898
@:dox(hide) public static function execAsync(func:Void->Void) ThreadUtil.execAsync(func);
9999

100-
private static function getTimer():Int {
101-
return time = Lib.getTimer();
102-
}
103-
104100
public static function loadGameSettings() {
105101
WindowUtils.init();
106102
SaveWarning.init();
107103
MemoryUtil.init();
108-
@:privateAccess
109-
FlxG.game.getTimer = getTimer;
110104
FunkinCache.init();
111105
Paths.assetsTree = new AssetsLibraryList();
112106

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,14 @@
11
package funkin.backend.system;
22

33
import lime.graphics.Image;
4-
import lime.graphics.cairo.CairoImageSurface;
54
import openfl.display.BitmapData;
6-
import openfl.geom.Rectangle;
7-
import openfl.utils.BitmapDataUtil;
85

9-
@:deprecated("Use openfl.utils.BitmapDataUtil.toHardware instead.")
6+
@:deprecated("Use openfl.display.BitmapData.toHardware instead.")
107
class OptimizedBitmapData extends BitmapData {
118
@SuppressWarnings("checkstyle:Dynamic")
129
@:noCompletion private override function __fromImage(image:#if lime Image #else Dynamic #end):Void
1310
{
14-
#if lime
15-
if (image != null && image.buffer != null)
16-
{
17-
this.image = image;
18-
19-
width = image.width;
20-
height = image.height;
21-
rect = new Rectangle(0, 0, image.width, image.height);
22-
23-
__textureWidth = width;
24-
__textureHeight = height;
25-
26-
#if sys
27-
image.format = BGRA32;
28-
image.premultiplied = true;
29-
#end
30-
31-
__isValid = true;
32-
readable = true;
33-
34-
BitmapDataUtil.toHardware(this);
35-
}
36-
#end
11+
super.__fromImage(image);
12+
toHardware();
3713
}
3814
}

source/funkin/backend/system/framerate/AssetTreeInfo.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AssetTreeInfo extends FramerateCategory {
1414
super("Asset Libraries Tree Info");
1515
}
1616

17-
public override function __enterFrame(t:Int) {
17+
public override function __enterFrame(t:Float) {
1818
if (alpha <= 0.05) return;
1919

2020
if ((lastUpdateTime += FlxG.rawElapsed) < 1)

source/funkin/backend/system/framerate/ConductorInfo.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class ConductorInfo extends FramerateCategory {
55
super("Conductor Info");
66
}
77

8-
public override function __enterFrame(t:Int) {
8+
public override function __enterFrame(t:Float) {
99
if (alpha <= 0.05) return;
1010
_text = 'Current Song Position: ${Math.floor(Conductor.songPosition * 1000) / 1000}';
1111
_text += '\n - ${Conductor.curBeat} beats';

source/funkin/backend/system/framerate/FlixelInfo.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class FlixelInfo extends FramerateCategory {
77
super("Flixel Info");
88
}
99

10-
public override function __enterFrame(t:Int) {
10+
public override function __enterFrame(t:Float) {
1111
if (alpha <= 0.05) return;
1212

1313

source/funkin/backend/system/framerate/Framerate.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class Framerate extends Sprite {
100100

101101

102102
var debugAlpha:Float = 0;
103-
public override function __enterFrame(t:Int) {
103+
public override function __enterFrame(t:Float) {
104104
alpha = CoolUtil.fpsLerp(alpha, debugMode > 0 ? 1 : 0, 0.5);
105105
debugAlpha = CoolUtil.fpsLerp(debugAlpha, debugMode > 1 ? 1 : 0, 0.5);
106106

0 commit comments

Comments
 (0)