From 7a811cbb7404c66e0f5b3df12acf7b7e11c69465 Mon Sep 17 00:00:00 2001
From: Microkat <89645987+KadePleaseHelpMe@users.noreply.github.com>
Date: Thu, 16 Jan 2025 12:36:52 -0500
Subject: [PATCH 1/4] Add cne-flxsvg lib
---
libs.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/libs.xml b/libs.xml
index f932da098..d29c58d24 100644
--- a/libs.xml
+++ b/libs.xml
@@ -13,6 +13,7 @@
+
From 01a8e41cb5b818755142f3770e0ae8ff7a027b3c Mon Sep 17 00:00:00 2001
From: Microkat <89645987+KadePleaseHelpMe@users.noreply.github.com>
Date: Thu, 16 Jan 2025 12:38:28 -0500
Subject: [PATCH 2/4] Add haxelib to project
---
project.xml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/project.xml b/project.xml
index 6f01bc102..a5d31274b 100644
--- a/project.xml
+++ b/project.xml
@@ -180,6 +180,8 @@
+
+
From 4d18e94e3f11131121a0ac6df67df1681f90f8b4 Mon Sep 17 00:00:00 2001
From: Microkat <89645987+KadePleaseHelpMe@users.noreply.github.com>
Date: Thu, 16 Jan 2025 12:39:06 -0500
Subject: [PATCH 3/4] Add SVG path
---
source/funkin/backend/assets/Paths.hx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/source/funkin/backend/assets/Paths.hx b/source/funkin/backend/assets/Paths.hx
index 397838237..d99042d92 100644
--- a/source/funkin/backend/assets/Paths.hx
+++ b/source/funkin/backend/assets/Paths.hx
@@ -200,6 +200,8 @@ class Paths
return tempFramesCache[key] = loadFrames(assetsPath ? key : Paths.image(key, library, true));
}
+ inline static public function svg(key:String, ?library:String)
+ return Assets.getText(image(key, library, false, "svg"));
/**
* Loads frames from a specific image path. Supports Sparrow Atlases, Packer Atlases, and multiple spritesheets.
@@ -340,4 +342,4 @@ class ScriptPathInfo {
this.file = file;
this.library = library;
}
-}
\ No newline at end of file
+}
From cfbd83427f113e2bfc1c7d0d698e27d99c6f5581 Mon Sep 17 00:00:00 2001
From: Microkat <89645987+KadePleaseHelpMe@users.noreply.github.com>
Date: Thu, 16 Jan 2025 12:39:42 -0500
Subject: [PATCH 4/4] Should make it available for HScript
---
source/funkin/backend/system/macros/Macros.hx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/source/funkin/backend/system/macros/Macros.hx b/source/funkin/backend/system/macros/Macros.hx
index 9183e4a4e..36f108942 100644
--- a/source/funkin/backend/system/macros/Macros.hx
+++ b/source/funkin/backend/system/macros/Macros.hx
@@ -21,6 +21,7 @@ class Macros {
// OTHER LIBRARIES & STUFF
#if THREE_D_SUPPORT "away3d", "flx3d", #end
#if VIDEO_CUTSCENES "hxvlc.flixel", "hxvlc.openfl", #end
+ "flxsvg",
// BASE HAXE
"DateTools", "EReg", "Lambda", "StringBuf", "haxe.crypto", "haxe.display", "haxe.exceptions", "haxe.extern", "scripting"
])
@@ -47,4 +48,4 @@ class Macros {
HashLinkFixer.init();
}
}
-#end
\ No newline at end of file
+#end