Skip to content

Commit

Permalink
abot now reacts to volume in desktop!
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesisfeline committed Sep 28, 2024
1 parent 260d22b commit 2d9d855
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions source/funkin/audio/visualize/ABotVis.hx
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,8 @@ class ABotVis extends FlxTypedSpriteGroup<FlxSprite>
var animFrame:Int = Math.round(levels[i].value * 5);

#if desktop
// Web version scales with the Flixel volume level.
// This line brings platform parity but looks worse.
// animFrame = Math.round(animFrame * FlxG.sound.volume);
// doesnt look the same as web, but for now yea it'll do
animFrame = Math.round(animFrame * (Math.round(FlxG.sound.logToLinear(FlxG.sound.volume) * 10) / 10));
#end

animFrame = Math.floor(Math.min(5, animFrame));
Expand Down
5 changes: 2 additions & 3 deletions source/funkin/ui/charSelect/CharSelectGF.hx
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ class CharSelectGF extends FlxAtlasSprite implements IBPMSyncedScriptedClass
var animFrame:Int = Math.round(levels[i].value * 12);

#if desktop
// Web version scales with the Flixel volume level.
// This line brings platform parity but looks worse.
// animFrame = Math.round(animFrame * FlxG.sound.volume);
// doesnt look the same as web, but for now yea it'll do
animFrame = Math.round(animFrame * (Math.round(FlxG.sound.logToLinear(FlxG.sound.volume) * 10) / 10));
#end

animFrame = Math.floor(Math.min(12, animFrame));
Expand Down

0 comments on commit 2d9d855

Please sign in to comment.