From 908d560fa12dfee525e47ead6359a6c4b5fa8c06 Mon Sep 17 00:00:00 2001 From: lunarcleint <88809950+lunarcleint@users.noreply.github.com> Date: Wed, 20 Mar 2024 05:32:48 -0700 Subject: [PATCH] tommorow ui (and making this look good) --- source/funkin/editors/charter/Charter.hx | 8 +++++--- source/funkin/editors/charter/CharterWaveformHandler.hx | 4 +--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index afa94443..019bfeba 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -551,12 +551,14 @@ class Charter extends UIState { __relinkUndos(); __applyPlaytestInfo(); - /* var charterWaveHandler:CharterWaveformHandler = new CharterWaveformHandler(); - var waveShader:CustomShader = charterWaveHandler.generateShader("Inst.ogg", FlxG.sound.music); + charterWaveHandler.ampsNeeded = __endStep*40; + var waveShader:CustomShader = charterWaveHandler.generateShader("Voices.ogg", vocals); for (grid in gridBackdrops) grid.waveformSprite.shader = waveShader; - */ + + var dataDisplay:FlxSprite = new FlxSprite().loadGraphic(charterWaveHandler.waveDatas.get("Voices.ogg")); + dataDisplay.cameras = [charterCamera]; dataDisplay.x = -dataDisplay.width; add(dataDisplay); } public var __endStep:Float = 0; diff --git a/source/funkin/editors/charter/CharterWaveformHandler.hx b/source/funkin/editors/charter/CharterWaveformHandler.hx index 24e8a763..346b856d 100644 --- a/source/funkin/editors/charter/CharterWaveformHandler.hx +++ b/source/funkin/editors/charter/CharterWaveformHandler.hx @@ -34,10 +34,8 @@ class CharterWaveformHandler extends FlxBasic { var pixelsNeeded:Int = Math.floor(ampsNeeded/3); if ((ampsNeeded/3) % 1 > 0) pixelsNeeded += 1; - var WRAP:Int = 500; // should be ampSqrt - var waveData:BitmapData = new BitmapData( - WRAP, 1+Math.floor(pixelsNeeded/WRAP), true, 0xFF000000 + ampSqrt, 1+Math.floor(pixelsNeeded/ampSqrt), true, 0xFF000000 ); for (y in 0...waveData.height)