Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add modcharting features (using FunkinModchart) #526

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion FEATURES.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,5 @@ _**QOL = Quality of Life**_
- Features not found in other editors!
- Every single state & substate can be modified via HScript (`data/states/StateName.hx`)
- **Instances launched via `lime test windows` will automatically use assets from source.**
</details>
- Modcharting features powered by [FunkinModchart](https://lib.haxe.org/p/funkin-modchart/).
</details>
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,5 @@ In the future (when the engine won't be a WIP anymore) we're gonna also publish
- Credits to the [FlxAnimate](https://github.com/Dot-Stuff/flxanimate) team for the Animate Atlas support
- Credits to Smokey555 for the backup Animate Atlas to spritesheet code
- Credits to MAJigsaw77 for [hxvlc](https://github.com/MAJigsaw77/hxvlc) (video cutscene/mp4 support) and [hxdiscord_rpc](https://github.com/MAJigsaw77/hxdiscord_rpc) (discord rpc integration)
- Credits to [TheoDev](https://github.com/TheoDevelops) for [FunkinModchart](https://lib.haxe.org/p/funkin-modchart/). ***(library used for modcharting features)***
</details>
1 change: 1 addition & 0 deletions libs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<git name="flxanimate" url="https://github.com/CodenameCrew/cne-flxanimate" />
<git name="hxdiscord_rpc" url="https://github.com/CodenameCrew/cne-hxdiscord_rpc" />
<lib name="hxvlc" version="1.9.3" skipDeps="true" />
<lib name="funkin-modchart" />

<!-- Documentation and other features -->
<git name="away3d" url="https://github.com/CodenameCrew/away3d" />
Expand Down
10 changes: 10 additions & 0 deletions project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@
<!-- Comment this out to disable dark mode windows -->
<define name="DARK_MODE_WINDOW"/>

<!-- Comment this out to disable modcharting features -->
<define name="MODCHARTING_FEATURES"/>

<haxedef name="VIDEO_CUTSCENES" if="VIDEO_CUTSCENES" />
<haxedef name="UPDATE_CHECKING" if="UPDATE_CHECKING" />
<haxedef name="DISCORD_RPC" if="DISCORD_RPC" />
Expand Down Expand Up @@ -181,6 +184,13 @@
<haxelib name="markdown" />

<!-- _________________________________ Additional stuff _______________________________ -->

<section if="MODCHARTING_FEATURES">
<haxedef name="FM_ENGINE" value="CODENAME"/>
<haxedef name="FM_ENGINE_VERSION" value="1.0"/>

<haxelib name="funkin-modchart" />
</section>

<section if="COMPILE_ALL_CLASSES">
<haxeflag name="-dce" value="no" />
Expand Down
3 changes: 3 additions & 0 deletions source/funkin/options/Options.hx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class Options
public static var songOffset:Float = 0;
public static var framerate:Int = 120;
public static var gpuOnlyBitmaps:Bool = #if (mac || web) false #else true #end; // causes issues on mac and web
#if MODCHARTING_FEATURES
public static var hold_subs:Int = 4;
#end

public static var lastLoadedMod:String = null;

Expand Down
12 changes: 11 additions & 1 deletion source/funkin/options/categories/AppearanceOptions.hx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ class AppearanceOptions extends OptionsScreen {
"gpuOnlyBitmaps"));
}
#end
#if MODCHARTING_FEATURES
add(new NumOption(
"Hold Subdivitions",
"[Modcharting Feature] Softens the tail/hold/sustain of the arrows by subdividing it, giving them greater quality. By higher the subdivitions number is, performance will be affected.",
1, // minimum
128, // maximum
1, // change
"hold_subs", // save name or smth
)); // callback
#end
add(new Checkbox(
"Auto Pause",
"If checked, switching windows will pause the game.",
Expand All @@ -56,4 +66,4 @@ class AppearanceOptions extends OptionsScreen {
else
FlxG.updateFramerate = FlxG.drawFramerate = Std.int(change);
}
}
}