diff --git a/assets/data/characters/gf-christmas.xml b/assets/data/characters/gf-christmas.xml
index 2c471f2e..81389b0e 100644
--- a/assets/data/characters/gf-christmas.xml
+++ b/assets/data/characters/gf-christmas.xml
@@ -8,24 +8,4 @@
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/assets/data/characters/gf.xml b/assets/data/characters/gf.xml
index 38a24f75..54a09ad8 100644
--- a/assets/data/characters/gf.xml
+++ b/assets/data/characters/gf.xml
@@ -10,24 +10,4 @@
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/buildnumber.txt b/buildnumber.txt
index 7ada46f0..8ea0a3e6 100644
--- a/buildnumber.txt
+++ b/buildnumber.txt
@@ -1 +1 @@
-970
\ No newline at end of file
+971
\ No newline at end of file
diff --git a/latest/windows/bin/assets/data/characters/gf-christmas.xml b/latest/windows/bin/assets/data/characters/gf-christmas.xml
index 2c471f2e..81389b0e 100644
--- a/latest/windows/bin/assets/data/characters/gf-christmas.xml
+++ b/latest/windows/bin/assets/data/characters/gf-christmas.xml
@@ -8,24 +8,4 @@
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/latest/windows/bin/assets/data/characters/gf.xml b/latest/windows/bin/assets/data/characters/gf.xml
index 38a24f75..54a09ad8 100644
--- a/latest/windows/bin/assets/data/characters/gf.xml
+++ b/latest/windows/bin/assets/data/characters/gf.xml
@@ -10,24 +10,4 @@
-
-
-
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/source/funkin/game/Note.hx b/source/funkin/game/Note.hx
index 987962c4..137194ea 100644
--- a/source/funkin/game/Note.hx
+++ b/source/funkin/game/Note.hx
@@ -212,7 +212,6 @@ class Note extends FlxSprite
}
public function setClipRect(rect:FlxRect) {
- // TODO: Shader ClipRect like in Yoshi Engine for smoother sustains
this.clipRect = rect;
}
}
diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx
index 4f8cb66a..d1a16881 100644
--- a/source/funkin/game/PlayState.hx
+++ b/source/funkin/game/PlayState.hx
@@ -279,7 +279,6 @@ class PlayState extends MusicBeatState
FlxG.worldBounds.set(0, 0, FlxG.width, FlxG.height);
- // TODO: cool healthbar
healthBarBG = new FlxSprite(0, FlxG.height * 0.9).loadGraphic(Paths.image('game/healthBar'));
healthBarBG.screenCenter(X);
healthBarBG.scrollFactor.set();
@@ -591,7 +590,6 @@ class PlayState extends MusicBeatState
override function openSubState(SubState:FlxSubState)
{
- // TODO: Cancellable substate opening.
var event = scripts.event("onSubstateOpen", new SubstateEvent(SubState));
if (event.cancelled) return;
@@ -613,7 +611,6 @@ class PlayState extends MusicBeatState
override function closeSubState()
{
- // TODO: Cancellable substate opening.
var event = scripts.event("onSubstateClose", new SubstateEvent(subState));
if (event.cancelled) return;
@@ -755,7 +752,6 @@ class PlayState extends MusicBeatState
// FlxG.watch.addQuick('VOL', vocals.amplitudeLeft);
// FlxG.watch.addQuick('VOLRight', vocals.amplitudeRight);
- // TODO: FPS-compatible lerping
iconP1.scale.set(lerp(iconP1.scale.x, 1, 0.33), lerp(iconP1.scale.y, 1, 0.33));
iconP2.scale.set(lerp(iconP2.scale.x, 1, 0.33), lerp(iconP2.scale.y, 1, 0.33));
@@ -957,9 +953,8 @@ class PlayState extends MusicBeatState
}
if (event.__autoCPUHit && !daNote.mustPress && !daNote.wasGoodHit && daNote.strumTime <= Conductor.songPosition) goodNoteHit(daNote);
- // TODO: FIXED STEP CROCHET PER NOTES FOR BPM CHANGES
- if (daNote.wasGoodHit && daNote.isSustainNote && daNote.strumTime + (Conductor.stepCrochet) < Conductor.songPosition) {
+ if (daNote.wasGoodHit && daNote.isSustainNote && daNote.strumTime + (daNote.stepLength) < Conductor.songPosition) {
deleteNote(daNote);
return;
}
@@ -1013,7 +1008,6 @@ class PlayState extends MusicBeatState
if (storyPlaylist.length <= 0)
{
- FlxG.sound.playMusic(Paths.music('freakyMenu'));
transIn = FlxTransitionableState.defaultTransIn;
transOut = FlxTransitionableState.defaultTransOut;
diff --git a/source/funkin/menus/MainMenuState.hx b/source/funkin/menus/MainMenuState.hx
index b4826796..901eb256 100644
--- a/source/funkin/menus/MainMenuState.hx
+++ b/source/funkin/menus/MainMenuState.hx
@@ -47,10 +47,7 @@ class MainMenuState extends MusicBeatState
transIn = FlxTransitionableState.defaultTransIn;
transOut = FlxTransitionableState.defaultTransOut;
- if (FlxG.sound.music == null || !FlxG.sound.music.playing)
- {
- FlxG.sound.playMusic(Paths.music('freakyMenu'));
- }
+ CoolUtil.playMenuSong();
persistentUpdate = persistentDraw = true;
diff --git a/source/funkin/menus/StoryMenuState.hx b/source/funkin/menus/StoryMenuState.hx
index dcae2f84..85d0f5a1 100644
--- a/source/funkin/menus/StoryMenuState.hx
+++ b/source/funkin/menus/StoryMenuState.hx
@@ -76,11 +76,7 @@ class StoryMenuState extends MusicBeatState
override function create()
{
- if (FlxG.sound.music != null)
- {
- if (!FlxG.sound.music.playing)
- FlxG.sound.playMusic(Paths.music('freakyMenu'));
- }
+ CoolUtil.playMenuSong();
persistentUpdate = persistentDraw = true;
diff --git a/source/funkin/menus/TitleState.hx b/source/funkin/menus/TitleState.hx
index 90e9e25b..652fc7bf 100644
--- a/source/funkin/menus/TitleState.hx
+++ b/source/funkin/menus/TitleState.hx
@@ -59,12 +59,8 @@ class TitleState extends MusicBeatState
function startIntro()
{
if (!initialized)
- {
- FlxG.sound.playMusic(Paths.music('freakyMenu'), 0);
- FlxG.sound.music.fadeIn(4, 0, 0.7);
- }
+ CoolUtil.playMenuSong(true);
- Conductor.changeBPM(102);
persistentUpdate = true;
loadXML();
diff --git a/source/funkin/system/CoolUtil.hx b/source/funkin/system/CoolUtil.hx
index e2933c0a..3ed817fe 100644
--- a/source/funkin/system/CoolUtil.hx
+++ b/source/funkin/system/CoolUtil.hx
@@ -104,6 +104,18 @@ class CoolUtil
return null;
}
+ public static function playMenuSong(fadeIn:Bool) {
+ if (FlxG.sound.music == null || !FlxG.sound.music.playing)
+ {
+ Conductor.reset();
+
+ // TODO: bpm from config
+ Conductor.changeBPM(102);
+ FlxG.sound.playMusic(Paths.music('freakyMenu'), fadeIn ? 0 : 1);
+ if (fadeIn)
+ FlxG.sound.music.fadeIn(4, 0, 0.7);
+ }
+ }
/**
* Plays a specified Menu SFX.
* @param menuSFX Menu SFX to play
diff --git a/source/funkin/system/Main.hx b/source/funkin/system/Main.hx
index 841dcc31..e80f81a0 100644
--- a/source/funkin/system/Main.hx
+++ b/source/funkin/system/Main.hx
@@ -106,9 +106,6 @@ class Main extends Sprite
public function loadGameSettings() {
- funkin.options.PlayerSettings.init();
- FlxG.save.bind('Save');
- Highscore.load();
// TODO: Mod switching
ModsFolder.init();
@@ -127,16 +124,31 @@ class Main extends Sprite
File.saveContent("./../../../../buildnumber.txt", Std.string(buildNum));
}
#end
-
- FlxG.fixedTimestep = false;
- // FlxG.autoPause = false;
+ funkin.options.PlayerSettings.init();
+ FlxG.save.bind('Save');
Options.load();
+ Highscore.load();
+
+ FlxG.fixedTimestep = false;
Conductor.init();
AudioSwitchFix.init();
WindowsAPI.setDarkMode(true);
+
+ #if desktop
+ DiscordClient.initialize();
+
+ Application.current.onExit.add (function (exitCode) {
+ DiscordClient.shutdown();
+ });
+ #end
+
+ initTransition();
+ }
+
+ public static function initTransition() {
var diamond:FlxGraphic = FlxGraphic.fromClass(GraphicTransTileDiamond);
diamond.persist = true;
diamond.destroyOnNoUse = false;
@@ -146,12 +158,5 @@ class Main extends Sprite
FlxTransitionableState.defaultTransOut = new TransitionData(FADE, 0xFF000000, 0.7, new FlxPoint(0, 1),
{asset: diamond, width: 32, height: 32}, new FlxRect(-200, -200, FlxG.width * 1.4, FlxG.height * 1.4));
- #if desktop
- DiscordClient.initialize();
-
- Application.current.onExit.add (function (exitCode) {
- DiscordClient.shutdown();
- });
- #end
}
}
diff --git a/source/openfl/media/Sound.hx b/source/openfl/media/Sound.hx
index 1ecffcd2..bc073477 100644
--- a/source/openfl/media/Sound.hx
+++ b/source/openfl/media/Sound.hx
@@ -439,7 +439,7 @@ class Sound extends EventDispatcher
#if lime
#if (js && html5)
- var defaultLibrary = lime.utils.Assets.getLibrary("default"); // TODO: Improve this
+ var defaultLibrary = lime.utils.Assets.getLibrary("default");
if (defaultLibrary != null && defaultLibrary.cachedAudioBuffers.exists(url))
{