Skip to content

Commit

Permalink
Merge pull request FunkinCrew#2624 from Ethan-makes-music/main
Browse files Browse the repository at this point in the history
Remove alot of unused imoprts and comments (not even half)
  • Loading branch information
EliteMasterEric authored May 29, 2024
2 parents 7490b7e + 004ed32 commit fb137bc
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 47 deletions.
4 changes: 0 additions & 4 deletions source/funkin/api/newgrounds/NGUnsafe.hx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package funkin.api.newgrounds;

import flixel.util.FlxSignal;
import flixel.util.FlxTimer;
import lime.app.Application;
import openfl.display.Stage;
#if newgrounds
import io.newgrounds.NG;
import io.newgrounds.NGLite;
Expand Down
8 changes: 0 additions & 8 deletions source/funkin/api/newgrounds/NGio.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,11 @@ package funkin.api.newgrounds;

#if newgrounds
import flixel.util.FlxSignal;
import flixel.util.FlxTimer;
import io.newgrounds.NG;
import io.newgrounds.NGLite;
import io.newgrounds.components.ScoreBoardComponent.Period;
import io.newgrounds.objects.Error;
import io.newgrounds.objects.Medal;
import io.newgrounds.objects.Score;
import io.newgrounds.objects.ScoreBoard;
import io.newgrounds.objects.events.Response;
import io.newgrounds.objects.events.Result.GetCurrentVersionResult;
import io.newgrounds.objects.events.Result.GetVersionResult;
import lime.app.Application;
import openfl.display.Stage;
#end

/**
Expand Down
3 changes: 1 addition & 2 deletions source/funkin/audio/FunkinSound.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ import funkin.audio.waveform.WaveformDataParser;
import funkin.data.song.SongData.SongMusicData;
import funkin.data.song.SongRegistry;
import funkin.util.tools.ICloneable;
import openfl.Assets;
import openfl.media.SoundMixer;

#if (openfl >= "8.0.0")
import openfl.utils.AssetType;
#end

/**
Expand Down
2 changes: 0 additions & 2 deletions source/funkin/audio/VoicesGroup.hx
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package funkin.audio;

import funkin.audio.FunkinSound;
import flixel.group.FlxGroup.FlxTypedGroup;
import funkin.audio.waveform.WaveformData;
import funkin.audio.waveform.WaveformDataParser;

class VoicesGroup extends SoundGroup
{
Expand Down
4 changes: 0 additions & 4 deletions source/funkin/audio/visualize/ABotVis.hx
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package funkin.audio.visualize;

import funkin.audio.visualize.dsp.FFT;
import flixel.FlxSprite;
import flixel.addons.plugin.taskManager.FlxTask;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;
import flixel.math.FlxMath;
import flixel.sound.FlxSound;
import funkin.util.MathUtil;
import funkin.vis.dsp.SpectralAnalyzer;
import funkin.vis.audioclip.frontends.LimeAudioClip;

Expand Down
1 change: 0 additions & 1 deletion source/funkin/audio/visualize/PolygonVisGroup.hx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package funkin.audio.visualize;

import funkin.audio.visualize.PolygonSpectogram;
import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.sound.FlxSound;

Expand Down
12 changes: 0 additions & 12 deletions source/funkin/audio/visualize/SpectogramSprite.hx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import flixel.sound.FlxSound;
import flixel.util.FlxColor;
import funkin.audio.visualize.PolygonSpectogram.VISTYPE;
import funkin.audio.visualize.VisShit.CurAudioInfo;
import funkin.audio.visualize.dsp.FFT;
import lime.system.ThreadPool;
import lime.utils.Int16Array;

using Lambda;
Expand Down Expand Up @@ -38,8 +36,6 @@ class SpectogramSprite extends FlxTypedSpriteGroup<FlxSprite>
lengthOfShit = amnt;

regenLineShit();

// makeGraphic(200, 200, FlxColor.BLACK);
}

public function regenLineShit():Void
Expand Down Expand Up @@ -89,8 +85,6 @@ class SpectogramSprite extends FlxTypedSpriteGroup<FlxSprite>
{
checkAndSetBuffer();

// vis.checkAndSetBuffer();

if (setBuffer)
{
var samplesToGen:Int = Std.int(sampleRate * seconds);
Expand Down Expand Up @@ -191,7 +185,6 @@ class SpectogramSprite extends FlxTypedSpriteGroup<FlxSprite>
// a value between 10hz and 100Khz
var hzPicker:Float = Math.pow(10, powedShit);

// var sampleApprox:Int = Std.int(FlxMath.remapToRange(i, 0, group.members.length, startingSample, startingSample + samplesToGen));
var remappedFreq:Int = Std.int(FlxMath.remapToRange(hzPicker, 0, 10000, 0, freqShit[0].length - 1));

group.members[i].x = prevLine.x;
Expand All @@ -211,8 +204,6 @@ class SpectogramSprite extends FlxTypedSpriteGroup<FlxSprite>
var line = FlxPoint.get(prevLine.x - group.members[i].x, prevLine.y - group.members[i].y);

// dont draw a line until i figure out a nicer way to view da spikes and shit idk lol!
// group.members[i].setGraphicSize(Std.int(Math.max(line.length, 1)), Std.int(1));
// group.members[i].angle = line.degrees;
}
}
}
Expand Down Expand Up @@ -261,9 +252,6 @@ class SpectogramSprite extends FlxTypedSpriteGroup<FlxSprite>

group.members[Std.int(remappedSample)].x = prevLine.x;
group.members[Std.int(remappedSample)].y = prevLine.y;
// group.members[0].y = prevLine.y;

// FlxSpriteUtil.drawLine(this, prevLine.x, prevLine.y, width * remappedSample, left * height / 2 + height / 2);
prevLine.x = (curAud.balanced * swagheight / 2 + swagheight / 2) + x;
prevLine.y = (Std.int(remappedSample) / lengthOfShit * daHeight) + y;

Expand Down
5 changes: 0 additions & 5 deletions source/funkin/audio/visualize/VisShit.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package funkin.audio.visualize;
import flixel.math.FlxMath;
import flixel.sound.FlxSound;
import funkin.audio.visualize.dsp.FFT;
import lime.system.ThreadPool;
import lime.utils.Int16Array;
import funkin.util.MathUtil;

Expand Down Expand Up @@ -73,9 +72,6 @@ class VisShit

freqOutput.push([]);

// if (FlxG.keys.justPressed.M)
// trace(FFT.rfft(chunk).map(z -> z.scale(1 / fs).magnitude));

// find spectral peaks and their instantaneous frequencies
for (k => s in freqs)
{
Expand All @@ -91,7 +87,6 @@ class VisShit
if (freq < maxFreq) freqOutput[indexOfArray].push(power);
//
}
// haxe.Log.trace("", null);

indexOfArray++;
// move to next (overlapping) chunk
Expand Down
2 changes: 0 additions & 2 deletions source/funkin/audio/visualize/dsp/FFT.hx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package funkin.audio.visualize.dsp;

import funkin.audio.visualize.dsp.Complex;

using funkin.audio.visualize.dsp.OffsetArray;
using funkin.audio.visualize.dsp.Signal;

Expand Down
2 changes: 0 additions & 2 deletions source/funkin/audio/waveform/WaveformData.hx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package funkin.audio.waveform;

import funkin.util.MathUtil;

@:nullSafety
class WaveformData
{
Expand Down
2 changes: 0 additions & 2 deletions source/funkin/audio/waveform/WaveformSprite.hx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package funkin.audio.waveform;

import funkin.audio.waveform.WaveformData;
import funkin.audio.waveform.WaveformDataParser;
import funkin.graphics.rendering.MeshRender;
import flixel.util.FlxColor;

Expand Down
2 changes: 0 additions & 2 deletions source/funkin/data/dialogue/conversation/ConversationData.hx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package funkin.data.dialogue.conversation;

import funkin.data.animation.AnimationData;

/**
* A type definition for the data for a specific conversation.
* It includes things like what dialogue boxes to use, what text to display, and what animations to play.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package funkin.data.dialogue.conversation;

import funkin.play.cutscene.dialogue.Conversation;
import funkin.data.dialogue.conversation.ConversationData;
import funkin.play.cutscene.dialogue.ScriptedConversation;

class ConversationRegistry extends BaseRegistry<Conversation, ConversationData>
Expand Down

0 comments on commit fb137bc

Please sign in to comment.