From 40a6f970a78f1db5b90c49e6f97657664bba14c5 Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Sun, 22 Sep 2024 15:34:17 +0200 Subject: [PATCH 1/7] Release lime --- libs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs.xml b/libs.xml index b086a148..dccbef12 100644 --- a/libs.xml +++ b/libs.xml @@ -46,7 +46,7 @@ Rebuilding Lime... - + --> From cf63d2608e8bba11ef950e01135b4c9ec1ddebf9 Mon Sep 17 00:00:00 2001 From: swordcube <49110074+swordcube@users.noreply.github.com> Date: Mon, 23 Sep 2024 17:10:39 -0500 Subject: [PATCH 2/7] Fix oversight in FNFLegacyParser.hx We were pushing the Codename note data into FNF Legacy sectionNotes, which is invalid and caused invalid chart exports so uh i fixed that in dev but forgot to publicly fix it Fuck --- source/funkin/backend/chart/FNFLegacyParser.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/backend/chart/FNFLegacyParser.hx b/source/funkin/backend/chart/FNFLegacyParser.hx index ddf1588c..ede54e18 100644 --- a/source/funkin/backend/chart/FNFLegacyParser.hx +++ b/source/funkin/backend/chart/FNFLegacyParser.hx @@ -132,7 +132,7 @@ class FNFLegacyParser { if ((swagSection.mustHitSection && strumLine.type == OPPONENT) || (!swagSection.mustHitSection && strumLine.type == PLAYER)) sectionNote[1] += 4; - swagSection.sectionNotes.push(note); + swagSection.sectionNotes.push(sectionNote); } } From e46f5ea051af6603dc9570621cd070862c3c74fe Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Tue, 24 Sep 2024 00:15:59 +0200 Subject: [PATCH 3/7] Fix incorrect type --- source/funkin/backend/chart/FNFLegacyParser.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/funkin/backend/chart/FNFLegacyParser.hx b/source/funkin/backend/chart/FNFLegacyParser.hx index 0e5f55df..0d066a61 100644 --- a/source/funkin/backend/chart/FNFLegacyParser.hx +++ b/source/funkin/backend/chart/FNFLegacyParser.hx @@ -226,7 +226,7 @@ typedef SwagSong = typedef SwagSection = { - var sectionNotes:Array; + var sectionNotes:Array>; var lengthInSteps:Int; var ?sectionBeats:Float; var ?typeOfSection:Int; From 70c5561d5541adeaf993a448803dd63b4d57cb13 Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Fri, 27 Sep 2024 02:59:13 +0200 Subject: [PATCH 4/7] Added .git-blame-ignore-revs --- .git-blame-ignore-revs | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 00000000..96d12b21 --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,36 @@ +# You need to run the following command in your repository: +# +# git config blame.ignoreRevsFile .git-blame-ignore-revs +# +# afterwards, revisions specified in this file will be ignored in git blame +# any revision needs to be in a unabbreviated sha1 format +# see https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt for more information + +# A good format to use is: + +# # reason for ignoring the revisions +# + +# Removed unused imports & reordered imports +d17ea72c74bbbadac0bb00e11868dddf6aebd346 + +# ScriptPack revert +8a2ac9e1d4e51e688cd2339bdccd6b39ed7d52a3 + +# Spaces to tabs +a63e5f5958ed0643fab92e9d5708a4c26e5238a1 + +# Removed useless indentation and more spaces to tabs +f8b20774e3f035eeddb9211a28a391b20db74456 + +# Revert a revert +75f6bec8294e5b783368cfd7ae6e45698c326cb3 +4aa95838d7df9c307bcac6456e937081645a0f4a + +# Revert a revert (note types use int) +17e177a69554f4d798f5acdd3799687dc9f01a93 +008ad05bf1407d9772805ed69985cfbcde79e495 + +# Revert a revert (empty script) +392416e00cbd82e1c49e82a9fafdcf2e069a654e +159467de832a172681200c463d244a46e295c3c8 \ No newline at end of file From 120127b10c2f7138955df07412c3e114cb610b0e Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Tue, 1 Oct 2024 02:02:37 +0200 Subject: [PATCH 5/7] Small optimizations + bug fix for atlases --- source/funkin/backend/FlxAnimate.hx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/funkin/backend/FlxAnimate.hx b/source/funkin/backend/FlxAnimate.hx index 9f49f9ff..5f92e9a4 100644 --- a/source/funkin/backend/FlxAnimate.hx +++ b/source/funkin/backend/FlxAnimate.hx @@ -28,10 +28,13 @@ class FlxAnimate extends flxanimate.FlxAnimate { if (limb != _pivot) { if (frameOffsetAngle != null && frameOffsetAngle != angle) { - var angleOff = (-angle + frameOffsetAngle) * FlxAngle.TO_RAD; - rMatrix.rotate(-angleOff); + var angleOff = (frameOffsetAngle - angle) * FlxAngle.TO_RAD; + var cos = Math.cos(angleOff); + var sin = Math.sin(angleOff); + // cos doesnt need to be negated + rMatrix.rotateWithTrig(cos, -sin); rMatrix.translate(-frameOffset.x, -frameOffset.y); - rMatrix.rotate(angleOff); + rMatrix.rotateWithTrig(cos, sin); } else { From a8b6e8ed7264eb2d21392ab86ece8b5d24ece495 Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Tue, 1 Oct 2024 02:17:35 +0200 Subject: [PATCH 6/7] Workflow changes --- .github/workflows/linux.yml | 2 +- .github/workflows/macos.yml | 2 +- .github/workflows/windows.yml | 2 +- commandline/commands/Update.hx | 32 ++++++++++++++++++++++++++------ libs.xml | 2 +- 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 63a036bb..1efcfcfa 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -31,7 +31,7 @@ jobs: sudo apt-get install libvlc-dev libvlccore-dev - name: Installing/Updating libraries run: | - haxe -cp commandline -D analyzer-optimize --run Main setup + haxe -cp commandline -D analyzer-optimize --run Main setup -s - name: Building the game run: | haxelib run lime build linux diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index fa75491a..cdd60670 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -28,7 +28,7 @@ jobs: cache-build-mac - name: Installing/Updating libraries run: | - haxe -cp commandline -D analyzer-optimize --run Main setup + haxe -cp commandline -D analyzer-optimize --run Main setup -s - name: Building the game run: | haxelib run lime build mac diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 702bedc5..60976678 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -28,7 +28,7 @@ jobs: cache-build-windows - name: Installing/Updating libraries run: | - haxe -cp commandline -D analyzer-optimize --run Main setup + haxe -cp commandline -D analyzer-optimize --run Main setup -s - name: Building the game run: | haxelib run lime build windows diff --git a/commandline/commands/Update.hx b/commandline/commands/Update.hx index 6ac0f0f3..102cf0cd 100644 --- a/commandline/commands/Update.hx +++ b/commandline/commands/Update.hx @@ -6,21 +6,40 @@ import sys.io.File; import sys.io.Process; import sys.FileSystem; +using StringTools; + class Update { public static function main(args:Array) { - prettyPrint("Preparing installation..."); - // to prevent messing with currently installed libs if (!FileSystem.exists('.haxelib')) FileSystem.createDirectory('.haxelib'); + var filename = "./libs.xml"; + var isSilent = false; + for(arg in args) { + if (arg.startsWith("--lib=")) { + filename = arg.substr("--lib=".length); + } + if (arg == "--silent" || arg == "-s") { + isSilent = true; + } + } + + if(!FileSystem.exists(filename)) { + prettyPrint('Cannot find libs.xml file at "$filename"'); + return; + } + + prettyPrint("Preparing installation..."); + var libs:Array = []; - var libsXML:Access = new Access(Xml.parse(File.getContent('./libs.xml')).firstElement()); + var libsXML:Access = new Access(Xml.parse(File.getContent(filename)).firstElement()); for (libNode in libsXML.elements) { var lib:Library = { name: libNode.att.name, - type: libNode.name + type: libNode.name, + skipDeps: libNode.has.skipDeps ? libNode.att.skipDeps == "true" : false }; if (libNode.has.global) lib.global = libNode.att.global; switch (lib.type) { @@ -38,10 +57,10 @@ class Update { switch(lib.type) { case "lib": prettyPrint((lib.global == "true" ? "Globally installing" : "Locally installing") + ' "${lib.name}"...'); - Sys.command('haxelib install ${lib.name} ${lib.version != null ? " " + lib.version : " "}${globalism != null ? ' $globalism' : ''} --always'); + Sys.command('haxelib install ${lib.name} ${lib.version != null ? " " + lib.version : " "}${globalism != null ? ' $globalism' : ''}${lib.skipDeps ? " --skip-dependencies" : ""} --always${isSilent ? " --quiet" : ""}'); case "git": prettyPrint((lib.global == "true" ? "Globally installing" : "Locally installing") + ' "${lib.name}" from git url "${lib.url}"'); - Sys.command('haxelib git ${lib.name} ${lib.url}${lib.ref != null ? ' ${lib.ref}' : ''}${globalism != null ? ' $globalism' : ''} --always'); + Sys.command('haxelib git ${lib.name} ${lib.url}${lib.ref != null ? ' ${lib.ref}' : ''}${globalism != null ? ' $globalism' : ''}${lib.skipDeps ? " --skip-dependencies" : ""} --always${isSilent ? " --quiet" : ""}'); default: prettyPrint('Cannot resolve library of type "${lib.type}"'); } @@ -123,6 +142,7 @@ class Update { typedef Library = { var name:String; var type:String; + var skipDeps:Bool; var ?global:String; var ?version:String; var ?ref:String; diff --git a/libs.xml b/libs.xml index cfdec718..4218feeb 100644 --- a/libs.xml +++ b/libs.xml @@ -12,7 +12,7 @@ - + From fc0a39fa6a7ee256c028e2d09b6afcb5228d6f14 Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Wed, 2 Oct 2024 21:25:09 +0200 Subject: [PATCH 7/7] small change --- source/funkin/backend/assets/Paths.hx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/funkin/backend/assets/Paths.hx b/source/funkin/backend/assets/Paths.hx index d7567b82..e10bf5c5 100644 --- a/source/funkin/backend/assets/Paths.hx +++ b/source/funkin/backend/assets/Paths.hx @@ -76,14 +76,16 @@ class Paths inline static public function voices(song:String, difficulty:String = "normal", ?prefix:String = "") { - var diff = getPath('songs/${song.toLowerCase()}/song/Voices$prefix-${difficulty.toLowerCase()}.$SOUND_EXT', null); - return OpenFlAssets.exists(diff) ? diff : getPath('songs/${song.toLowerCase()}/song/Voices$prefix.$SOUND_EXT', null); + song = song.toLowerCase(); + var diff = getPath('songs/${song}/song/Voices$prefix-${difficulty.toLowerCase()}.$SOUND_EXT', null); + return OpenFlAssets.exists(diff) ? diff : getPath('songs/${song}/song/Voices$prefix.$SOUND_EXT', null); } inline static public function inst(song:String, difficulty:String = "normal", ?prefix:String = "") { - var diff = getPath('songs/${song.toLowerCase()}/song/Inst$prefix-${difficulty.toLowerCase()}.$SOUND_EXT', null); - return OpenFlAssets.exists(diff) ? diff : getPath('songs/${song.toLowerCase()}/song/Inst$prefix.$SOUND_EXT', null); + song = song.toLowerCase(); + var diff = getPath('songs/${song}/song/Inst$prefix-${difficulty.toLowerCase()}.$SOUND_EXT', null); + return OpenFlAssets.exists(diff) ? diff : getPath('songs/${song}/song/Inst$prefix.$SOUND_EXT', null); } static public function image(key:String, ?library:String, checkForAtlas:Bool = false, ?ext:String = "png")