Modified every file in the codebase to solve a single bug.

This commit is contained in:
Eric Myllyoja 2022-03-08 03:13:53 -05:00
parent 7f9cd6824c
commit 404b2b648e
123 changed files with 1254 additions and 1308 deletions

View file

@ -2,7 +2,7 @@
<project>
<!-- _________________________ Application Settings _________________________ -->
<app title="Friday Night Funkin'" file="Funkin" packageName="com.funkin.fnf" package="com.funkin.fnf" main="Main" version="0.2.8" company="ninjamuffin99" />
<app title="Friday Night Funkin'" file="Funkin" packageName="com.funkin.fnf" package="com.funkin.fnf" main="Main" version="0.3.0" company="ninjamuffin99" />
<!--Switch Export with Unique ApplicationID and Icon-->
<set name="APP_ID" value="0x0100f6c013bbc000" />
@ -181,13 +181,23 @@
<!--Enable this for Nape release builds for a serious peformance improvement-->
<haxedef name="NAPE_RELEASE_BUILD" unless="debug" />
<!-- _________________________________ Custom _______________________________ -->
<!-- Disable trace() calls in release builds to bump up performance. -->
<haxeflag name="--no-traces" unless="debug" />
<!-- HScript relies heavily on Reflection, which means we can't use DCE. -->
<haxeflag name="--dce no" />
<haxeflag name="-dce no" />
<haxeflag name="--macro" value="include('funkin')" />
<!-- Necessary to provide stack traces for HScript. -->
<haxedef name="hscriptPos" />
<haxedef name="HXCPP_CHECK_POINTER" />
<haxedef name="HXCPP_STACK_LINE" />
<!-- _________________________________ Custom _______________________________ -->
<!-- This macro allows addition of new functionality to existing Flixel. -->
<haxeflag name="--macro" value="addMetadata('@:build(funkin.util.macro.FlxMacro.buildFlxBasic())', 'flixel.FlxBasic')" />
<!--Place custom nodes like icons here (higher priority to override the HaxeFlixel icon)-->
@ -196,13 +206,6 @@
<icon path="art/icon64.png" size='64' />
<icon path="art/iconOG.png" />
<!--
aww yeah hackerman time, run a macro on the class rather than edit it
took me a while to get this working but turns out the classname comes SECOND
-->
<haxeflag name="--macro" value="addMetadata('@:build(util.macro.FlxMacro.buildFlxBasic())', 'flixel.FlxBasic')" />
<haxeflag name="--macro" value="include('modding.base')" />
<!-- <haxedef name="SKIP_TO_PLAYSTATE" if="debug" /> -->
<haxedef name="CAN_OPEN_LINKS" unless="switch" />

View file

Before

Width:  |  Height:  |  Size: 2.3 MiB

After

Width:  |  Height:  |  Size: 2.3 MiB

View file

@ -1,64 +0,0 @@
package;
import flixel.FlxSprite;
class BGSprite extends FlxSprite
{
/**
Cool lil utility thing just so that it can easy do antialiasing and scrollfactor bullshit
*/
public var idleAnim:String;
/**
* NOTE: loadOldWay param is just for current backward compatibility! Will be moved later!
*/
public function new(image:String, x:Float = 0, y:Float = 0, parX:Float = 1, parY:Float = 1, ?daAnimations:Array<String>, ?loopingAnim:Bool = false,
?loadOldWay:Bool = true)
{
super(x, y);
if (loadOldWay)
{
if (daAnimations != null)
{
setupSparrow(image, daAnimations, loopingAnim);
}
else
{
justLoadImage(image);
}
}
scrollFactor.set(parX, parY);
antialiasing = true;
}
public function setupSparrow(image:String, daAnimations:Array<String>, ?loopingAnim:Bool = false)
{
frames = Paths.getSparrowAtlas(image);
for (anims in daAnimations)
{
var daLoop:Bool = loopingAnim;
if (loopingAnim == null)
daLoop = false;
animation.addByPrefix(anims, anims, 24, daLoop);
animation.play(anims);
if (idleAnim == null)
idleAnim = anims;
}
}
public function justLoadImage(image:String)
{
loadGraphic(Paths.image(image));
active = false;
}
public function dance():Void
{
if (idleAnim != null)
animation.play(idleAnim);
}
}

View file

@ -1,41 +0,0 @@
package;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;
class BackgroundGirls extends FlxSprite
{
public function new(x:Float, y:Float)
{
super(x, y);
// BG fangirls dissuaded
frames = Paths.getSparrowAtlas('weeb/bgFreaks');
animation.addByIndices('danceLeft', 'BG girls group', CoolUtil.numberArray(14), "", 24, false);
animation.addByIndices('danceRight', 'BG girls group', CoolUtil.numberArray(30, 15), "", 24, false);
animation.play('danceLeft');
animation.finish();
}
var danceDir:Bool = false;
public function getScared():Void
{
animation.addByIndices('danceLeft', 'BG fangirls dissuaded', CoolUtil.numberArray(14), "", 24, false);
animation.addByIndices('danceRight', 'BG fangirls dissuaded', CoolUtil.numberArray(30, 15), "", 24, false);
dance();
animation.finish();
}
public function dance():Void
{
danceDir = !danceDir;
if (danceDir)
animation.play('danceRight', true);
else
animation.play('danceLeft', true);
}
}

View file

@ -1,5 +1,7 @@
package;
import funkin.InitState;
import funkin.MemoryCounter;
import flixel.FlxGame;
import flixel.FlxState;
import openfl.Lib;
@ -42,9 +44,9 @@ class Main extends Sprite
// A design similar to that of Minecraft resource packs would be intuitive.
// 3. The interface should save (to the save file) and output an ordered array of mod IDs.
// 4. Replace the call to PolymodHandler.loadAllMods() with a call to PolymodHandler.loadModsById(ids:Array<String>).
modding.PolymodHandler.loadAllMods();
funkin.modding.PolymodHandler.loadAllMods();
i18n.FireTongueHandler.init();
funkin.i18n.FireTongueHandler.init();
if (stage != null)
{

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSubState;

View file

@ -1,13 +1,14 @@
package;
package funkin;
import Note.NoteData;
import SongLoad.SwagSong;
import Section.SwagSection;
import funkin.Note.NoteData;
import funkin.SongLoad.SwagSong;
import funkin.Section.SwagSection;
import flixel.FlxSprite;
import flixel.animation.FlxBaseAnimation;
import flixel.graphics.frames.FlxAtlasFrames;
import flixel.util.FlxSort;
import haxe.io.Path;
import funkin.play.PlayState;
using StringTools;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.group.FlxGroup.FlxTypedGroup;

View file

@ -1,6 +1,6 @@
package;
package funkin;
import SongLoad.SwagSong;
import funkin.SongLoad.SwagSong;
/**
* ...

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxObject;
import flixel.input.FlxInput;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.FlxState;
@ -15,7 +15,8 @@ import haxe.format.JsonParser;
import lime.math.Rectangle;
import lime.utils.Assets;
import openfl.filters.ShaderFilter;
import shaderslmfao.ScreenWipeShader;
import funkin.play.PlayState;
import funkin.shaderslmfao.ScreenWipeShader;
using StringTools;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.FlxState;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.group.FlxGroup.FlxTypedGroup;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.addons.text.FlxTypeText;
@ -8,6 +8,7 @@ import flixel.input.FlxKeyManager;
import flixel.text.FlxText;
import flixel.util.FlxColor;
import flixel.util.FlxTimer;
import funkin.play.PlayState;
using StringTools;

View file

@ -1,92 +1,92 @@
package;
import Sys.sleep;
using StringTools;
#if discord_rpc
import discord_rpc.DiscordRpc;
#end
class DiscordClient
{
#if discord_rpc
public function new()
{
trace("Discord Client starting...");
DiscordRpc.start({
clientID: "814588678700924999",
onReady: onReady,
onError: onError,
onDisconnected: onDisconnected
});
trace("Discord Client started.");
while (true)
{
DiscordRpc.process();
sleep(2);
// trace("Discord Client Update");
}
DiscordRpc.shutdown();
}
public static function shutdown()
{
DiscordRpc.shutdown();
}
static function onReady()
{
DiscordRpc.presence({
details: "In the Menus",
state: null,
largeImageKey: 'icon',
largeImageText: "Friday Night Funkin'"
});
}
static function onError(_code:Int, _message:String)
{
trace('Error! $_code : $_message');
}
static function onDisconnected(_code:Int, _message:String)
{
trace('Disconnected! $_code : $_message');
}
public static function initialize()
{
var DiscordDaemon = sys.thread.Thread.create(() ->
{
new DiscordClient();
});
trace("Discord Client initialized");
}
public static function changePresence(details:String, state:Null<String>, ?smallImageKey:String, ?hasStartTimestamp:Bool, ?endTimestamp:Float)
{
var startTimestamp:Float = if (hasStartTimestamp) Date.now().getTime() else 0;
if (endTimestamp > 0)
{
endTimestamp = startTimestamp + endTimestamp;
}
DiscordRpc.presence({
details: details,
state: state,
largeImageKey: 'icon',
largeImageText: "Friday Night Funkin'",
smallImageKey: smallImageKey,
// Obtained times are in milliseconds so they are divided so Discord can use it
startTimestamp: Std.int(startTimestamp / 1000),
endTimestamp: Std.int(endTimestamp / 1000)
});
// trace('Discord RPC Updated. Arguments: $details, $state, $smallImageKey, $hasStartTimestamp, $endTimestamp');
}
#end
}
package funkin;
import Sys.sleep;
using StringTools;
#if discord_rpc
import discord_rpc.DiscordRpc;
#end
class DiscordClient
{
#if discord_rpc
public function new()
{
trace("Discord Client starting...");
DiscordRpc.start({
clientID: "814588678700924999",
onReady: onReady,
onError: onError,
onDisconnected: onDisconnected
});
trace("Discord Client started.");
while (true)
{
DiscordRpc.process();
sleep(2);
// trace("Discord Client Update");
}
DiscordRpc.shutdown();
}
public static function shutdown()
{
DiscordRpc.shutdown();
}
static function onReady()
{
DiscordRpc.presence({
details: "In the Menus",
state: null,
largeImageKey: 'icon',
largeImageText: "Friday Night Funkin'"
});
}
static function onError(_code:Int, _message:String)
{
trace('Error! $_code : $_message');
}
static function onDisconnected(_code:Int, _message:String)
{
trace('Disconnected! $_code : $_message');
}
public static function initialize()
{
var DiscordDaemon = sys.thread.Thread.create(() ->
{
new DiscordClient();
});
trace("Discord Client initialized");
}
public static function changePresence(details:String, state:Null<String>, ?smallImageKey:String, ?hasStartTimestamp:Bool, ?endTimestamp:Float)
{
var startTimestamp:Float = if (hasStartTimestamp) Date.now().getTime() else 0;
if (endTimestamp > 0)
{
endTimestamp = startTimestamp + endTimestamp;
}
DiscordRpc.presence({
details: details,
state: state,
largeImageKey: 'icon',
largeImageText: "Friday Night Funkin'",
smallImageKey: smallImageKey,
// Obtained times are in milliseconds so they are divided so Discord can use it
startTimestamp: Std.int(startTimestamp / 1000),
endTimestamp: Std.int(endTimestamp / 1000)
});
// trace('Discord RPC Updated. Arguments: $details, $state, $smallImageKey, $hasStartTimestamp, $endTimestamp');
}
#end
}

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxCamera;
import flixel.FlxSprite;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxBasic;
import flixel.FlxSprite;

View file

@ -1,6 +1,6 @@
package;
package funkin;
import Controls.Control;
import funkin.Controls.Control;
import flash.text.TextField;
import flixel.FlxCamera;
import flixel.FlxGame;
@ -21,15 +21,16 @@ import flixel.tweens.FlxTween;
import flixel.util.FlxColor;
import flixel.util.FlxSpriteUtil;
import flixel.util.FlxTimer;
import freeplayStuff.BGScrollingText;
import freeplayStuff.DJBoyfriend;
import freeplayStuff.FreeplayScore;
import freeplayStuff.SongMenuItem;
import funkin.freeplayStuff.BGScrollingText;
import funkin.freeplayStuff.DJBoyfriend;
import funkin.freeplayStuff.FreeplayScore;
import funkin.freeplayStuff.SongMenuItem;
import lime.app.Future;
import lime.utils.Assets;
import shaderslmfao.AngleMask;
import shaderslmfao.PureColor;
import shaderslmfao.StrokeShader;
import funkin.shaderslmfao.AngleMask;
import funkin.shaderslmfao.PureColor;
import funkin.shaderslmfao.StrokeShader;
import funkin.play.PlayState;
using StringTools;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxObject;
import flixel.FlxSubState;
@ -6,8 +6,9 @@ import flixel.math.FlxPoint;
import flixel.system.FlxSound;
import flixel.util.FlxColor;
import flixel.util.FlxTimer;
import haxe.display.Display.Package;
import ui.PreferencesMenu;
import haxe.display.Display;
import funkin.ui.PreferencesMenu;
import funkin.play.PlayState;
class GameOverSubstate extends MusicBeatSubstate
{

View file

@ -1,7 +1,8 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;
import funkin.play.PlayState;
class GitarooPause extends MusicBeatState
{

View file

@ -1,7 +1,8 @@
package;
package funkin;
import flixel.FlxSprite;
import openfl.utils.Assets;
import funkin.play.PlayState;
using StringTools;

View file

@ -1,4 +1,4 @@
package;
package funkin;
class Highscore
{

View file

@ -1,7 +1,7 @@
package;
package funkin;
import play.stage.StageData;
import charting.ChartingState;
import funkin.play.stage.StageData;
import funkin.charting.ChartingState;
import flixel.addons.transition.FlxTransitionSprite.GraphicTransTileDiamond;
import flixel.addons.transition.FlxTransitionableState;
import flixel.addons.transition.TransitionData;
@ -10,10 +10,11 @@ import flixel.math.FlxPoint;
import flixel.math.FlxRect;
import flixel.util.FlxColor;
import openfl.display.BitmapData;
import play.PicoFight;
import ui.PreferencesMenu;
import ui.stageBuildShit.StageBuilderState;
import util.macro.MacroUtil;
import funkin.play.PicoFight;
import funkin.ui.PreferencesMenu;
import funkin.ui.stageBuildShit.StageBuilderState;
import funkin.util.macro.MacroUtil;
import funkin.play.PlayState;
using StringTools;

View file

@ -1,6 +1,6 @@
package;
package funkin;
import Controls;
import funkin.Controls;
import flixel.input.gamepad.FlxGamepad;
import flixel.input.gamepad.FlxGamepadInputID;
import flixel.input.keyboard.FlxKey;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.FlxState;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.FlxState;
@ -12,6 +12,7 @@ import lime.utils.AssetLibrary;
import lime.utils.AssetManifest;
import lime.utils.Assets as LimeAssets;
import openfl.utils.Assets;
import funkin.play.PlayState;
class LoadingState extends MusicBeatState
{

View file

@ -1,6 +1,6 @@
package;
package funkin;
import NGio;
import funkin.NGio;
import flixel.FlxObject;
import flixel.FlxSprite;
import flixel.FlxState;
@ -17,12 +17,12 @@ import flixel.util.FlxColor;
import flixel.util.FlxTimer;
import lime.app.Application;
import openfl.filters.ShaderFilter;
import shaderslmfao.ScreenWipeShader;
import ui.AtlasMenuList;
import ui.MenuList;
import ui.OptionsState;
import ui.PreferencesMenu;
import ui.Prompt;
import funkin.shaderslmfao.ScreenWipeShader;
import funkin.ui.AtlasMenuList;
import funkin.ui.MenuList;
import funkin.ui.OptionsState;
import funkin.ui.PreferencesMenu;
import funkin.ui.Prompt;
using StringTools;
@ -31,7 +31,7 @@ import Discord.DiscordClient;
#end
#if newgrounds
import io.newgrounds.NG;
import ui.NgPrompt;
import funkin.ui.NgPrompt;
#end
class MainMenuState extends MusicBeatState

View file

@ -1,3 +1,5 @@
package funkin;
import openfl.text.TextFormat;
import openfl.system.System;
import openfl.text.TextField;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;

View file

@ -1,6 +1,6 @@
package;
package funkin;
import Conductor.BPMChangeEvent;
import funkin.Conductor.BPMChangeEvent;
import flixel.FlxGame;
import flixel.addons.transition.FlxTransitionableState;
import flixel.addons.ui.FlxUIState;

View file

@ -1,6 +1,6 @@
package;
package funkin;
import Conductor.BPMChangeEvent;
import funkin.Conductor.BPMChangeEvent;
import flixel.FlxSubState;
class MusicBeatSubstate extends FlxSubState

View file

@ -1,4 +1,4 @@
package;
package funkin;
#if newgrounds
import flixel.util.FlxSignal;

View file

@ -1,9 +1,10 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.math.FlxMath;
import shaderslmfao.ColorSwap;
import ui.PreferencesMenu;
import funkin.shaderslmfao.ColorSwap;
import funkin.ui.PreferencesMenu;
import funkin.play.PlayState;
using StringTools;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import haxe.io.Path;
@ -32,7 +32,8 @@ class NoteSplash extends FlxSprite
animation.play('note' + noteData + '-' + FlxG.random.int(0, 1), true);
animation.curAnim.frameRate = 24 + FlxG.random.int(-2, 2);
animation.finishCallback = function(name){
animation.finishCallback = function(name)
{
kill();
};
updateHitbox();

View file

@ -1,4 +1,4 @@
package;
package funkin;
class Options
{

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.FlxSubState;
@ -6,6 +6,7 @@ import flixel.text.FlxText;
import flixel.util.FlxColor;
import lime.app.Application;
#if newgrounds
class OutdatedSubState extends MusicBeatState
{
public static var leftState:Bool = false;
@ -42,3 +43,4 @@ class OutdatedSubState extends MusicBeatState
super.update(elapsed);
}
}
#end

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.graphics.frames.FlxAtlasFrames;
import openfl.utils.AssetType;

View file

@ -1,6 +1,6 @@
package;
package funkin;
import Controls.Control;
import funkin.Controls.Control;
import flixel.FlxSprite;
import flixel.FlxSubState;
import flixel.addons.transition.FlxTransitionableState;
@ -11,6 +11,7 @@ import flixel.text.FlxText;
import flixel.tweens.FlxEase;
import flixel.tweens.FlxTween;
import flixel.util.FlxColor;
import funkin.play.PlayState;
class PauseSubState extends MusicBeatSubstate
{

View file

@ -1,6 +1,6 @@
package;
package funkin;
import Controls;
import funkin.Controls;
import flixel.FlxCamera;
import flixel.input.actions.FlxActionInput;
import flixel.input.gamepad.FlxGamepad;

View file

@ -1,6 +1,6 @@
package;
package funkin;
import Note.NoteData;
import funkin.Note.NoteData;
typedef SwagSection =
{

View file

@ -1,7 +1,7 @@
package;
package funkin;
import Note.NoteData;
import Section.SwagSection;
import funkin.Note.NoteData;
import funkin.Section.SwagSection;
import haxe.Json;
import haxe.format.JsonParser;
import lime.utils.Assets;

View file

@ -1,4 +1,4 @@
package;
package funkin;
#if discord_rpc
import Discord.DiscordClient;
@ -14,6 +14,7 @@ import flixel.tweens.FlxTween;
import flixel.util.FlxColor;
import flixel.util.FlxTimer;
import lime.net.curl.CURLCode;
import funkin.play.PlayState;
using StringTools;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxCamera;
import flixel.FlxSprite;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import flixel.FlxSprite;
import flixel.system.FlxSound;

View file

@ -1,6 +1,6 @@
package;
package funkin;
import audiovis.SpectogramSprite;
import funkin.audiovis.SpectogramSprite;
import flixel.FlxObject;
import flixel.FlxSprite;
import flixel.FlxState;
@ -29,10 +29,10 @@ import openfl.events.NetStatusEvent;
import openfl.media.Video;
import openfl.net.NetConnection;
import openfl.net.NetStream;
import shaderslmfao.BuildingShaders;
import shaderslmfao.ColorSwap;
import shaderslmfao.TitleOutline;
import ui.PreferencesMenu;
import funkin.shaderslmfao.BuildingShaders;
import funkin.shaderslmfao.ColorSwap;
import funkin.shaderslmfao.TitleOutline;
import funkin.ui.PreferencesMenu;
using StringTools;

View file

@ -1,4 +1,4 @@
package;
package funkin;
import openfl.display.Sprite;
import openfl.events.AsyncErrorEvent;

View file

@ -1,3 +1,5 @@
package funkin;
import flixel.group.FlxGroup.FlxTypedGroup;
import flixel.system.FlxSound;

View file

@ -1,4 +1,4 @@
package animate;
package funkin.animate;
import flixel.FlxSprite;
import flixel.FlxState;

View file

@ -1,7 +1,5 @@
package animate;
package funkin.animate;
// import animate.FlxSymbol.Parsed;
// import animate.FlxSymbol.Timeline;
import flixel.FlxCamera;
import flixel.FlxSprite;
import flixel.group.FlxGroup.FlxTypedGroup;

View file

@ -1,10 +1,8 @@
package animate;
package funkin.animate;
// import animateAtlasPlayer.assets.AssetManager;
// import animateAtlasPlayer.core.Animation;
import animate.ParseAnimate.AnimJson;
import animate.ParseAnimate.Sprite;
import animate.ParseAnimate.Spritemap;
import funkin.animate.ParseAnimate.AnimJson;
import funkin.animate.ParseAnimate.Sprite;
import funkin.animate.ParseAnimate.Spritemap;
import flixel.FlxCamera;
import flixel.FlxSprite;
import flixel.graphics.FlxGraphic;

View file

@ -1,12 +1,12 @@
package animate;
package funkin.animate;
import animate.ParseAnimate.AnimJson;
import animate.ParseAnimate.Animation;
import animate.ParseAnimate.Frame;
import animate.ParseAnimate.Sprite;
import animate.ParseAnimate.Spritemap;
import animate.ParseAnimate.SymbolDictionary;
import animate.ParseAnimate.Timeline;
import funkin.animate.ParseAnimate.AnimJson;
import funkin.animate.ParseAnimate.Animation;
import funkin.animate.ParseAnimate.Frame;
import funkin.animate.ParseAnimate.Sprite;
import funkin.animate.ParseAnimate.Spritemap;
import funkin.animate.ParseAnimate.SymbolDictionary;
import funkin.animate.ParseAnimate.Timeline;
import flixel.FlxCamera;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxFrame.FlxFrameAngle;

View file

@ -1,4 +1,4 @@
package animate;
package funkin.animate;
import haxe.format.JsonParser;
import openfl.Assets;

View file

@ -1,6 +1,6 @@
package animate;
package funkin.animate;
import animate.FlxSymbol.Frame;
import funkin.animate.ParseAnimate.Frame;
import flixel.FlxSprite;
import flixel.input.mouse.FlxMouseEventManager;
import flixel.util.FlxColor;

View file

@ -1,13 +1,13 @@
package audiovis;
package funkin.audiovis;
import audiovis.dsp.FFT;
import funkin.audiovis.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.system.FlxSound;
import ui.PreferencesMenu.CheckboxThingie;
import funkin.ui.PreferencesMenu.CheckboxThingie;
using Lambda;

View file

@ -1,12 +1,12 @@
package audiovis;
package funkin.audiovis;
import audiovis.VisShit.CurAudioInfo;
import funkin.audiovis.VisShit.CurAudioInfo;
import flixel.math.FlxMath;
import flixel.math.FlxPoint;
import flixel.system.FlxSound;
import flixel.util.FlxColor;
import lime.utils.Int16Array;
import rendering.MeshRender;
import funkin.rendering.MeshRender;
class PolygonSpectogram extends MeshRender
{

View file

@ -1,8 +1,8 @@
package audiovis;
package funkin.audiovis;
import audiovis.PolygonSpectogram.VISTYPE;
import audiovis.VisShit.CurAudioInfo;
import audiovis.dsp.FFT;
import funkin.audiovis.PolygonSpectogram.VISTYPE;
import funkin.audiovis.VisShit.CurAudioInfo;
import funkin.audiovis.dsp.FFT;
import flixel.FlxSprite;
import flixel.group.FlxGroup;
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;

View file

@ -1,6 +1,6 @@
package audiovis;
package funkin.audiovis;
import audiovis.dsp.FFT;
import funkin.audiovis.dsp.FFT;
import flixel.math.FlxMath;
import flixel.system.FlxSound;
import lime.utils.Int16Array;

View file

@ -1,4 +1,4 @@
package audiovis.dsp;
package funkin.audiovis.dsp;
/**
Complex number representation.

View file

@ -1,9 +1,9 @@
package audiovis.dsp;
package funkin.audiovis.dsp;
import audiovis.dsp.Complex;
import funkin.audiovis.dsp.Complex;
using audiovis.dsp.OffsetArray;
using audiovis.dsp.Signal;
using funkin.audiovis.dsp.OffsetArray;
using funkin.audiovis.dsp.Signal;
// these are only used for testing, down in FFT.main()

View file

@ -1,4 +1,4 @@
package audiovis.dsp;
package funkin.audiovis.dsp;
/**
A view into an Array with an indexing offset.

View file

@ -1,4 +1,4 @@
package audiovis.dsp;
package funkin.audiovis.dsp;
using Lambda;

View file

@ -1,12 +1,12 @@
package charting;
package funkin.charting;
import Conductor.BPMChangeEvent;
import Note.NoteData;
import Section.SwagSection;
import SongLoad.SwagSong;
import audiovis.ABotVis;
import audiovis.PolygonSpectogram;
import audiovis.SpectogramSprite;
import funkin.Conductor.BPMChangeEvent;
import funkin.Note.NoteData;
import funkin.Section.SwagSection;
import funkin.SongLoad.SwagSong;
import funkin.audiovis.ABotVis;
import funkin.audiovis.PolygonSpectogram;
import funkin.audiovis.SpectogramSprite;
import flixel.FlxSprite;
import flixel.addons.display.FlxGridOverlay;
import flixel.addons.transition.FlxTransitionableState;
@ -29,7 +29,8 @@ import lime.utils.Assets;
import openfl.events.Event;
import openfl.events.IOErrorEvent;
import openfl.net.FileReference;
import rendering.MeshRender;
import funkin.rendering.MeshRender;
import funkin.play.PlayState;
using Lambda;
using StringTools;

View file

@ -1,4 +1,4 @@
package freeplayStuff;
package funkin.freeplayStuff;
import flixel.FlxObject;
import flixel.group.FlxGroup.FlxTypedGroup;

View file

@ -1,4 +1,4 @@
package freeplayStuff;
package funkin.freeplayStuff;
import flixel.FlxSprite;
import flixel.util.FlxSignal;

View file

@ -1,4 +1,4 @@
package freeplayStuff;
package funkin.freeplayStuff;
import flixel.FlxSprite;
import flixel.group.FlxSpriteGroup.FlxTypedSpriteGroup;
@ -11,6 +11,8 @@ class FreeplayScore extends FlxTypedSpriteGroup<ScoreNum>
function set_scoreShit(val):Int
{
if (group == null || group.members == null)
return val;
var loopNum:Int = group.members.length - 1;
var dumbNumb = Std.parseInt(Std.string(val));
var prevNum:ScoreNum;

View file

@ -1,4 +1,4 @@
package freeplayStuff;
package funkin.freeplayStuff;
import flixel.FlxSprite;
import flixel.graphics.frames.FlxAtlasFrames;

View file

@ -1,4 +1,4 @@
package i18n;
package funkin.i18n;
import firetongue.FireTongue;

View file

@ -1,6 +1,6 @@
#if !macro
// Only import these when we aren't in a macro.
import Paths;
import funkin.Paths;
import flixel.FlxG; // This one in particular causes a compile error if you're using macros.
#end

View file

@ -1,13 +1,13 @@
package modding;
import polymod.hscript.HScriptable;
/**
* Add this interface to a class to make it a scriptable object.
* Functions annotated with @:hscript will call the relevant script.
*/
@:hscript({
// ALL of these values are added to ALL scripts in the child classes.
context: [FlxG, FlxSprite, Math, Paths, Std]
})
interface IHook extends HScriptable {}
package funkin.modding;
import polymod.hscript.HScriptable;
/**
* Add this interface to a class to make it a scriptable object.
* Functions annotated with @:hscript will call the relevant script.
*/
@:hscript({
// ALL of these values are added to ALL scripts in the child classes.
context: [FlxG, FlxSprite, Math, Paths, Std]
})
interface IHook extends HScriptable {}

View file

@ -1,4 +1,4 @@
package modding;
package funkin.modding;
import polymod.Polymod;

View file

@ -1,163 +1,168 @@
package modding;
import polymod.Polymod.ModMetadata;
import polymod.Polymod;
import polymod.backends.OpenFLBackend;
import polymod.backends.PolymodAssets.PolymodAssetType;
import polymod.format.ParseRules.LinesParseFormat;
import polymod.format.ParseRules.TextFileFormat;
class PolymodHandler
{
/**
* The API version that mods should comply with.
* Format this with Semantic Versioning; <MAJOR>.<MINOR>.<PATCH>.
* Bug fixes increment the patch version, new features increment the minor version.
* Changes that break old mods increment the major version.
*/
static final API_VERSION = "0.1.0";
/**
* Where relative to the executable that mods are located.
*/
static final MOD_FOLDER = "mods";
/**
* Loads the game with ALL mods enabled with Polymod.
*/
public static function loadAllMods()
{
trace("Initializing Polymod (using all mods)...");
loadModsById(getAllModIds());
}
/**
* Loads the game without any mods enabled with Polymod.
*/
public static function loadNoMods()
{
// We still need to configure the debug print calls etc.
trace("Initializing Polymod (using no mods)...");
loadModsById([]);
}
public static function loadModsById(ids:Array<String>)
{
if (ids.length == 0)
{
trace('You attempted to load zero mods.');
}
else
{
trace('Attempting to load ${ids.length} mods...');
}
var loadedModList = polymod.Polymod.init({
// Root directory for all mods.
modRoot: MOD_FOLDER,
// The directories for one or more mods to load.
dirs: ids,
// Framework being used to load assets.
framework: OPENFL,
// The current version of our API.
apiVersion: API_VERSION,
// Call this function any time an error occurs.
errorCallback: PolymodErrorHandler.onPolymodError,
// Enforce semantic version patterns for each mod.
// modVersions: null,
// A map telling Polymod what the asset type is for unfamiliar file extensions.
// extensionMap: [],
frameworkParams: buildFrameworkParams(),
// List of filenames to ignore in mods. Use the default list to ignore the metadata file, etc.
ignoredFiles: Polymod.getDefaultIgnoreList(),
// Parsing rules for various data formats.
parseRules: buildParseRules(),
// Parse hxc files and register the scripted classes in them.
useScriptedClasses: true,
});
if (loadedModList == null)
{
trace('[POLYMOD] An error occurred! Failed when loading mods!');
}
else
{
if (loadedModList.length == 0)
{
trace('[POLYMOD] Mod loading complete. We loaded no mods / ${ids.length} mods.');
}
else
{
trace('[POLYMOD] Mod loading complete. We loaded ${loadedModList.length} / ${ids.length} mods.');
}
}
for (mod in loadedModList)
{
trace(' * ${mod.title} v${mod.modVersion} [${mod.id}]');
}
#if debug
var fileList = Polymod.listModFiles("IMAGE");
trace('[POLYMOD] Installed mods have replaced ${fileList.length} images.');
for (item in fileList)
trace(' * $item');
fileList = Polymod.listModFiles("TEXT");
trace('[POLYMOD] Installed mods have replaced ${fileList.length} text files.');
for (item in fileList)
trace(' * $item');
fileList = Polymod.listModFiles("MUSIC");
trace('[POLYMOD] Installed mods have replaced ${fileList.length} music files.');
for (item in fileList)
trace(' * $item');
fileList = Polymod.listModFiles("SOUND");
trace('[POLYMOD] Installed mods have replaced ${fileList.length} sound files.');
for (item in fileList)
trace(' * $item');
#end
}
static function buildParseRules():polymod.format.ParseRules
{
var output = polymod.format.ParseRules.getDefault();
// Ensure TXT files have merge support.
output.addType("txt", TextFileFormat.LINES);
// Ensure script files have merge support.
output.addType("hscript", TextFileFormat.PLAINTEXT);
output.addType("hxs", TextFileFormat.PLAINTEXT);
// You can specify the format of a specific file, with file extension.
// output.addFile("data/introText.txt", TextFileFormat.LINES)
return output;
}
static inline function buildFrameworkParams():polymod.Polymod.FrameworkParams
{
return {
assetLibraryPaths: [
"songs" => "./songs", "shared" => "./", "tutorial" => "./tutorial", "scripts" => "./scripts", "week1" => "./week1", "week2" => "./week2",
"week3" => "./week3", "week4" => "./week4", "week5" => "./week5", "week6" => "./week6", "week7" => "./week7", "week8" => "./week8",
]
}
}
public static function getAllMods():Array<ModMetadata>
{
trace('Scanning the mods folder...');
var modMetadata = Polymod.scan(MOD_FOLDER);
trace('Found ${modMetadata.length} mods when scanning.');
return modMetadata;
}
public static function getAllModIds():Array<String>
{
var modIds = [for (i in getAllMods()) i.id];
return modIds;
}
}
package funkin.modding;
import polymod.Polymod.ModMetadata;
import polymod.Polymod;
import polymod.backends.OpenFLBackend;
import polymod.backends.PolymodAssets.PolymodAssetType;
import polymod.format.ParseRules.LinesParseFormat;
import polymod.format.ParseRules.TextFileFormat;
class PolymodHandler
{
/**
* The API version that mods should comply with.
* Format this with Semantic Versioning; <MAJOR>.<MINOR>.<PATCH>.
* Bug fixes increment the patch version, new features increment the minor version.
* Changes that break old mods increment the major version.
*/
static final API_VERSION = "0.1.0";
/**
* Where relative to the executable that mods are located.
*/
static final MOD_FOLDER = "mods";
/**
* Loads the game with ALL mods enabled with Polymod.
*/
public static function loadAllMods()
{
trace("Initializing Polymod (using all mods)...");
loadModsById(getAllModIds());
}
/**
* Loads the game without any mods enabled with Polymod.
*/
public static function loadNoMods()
{
// We still need to configure the debug print calls etc.
trace("Initializing Polymod (using no mods)...");
loadModsById([]);
}
public static function loadModsById(ids:Array<String>)
{
if (ids.length == 0)
{
trace('You attempted to load zero mods.');
}
else
{
trace('Attempting to load ${ids.length} mods...');
}
var loadedModList = polymod.Polymod.init({
// Root directory for all mods.
modRoot: MOD_FOLDER,
// The directories for one or more mods to load.
dirs: ids,
// Framework being used to load assets.
framework: OPENFL,
// The current version of our API.
apiVersion: API_VERSION,
// Call this function any time an error occurs.
errorCallback: PolymodErrorHandler.onPolymodError,
// Enforce semantic version patterns for each mod.
// modVersions: null,
// A map telling Polymod what the asset type is for unfamiliar file extensions.
// extensionMap: [],
frameworkParams: buildFrameworkParams(),
// List of filenames to ignore in mods. Use the default list to ignore the metadata file, etc.
ignoredFiles: Polymod.getDefaultIgnoreList(),
// Parsing rules for various data formats.
parseRules: buildParseRules(),
// Parse hxc files and register the scripted classes in them.
useScriptedClasses: true,
});
if (loadedModList == null)
{
trace('[POLYMOD] An error occurred! Failed when loading mods!');
}
else
{
if (loadedModList.length == 0)
{
trace('[POLYMOD] Mod loading complete. We loaded no mods / ${ids.length} mods.');
}
else
{
trace('[POLYMOD] Mod loading complete. We loaded ${loadedModList.length} / ${ids.length} mods.');
}
}
for (mod in loadedModList)
{
trace(' * ${mod.title} v${mod.modVersion} [${mod.id}]');
}
#if debug
var fileList = Polymod.listModFiles(PolymodAssetType.IMAGE);
trace('[POLYMOD] Installed mods have replaced ${fileList.length} images.');
for (item in fileList)
trace(' * $item');
fileList = Polymod.listModFiles(PolymodAssetType.TEXT);
trace('[POLYMOD] Installed mods have replaced ${fileList.length} text files.');
for (item in fileList)
trace(' * $item');
fileList = Polymod.listModFiles(PolymodAssetType.AUDIO_MUSIC);
trace('[POLYMOD] Installed mods have replaced ${fileList.length} music files.');
for (item in fileList)
trace(' * $item');
fileList = Polymod.listModFiles(PolymodAssetType.AUDIO_SOUND);
trace('[POLYMOD] Installed mods have replaced ${fileList.length} sound files.');
for (item in fileList)
trace(' * $item');
fileList = Polymod.listModFiles(PolymodAssetType.AUDIO_GENERIC);
trace('[POLYMOD] Installed mods have replaced ${fileList.length} generic audio files.');
for (item in fileList)
trace(' * $item');
#end
}
static function buildParseRules():polymod.format.ParseRules
{
var output = polymod.format.ParseRules.getDefault();
// Ensure TXT files have merge support.
output.addType("txt", TextFileFormat.LINES);
// Ensure script files have merge support.
output.addType("hscript", TextFileFormat.PLAINTEXT);
output.addType("hxs", TextFileFormat.PLAINTEXT);
// You can specify the format of a specific file, with file extension.
// output.addFile("data/introText.txt", TextFileFormat.LINES)
return output;
}
static inline function buildFrameworkParams():polymod.Polymod.FrameworkParams
{
return {
assetLibraryPaths: [
"songs" => "songs", "shared" => "", "tutorial" => "tutorial", "scripts" => "scripts", "week1" => "week1", "week2" => "week2",
"week3" => "week3", "week4" => "week4", "week5" => "week5", "week6" => "week6", "week7" => "week7", "week8" => "week8",
]
}
}
public static function getAllMods():Array<ModMetadata>
{
trace('Scanning the mods folder...');
var modMetadata = Polymod.scan(MOD_FOLDER);
trace('Found ${modMetadata.length} mods when scanning.');
return modMetadata;
}
public static function getAllModIds():Array<String>
{
var modIds = [for (i in getAllMods()) i.id];
return modIds;
}
}

View file

@ -1,7 +1,7 @@
package modding.base;
package funkin.modding.base;
import flixel.FlxSprite;
import modding.IHook;
import funkin.modding.IHook;
@:hscriptClass
class ScriptedFlxSprite extends FlxSprite implements IHook

View file

@ -1,7 +1,7 @@
package modding.base;
package funkin.modding.base;
import flixel.group.FlxSpriteGroup;
import modding.IHook;
import funkin.modding.IHook;
@:hscriptClass
class ScriptedFlxSpriteGroup extends FlxSpriteGroup implements IHook

View file

@ -1,4 +1,4 @@
package play;
package funkin.play;
import flixel.FlxSprite;

View file

@ -1,7 +1,7 @@
package play;
package funkin.play;
import Note.NoteData;
import audiovis.PolygonSpectogram;
import funkin.Note.NoteData;
import funkin.audiovis.PolygonSpectogram;
import flixel.FlxObject;
import flixel.FlxSprite;
import flixel.addons.effects.FlxTrail;

View file

@ -1,6 +1,6 @@
package;
package funkin.play;
import charting.ChartingState;
import funkin.charting.ChartingState;
import flixel.addons.effects.FlxTrail;
import flixel.addons.transition.FlxTransitionableState;
import flixel.FlxCamera;
@ -22,14 +22,14 @@ import flixel.util.FlxTimer;
import haxe.Json;
import lime.ui.Haptic;
import lime.utils.Assets;
import Note;
import play.stage.Stage;
import play.stage.StageData;
import Section.SwagSection;
import shaderslmfao.ColorSwap;
import SongLoad.SwagSong;
import ui.PopUpStuff;
import ui.PreferencesMenu;
import funkin.Note;
import funkin.play.stage.Stage;
import funkin.play.stage.StageData;
import funkin.Section.SwagSection;
import funkin.shaderslmfao.ColorSwap;
import funkin.SongLoad.SwagSong;
import funkin.ui.PopUpStuff;
import funkin.ui.PreferencesMenu;
using StringTools;
@ -39,6 +39,7 @@ import Discord.DiscordClient;
class PlayState extends MusicBeatState
{
// TODO: Reorganize these variables (maybe there should be a separate class like Conductor just to hold them?)
public static var curStageId:String = '';
public static var SONG:SwagSong;
public static var isStoryMode:Bool = false;
@ -71,6 +72,11 @@ class PlayState extends MusicBeatState
private var strumLineNotes:FlxTypedGroup<FlxSprite>;
/**
* The currently active PlayState.
*/
public static var instance:PlayState = null;
/**
* Strumline for player
*/
@ -134,6 +140,8 @@ class PlayState extends MusicBeatState
override public function create()
{
instance = this;
initCameras();
// Starting health.
@ -1688,7 +1696,7 @@ class PlayState extends MusicBeatState
scoreTxt.text = "Score:" + songScore;
if (FlxG.keys.justPressed.EIGHT)
FlxG.switchState(new ui.animDebugShit.DebugBoundingState());
FlxG.switchState(new funkin.ui.animDebugShit.DebugBoundingState());
if (FlxG.keys.justPressed.F5)
debug_refreshStages();
@ -2391,14 +2399,20 @@ class PlayState extends MusicBeatState
function performCleanup()
{
// Uncache the song.
openfl.utils.Assets.cache.clear(Paths.inst(SONG.song));
openfl.utils.Assets.cache.clear(Paths.voices(SONG.song));
// Remove reference to stage and remove sprites from it to save memory.
if (curStage != null)
{
remove(curStage);
curStage.kill();
curStage = null;
}
// Clear the static reference to this state.
instance = null;
}
/**

View file

@ -1,9 +1,9 @@
package play.character;
enum CharacterType
{
BF;
GF;
DAD;
OTHER;
}
package funkin.play.character;
enum CharacterType
{
BF;
GF;
DAD;
OTHER;
}

View file

@ -1,4 +1,4 @@
package play.stage;
package funkin.play.stage;
import flixel.FlxSprite;

View file

@ -1,6 +1,6 @@
package play.stage;
package funkin.play.stage;
import modding.IHook;
import funkin.modding.IHook;
@:hscriptClass
@:keep

View file

@ -1,9 +1,9 @@
package play.stage;
import modding.IHook;
@:hscriptClass
class ScriptedStage extends Stage implements IHook
{
// No body needed for this class, it's magic ;)
}
package funkin.play.stage;
import funkin.modding.IHook;
@:hscriptClass
class ScriptedStage extends Stage implements IHook
{
// No body needed for this class, it's magic ;)
}

View file

@ -1,13 +1,13 @@
package play.stage;
package funkin.play.stage;
import flixel.math.FlxPoint;
import flixel.FlxSprite;
import flixel.group.FlxSpriteGroup;
import flixel.util.FlxSort;
import modding.IHook;
import play.character.Character.CharacterType;
import play.stage.StageData.StageDataParser;
import util.SortUtil;
import funkin.modding.IHook;
import funkin.play.character.Character.CharacterType;
import funkin.play.stage.StageData.StageDataParser;
import funkin.util.SortUtil;
/**
* A Stage is a group of objects rendered in the PlayState.

View file

@ -1,4 +1,4 @@
package rendering;
package funkin.rendering;
import flixel.FlxStrip;
import flixel.util.FlxColor;

View file

@ -1,4 +1,4 @@
package shaderslmfao;
package funkin.shaderslmfao;
import flixel.system.FlxAssets.FlxShader;

View file

@ -1,4 +1,4 @@
package;
package funkin.shaderslmfao;
import flixel.util.FlxColor;
import openfl.display.ShaderParameter;

View file

@ -1,4 +1,4 @@
package shaderslmfao;
package funkin.shaderslmfao;
import flixel.system.FlxAssets.FlxShader;

View file

@ -1,4 +1,4 @@
package shaderslmfao;
package funkin.shaderslmfao;
import flixel.system.FlxAssets.FlxShader;
import flixel.util.FlxColor;

View file

@ -1,4 +1,4 @@
package;
package funkin.shaderslmfao;
import flixel.system.FlxAssets.FlxShader;
@ -28,4 +28,4 @@ class MultiplyShader extends FlxShader
{
super();
}
}
}

View file

@ -1,8 +1,9 @@
package shaderslmfao;
package funkin.shaderslmfao;
import flixel.math.FlxPoint;
import flixel.system.FlxAssets.FlxShader;
@:keep
class OverlayBlend extends FlxShader
{
// these r copypaste

View file

@ -1,4 +1,4 @@
package shaderslmfao;
package funkin.shaderslmfao;
import flixel.system.FlxAssets.FlxShader;
import flixel.util.FlxColor;

View file

@ -1,4 +1,4 @@
package shaderslmfao;
package funkin.shaderslmfao;
import flixel.system.FlxAssets.FlxShader;

View file

@ -1,4 +1,4 @@
package shaderslmfao;
package funkin.shaderslmfao;
import flixel.system.FlxAssets.FlxShader;
import flixel.util.FlxColor;

View file

@ -1,4 +1,4 @@
package shaderslmfao;
package funkin.shaderslmfao;
import flixel.math.FlxPoint;
import flixel.system.FlxAssets.FlxShader;

Some files were not shown because too many files have changed in this diff Show more