From 7c6bf7ef452575265a348a48346f6051b92499ea Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 24 Apr 2024 23:50:11 -0400 Subject: [PATCH 1/4] Fix the alignment of the song name in the results screen --- source/funkin/play/ResultState.hx | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/source/funkin/play/ResultState.hx b/source/funkin/play/ResultState.hx index acce8645a..c4f32427f 100644 --- a/source/funkin/play/ResultState.hx +++ b/source/funkin/play/ResultState.hx @@ -161,9 +161,13 @@ class ResultState extends MusicBeatSubState songName = new FlxBitmapText(FlxBitmapFont.fromMonospace(Paths.image("resultScreen/tardlingSpritesheet"), fontLetters, FlxPoint.get(49, 62))); songName.text = params.title; songName.letterSpacing = -15; - songName.angle = -4.1; + songName.angle = -4.4; add(songName); + var angleRad = songName.angle * Math.PI / 180; + speedOfTween.x = -1.0 * Math.cos(angleRad); + speedOfTween.y = -1.0 * Math.sin(angleRad); + timerThenSongName(); songName.shader = maskShaderSongName; @@ -319,7 +323,7 @@ class ResultState extends MusicBeatSubState difficulty.y = -difficulty.height; FlxTween.tween(difficulty, {y: diffYTween}, 0.5, {ease: FlxEase.quartOut, startDelay: 0.8}); - songName.y = diffYTween - 30; + songName.y = diffYTween - 35; songName.x = (difficulty.x + difficulty.width) + 20; new FlxTimer().start(3, _ -> { @@ -328,7 +332,7 @@ class ResultState extends MusicBeatSubState } var movingSongStuff:Bool = false; - var speedOfTween:FlxPoint = FlxPoint.get(-1, 0.1); + var speedOfTween:FlxPoint = FlxPoint.get(-1, 1); override function draw():Void { @@ -369,14 +373,6 @@ class ResultState extends MusicBeatSubState speedOfTween.x -= 0.1; } - if (FlxG.keys.justPressed.UP) speedOfTween.y -= 0.1; - - if (FlxG.keys.justPressed.DOWN) speedOfTween.y += 0.1; - - if (FlxG.keys.justPressed.PERIOD) songName.angle += 0.1; - - if (FlxG.keys.justPressed.COMMA) songName.angle -= 0.1; - if (controls.PAUSE) { FlxTween.tween(FlxG.sound.music, {volume: 0}, 0.8); From dd90d430eea9212610c7202121d68e490cacca5d Mon Sep 17 00:00:00 2001 From: EliteMasterEric Date: Wed, 24 Apr 2024 23:50:19 -0400 Subject: [PATCH 2/4] Replace the zoom with a fade (for now) --- source/funkin/play/PlayState.hx | 37 ++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 6e1452aa9..bfe9a7bf9 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -3020,23 +3020,30 @@ class PlayState extends MusicBeatSubState if (targetBF) { FlxG.camera.follow(currentStage.getBoyfriend(), null, 0.05); - FlxG.camera.targetOffset.y -= 350; - FlxG.camera.targetOffset.x += 20; } else if (targetDad) { FlxG.camera.follow(currentStage.getDad(), null, 0.05); - FlxG.camera.targetOffset.y -= 350; - FlxG.camera.targetOffset.x += 20; } else { FlxG.camera.follow(currentStage.getGirlfriend(), null, 0.05); - FlxG.camera.targetOffset.y -= 350; - FlxG.camera.targetOffset.x += 20; } - FlxTween.tween(camHUD, {alpha: 0}, 0.6); + // TODO: Make target offset configurable. + // In the meantime, we have to replace the zoom animation with a fade out. + FlxG.camera.targetOffset.y -= 350; + FlxG.camera.targetOffset.x += 20; + + // Replace zoom animation with a fade out for now. + camGame.fade(FlxColor.BLACK, 0.6); + + FlxTween.tween(camHUD, {alpha: 0}, 0.6, + { + onComplete: function(_) { + moveToResultsScreen(isNewHighscore); + } + }); // Zoom in on Girlfriend (or BF if no GF) new FlxTimer().start(0.8, function(_) { @@ -3054,13 +3061,13 @@ class PlayState extends MusicBeatSubState } // Zoom over to the Results screen. - FlxTween.tween(FlxG.camera, {zoom: 1200}, 1.1, - { - ease: FlxEase.expoIn, - onComplete: function(_) { - moveToResultsScreen(isNewHighscore); - } - }); + // TODO: Re-enable this. + /* + FlxTween.tween(FlxG.camera, {zoom: 1200}, 1.1, + { + ease: FlxEase.expoIn, + }); + */ }); } @@ -3247,7 +3254,7 @@ class PlayState extends MusicBeatSubState SongEventRegistry.handleSkippedEvents(songEvents, Conductor.instance.songPosition); // regenNoteData(FlxG.sound.music.time); - Conductor.instance.update(FlxG.sound.music.time); + Conductor.instance.update(FlxG.sound?.music?.time ?? 0.0); resyncVocals(); } From 12b5d6d086122539d8d276ae82e4c4d71443c6d8 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 25 Apr 2024 01:53:13 -0400 Subject: [PATCH 3/4] some result screen polish --- source/funkin/play/ResultState.hx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/source/funkin/play/ResultState.hx b/source/funkin/play/ResultState.hx index c4f32427f..04080d80e 100644 --- a/source/funkin/play/ResultState.hx +++ b/source/funkin/play/ResultState.hx @@ -164,6 +164,8 @@ class ResultState extends MusicBeatSubState songName.angle = -4.4; add(songName); + songName.x = FlxG.width; + var angleRad = songName.angle * Math.PI / 180; speedOfTween.x = -1.0 * Math.cos(angleRad); speedOfTween.y = -1.0 * Math.sin(angleRad); @@ -321,12 +323,18 @@ class ResultState extends MusicBeatSubState var diffYTween:Float = 122; difficulty.y = -difficulty.height; - FlxTween.tween(difficulty, {y: diffYTween}, 0.5, {ease: FlxEase.quartOut, startDelay: 0.8}); + FlxTween.tween(difficulty, {y: diffYTween}, 0.5, {ease: FlxEase.expoOut, startDelay: 0.8}); - songName.y = diffYTween - 35; + songName.y = -songName.height; + FlxTween.tween(songName, {y: diffYTween - 35}, 0.5, {ease: FlxEase.expoOut, startDelay: 0.9}); songName.x = (difficulty.x + difficulty.width) + 20; new FlxTimer().start(3, _ -> { + var tempSpeed = FlxPoint.get(speedOfTween.x, speedOfTween.y); + + speedOfTween.set(0, 0); + FlxTween.tween(speedOfTween, {x: tempSpeed.x, y: tempSpeed.y}, 0.7, {ease: FlxEase.quadIn}); + movingSongStuff = true; }); } From 7d2713a731a0e96975ee3c0f06126963545b121d Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Thu, 25 Apr 2024 01:55:51 -0400 Subject: [PATCH 4/4] this doesn't need to be here --- source/funkin/play/ResultState.hx | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/funkin/play/ResultState.hx b/source/funkin/play/ResultState.hx index 04080d80e..69acb36b5 100644 --- a/source/funkin/play/ResultState.hx +++ b/source/funkin/play/ResultState.hx @@ -164,8 +164,6 @@ class ResultState extends MusicBeatSubState songName.angle = -4.4; add(songName); - songName.x = FlxG.width; - var angleRad = songName.angle * Math.PI / 180; speedOfTween.x = -1.0 * Math.cos(angleRad); speedOfTween.y = -1.0 * Math.sin(angleRad);