From f8b20774e3f035eeddb9211a28a391b20db74456 Mon Sep 17 00:00:00 2001 From: NeeEoo Date: Sat, 16 Mar 2024 21:15:18 +0100 Subject: [PATCH] Remove useless indentation --- .vscode/settings.json | 4 +- FEATURES.md | 4 +- art/readme.txt | 54 +++++++++---------- assets/data/global.hx | 2 +- assets/data/scripts/pixel.hx | 4 +- assets/data/splashes/default.xml | 2 +- assets/data/splashes/pixel-default.xml | 2 +- assets/data/splashes/pixel-secret.xml | 2 +- assets/data/splashes/secret.xml | 2 +- assets/data/stages/mall.xml | 4 +- assets/data/stages/tank.xml | 2 +- .../images/editors/charter/event-spr-add.xml | 2 +- assets/images/editors/ui/topmenu.xml | 2 +- assets/shaders/chromaticAberration.frag | 14 ++--- assets/shaders/coloredVignette.frag | 6 +-- assets/shaders/engine/colorPicker.frag | 6 +-- assets/songs/test/scripts/modchart.hx | 8 +-- project.xml | 2 +- source/funkin/backend/MusicBeatTransition.hx | 2 +- source/funkin/backend/assets/Paths.hx | 2 +- source/funkin/backend/chart/EventsData.hx | 2 +- .../funkin/backend/scripting/DummyScript.hx | 2 +- source/funkin/backend/system/MainState.hx | 2 +- .../backend/system/framerate/FlixelInfo.hx | 4 +- .../backend/system/framerate/MemoryCounter.hx | 2 +- .../backend/system/framerate/StatsInfo.hx | 2 +- source/funkin/backend/system/github/GitHub.hx | 8 +-- .../backend/system/updating/AsyncUpdater.hx | 18 +++---- .../backend/system/updating/UpdateScreen.hx | 4 +- .../backend/system/updating/UpdateUtil.hx | 10 ++-- source/funkin/backend/utils/XMLUtil.hx | 12 ++--- source/funkin/editors/SaveWarning.hx | 2 +- .../editors/character/CharacterEditor.hx | 2 +- .../editors/character/CharacterInfoScreen.hx | 2 +- source/funkin/editors/charter/Charter.hx | 44 +++++++-------- .../editors/charter/CharterBackdropGroup.hx | 5 +- source/funkin/editors/charter/CharterEvent.hx | 2 +- source/funkin/editors/charter/CharterNote.hx | 4 +- .../editors/charter/CharterNoteGroup.hx | 2 +- .../editors/charter/CharterNoteHoverer.hx | 6 +-- .../editors/charter/CharterNoteTypesList.hx | 2 +- .../editors/charter/CharterSelection.hx | 2 +- .../editors/charter/CharterStrumLineGroup.hx | 2 +- .../editors/charter/CharterStrumlineScreen.hx | 4 +- source/funkin/editors/ui/UIAudioPlayer.hx | 8 +-- source/funkin/editors/ui/UIButtonList.hx | 1 - source/funkin/editors/ui/UIColorwheel.hx | 2 +- source/funkin/editors/ui/UISliceSprite.hx | 10 ++-- source/funkin/editors/ui/UISlider.hx | 48 ++++++++--------- source/funkin/game/PlayState.hx | 4 +- .../funkin/game/cutscenes/ScriptedCutscene.hx | 2 +- source/funkin/menus/FreeplayState.hx | 2 +- source/funkin/menus/GitarooPause.hx | 8 +-- source/funkin/menus/MainMenuState.hx | 1 - source/funkin/menus/PauseSubState.hx | 2 +- .../menus/PlaytestingWarningSubstate.hx | 2 +- source/funkin/menus/StoryMenuState.hx | 3 +- source/funkin/menus/TitleState.hx | 2 +- source/funkin/options/OptionsMenu.hx | 12 ++--- source/funkin/options/OptionsScreen.hx | 2 +- .../funkin/options/keybinds/KeybindSetting.hx | 4 +- .../options/keybinds/KeybindsOptions.hx | 2 +- .../_internal/backend/native/NativeWindow.hx | 2 +- 63 files changed, 192 insertions(+), 196 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1d26a96f..fea6e023 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { - "editor.detectIndentation": false, - "editor.insertSpaces": false, + "editor.detectIndentation": false, + "editor.insertSpaces": false, "files.associations": { "*.hx": "haxe", "*.hscript": "haxe", diff --git a/FEATURES.md b/FEATURES.md index b2de03ca..9d53fcaf 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -5,7 +5,7 @@ _**QOL = Quality of Life**_

Player QOL Features

- + - New input system - New accuracy and misses system, added to fix the base game UI. - New options, including: @@ -72,7 +72,7 @@ _**QOL = Quality of Life**_ - Weeks are located in `data/weeks/weeks/` - If you need to rearrange the weeks in-game, you can use the `data/weeks/weeks.txt` file. - Editors for Charts and Characters (Stage coming soon) - - Undos/Redos supported + - Undos/Redos supported - Warning on closing unsaved work - Clean UI (for ocd freaks) - Mature Chart editor (Character editor rework soon) diff --git a/art/readme.txt b/art/readme.txt index 99aa167e..0f924efd 100644 --- a/art/readme.txt +++ b/art/readme.txt @@ -1,30 +1,30 @@ - __ / -/ _ _ |_ |_ . _ -\__) (- |_ |_ | | ) - - __ -|_ _ _ _ | -| | (- (_| |( \/ - / - - _ _ _ -(_) | ) (_| - - __ -|_ _ . _| _ _ . _ |_ |_ _ _ |_ -| | | (_| (_| \/ | ) | (_) | ) |_ \/ (- (_| | ) - / _/ / + __ / +/ _ _ |_ |_ . _ +\__) (- |_ |_ | | ) + + __ +|_ _ _ _ | +| | (- (_| |( \/ + / + + _ _ _ +(_) | ) (_| + + __ +|_ _ . _| _ _ . _ |_ |_ _ _ |_ +| | | (_| (_| \/ | ) | (_) | ) |_ \/ (- (_| | ) + / _/ / HEY Thanks for downloadin Friday Night FUNKIN' If you downloaded this from any other place than ninja-muffin24.itch.io/FUNKIN -You might be in DANGER!!! +You might be in DANGER!!! The Itch.io release is the only official source for the desktop (PC, Mac, Linux) versions of the game! As of right now, the game is FREE! If you paid for it, you got SCAMMED! Now that that's out of the way.... -THANKS FOR DOWNLOADIN. +THANKS FOR DOWNLOADIN. #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#- PERMISSIONS XDDDD @@ -77,16 +77,16 @@ I love Tom Fulp. - Cameron ♪(´▽`) ################################################################################## - - _ _ _____ _ _ ____ ____ ___ _ _ _ _ ____ ____ -| \ | | | ____| | | | | / ___| | _ \ / _ \ | | | | | \ | | | _ \ / ___| -| \| | | _| | | /\ | | | | _ | |_) | | | | | | | | | | \| | | | | | \___ \ + + _ _ _____ _ _ ____ ____ ___ _ _ _ _ ____ ____ +| \ | | | ____| | | | | / ___| | _ \ / _ \ | | | | | \ | | | _ \ / ___| +| \| | | _| | | /\ | | | | _ | |_) | | | | | | | | | | \| | | | | | \___ \ | |\ | | |___ \ V V / | |_| | | _ < | |_| | | |_| | | |\ | | |_| | ___) | -|_| \_| |_____| \_/\_/ \____| |_| \_\ \___/ \___/ |_| \_| |____/ |____/ - _ _ _ ___ ___ __ _ _ _ _ _ -|_ | | |_ |_) \_/ | |_| | |\ | /__ |_ |_ | | |_ |_) \_/ / \ |\ | |_ +|_| \_| |_____| \_/\_/ \____| |_| \_\ \___/ \___/ |_| \_| |____/ |____/ + _ _ _ ___ ___ __ _ _ _ _ _ +|_ | | |_ |_) \_/ | |_| | |\ | /__ |_ |_ | | |_ |_) \_/ / \ |\ | |_ |_ \/ |_ | \ | | | | _|_ | \| \_| o |_)\/ |_ \/ |_ | \ | \_/ | \| |_ o - / / - + / / + ################################################################################## i stole this from stamper. \ No newline at end of file diff --git a/assets/data/global.hx b/assets/data/global.hx index 5e479c62..4c49ef69 100644 --- a/assets/data/global.hx +++ b/assets/data/global.hx @@ -1,3 +1,3 @@ // function update(elapsed:Float) - if (FlxG.keys.justPressed.F5) FlxG.resetState(); \ No newline at end of file + if (FlxG.keys.justPressed.F5) FlxG.resetState(); \ No newline at end of file diff --git a/assets/data/scripts/pixel.hx b/assets/data/scripts/pixel.hx index 1d14aa4e..cc8239cf 100644 --- a/assets/data/scripts/pixel.hx +++ b/assets/data/scripts/pixel.hx @@ -35,8 +35,8 @@ function onNoteCreation(event) { note.updateHitbox(); } -function onPostNoteCreation(event) { - var splashes = event.note; +function onPostNoteCreation(event) { + var splashes = event.note; if (pixelSplashes) splashes.splash = "pixel-default"; } diff --git a/assets/data/splashes/default.xml b/assets/data/splashes/default.xml index 352e4932..886588e3 100644 --- a/assets/data/splashes/default.xml +++ b/assets/data/splashes/default.xml @@ -1,5 +1,5 @@ - + diff --git a/assets/data/splashes/pixel-default.xml b/assets/data/splashes/pixel-default.xml index 99a30bb3..97b8bf34 100644 --- a/assets/data/splashes/pixel-default.xml +++ b/assets/data/splashes/pixel-default.xml @@ -1,6 +1,6 @@ - + diff --git a/assets/data/splashes/pixel-secret.xml b/assets/data/splashes/pixel-secret.xml index 09fb5697..e710f2cf 100644 --- a/assets/data/splashes/pixel-secret.xml +++ b/assets/data/splashes/pixel-secret.xml @@ -1,6 +1,6 @@ - + diff --git a/assets/data/splashes/secret.xml b/assets/data/splashes/secret.xml index 31adb1f6..9122578b 100644 --- a/assets/data/splashes/secret.xml +++ b/assets/data/splashes/secret.xml @@ -1,5 +1,5 @@ - + diff --git a/assets/data/stages/mall.xml b/assets/data/stages/mall.xml index 8da8a472..0edfa942 100644 --- a/assets/data/stages/mall.xml +++ b/assets/data/stages/mall.xml @@ -1,7 +1,7 @@ - + @@ -9,7 +9,7 @@ - + diff --git a/assets/data/stages/tank.xml b/assets/data/stages/tank.xml index 8ba6121f..7ade888d 100644 --- a/assets/data/stages/tank.xml +++ b/assets/data/stages/tank.xml @@ -26,7 +26,7 @@ - + diff --git a/assets/images/editors/charter/event-spr-add.xml b/assets/images/editors/charter/event-spr-add.xml index 92cd0504..5783f5c1 100644 --- a/assets/images/editors/charter/event-spr-add.xml +++ b/assets/images/editors/charter/event-spr-add.xml @@ -10,7 +10,7 @@ - + diff --git a/assets/images/editors/ui/topmenu.xml b/assets/images/editors/ui/topmenu.xml index 416300cf..433ab890 100644 --- a/assets/images/editors/ui/topmenu.xml +++ b/assets/images/editors/ui/topmenu.xml @@ -8,7 +8,7 @@ - + diff --git a/assets/shaders/chromaticAberration.frag b/assets/shaders/chromaticAberration.frag index aa1ca662..bd869adb 100644 --- a/assets/shaders/chromaticAberration.frag +++ b/assets/shaders/chromaticAberration.frag @@ -6,12 +6,12 @@ uniform vec2 blueOff; void main() { - vec2 uv = getCamPos(openfl_TextureCoordv); - vec4 col; - col.r = textureCam(bitmap, uv + redOff).r; - col.g = textureCam(bitmap, uv + greenOff).g; - col.b = textureCam(bitmap, uv + blueOff).b; - col.a = texture2D(bitmap, openfl_TextureCoordv).a; + vec2 uv = getCamPos(openfl_TextureCoordv); + vec4 col; + col.r = textureCam(bitmap, uv + redOff).r; + col.g = textureCam(bitmap, uv + greenOff).g; + col.b = textureCam(bitmap, uv + blueOff).b; + col.a = texture2D(bitmap, openfl_TextureCoordv).a; - gl_FragColor = col; + gl_FragColor = col; } \ No newline at end of file diff --git a/assets/shaders/coloredVignette.frag b/assets/shaders/coloredVignette.frag index a012e78f..531431d3 100644 --- a/assets/shaders/coloredVignette.frag +++ b/assets/shaders/coloredVignette.frag @@ -6,10 +6,10 @@ uniform float strength; void main() { vec2 uv = getCamPos(openfl_TextureCoordv); - vec3 col = pow(textureCam(bitmap, uv).rgb, vec3(1.0 / strength)); + vec3 col = pow(textureCam(bitmap, uv).rgb, vec3(1.0 / strength)); - float vignette = mix(1.0, 1.0 - amount, distance(uv, vec2(0.5))); - col = pow(mix(col * color, col, vignette), vec3(strength)); + float vignette = mix(1.0, 1.0 - amount, distance(uv, vec2(0.5))); + col = pow(mix(col * color, col, vignette), vec3(strength)); gl_FragColor = vec4(col, 1.0); } \ No newline at end of file diff --git a/assets/shaders/engine/colorPicker.frag b/assets/shaders/engine/colorPicker.frag index d31972d8..bc6c6e0c 100644 --- a/assets/shaders/engine/colorPicker.frag +++ b/assets/shaders/engine/colorPicker.frag @@ -3,9 +3,9 @@ // Used in colorwheel vec3 hsvToRgb(vec3 c) { //hsv.x = hue, hsv.y = saturation, hsv.z = value - vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); - vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); - return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); + vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0); + vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www); + return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y); } uniform float hue; diff --git a/assets/songs/test/scripts/modchart.hx b/assets/songs/test/scripts/modchart.hx index de01830f..df37fb12 100644 --- a/assets/songs/test/scripts/modchart.hx +++ b/assets/songs/test/scripts/modchart.hx @@ -21,7 +21,7 @@ function postUpdate(elapsed) { } } - + // for(s in strumLines) { // for(i in 0...4) { // var n = s.members[i]; @@ -29,7 +29,7 @@ function postUpdate(elapsed) { // n.angle = 180; // } // } - - // if (curSection != null) - // defaultCamZoom = curSection.mustHitSection ? 0.9 : 0.5; + + // if (curSection != null) + // defaultCamZoom = curSection.mustHitSection ? 0.9 : 0.5; } \ No newline at end of file diff --git a/project.xml b/project.xml index 5d17fa17..aee55825 100644 --- a/project.xml +++ b/project.xml @@ -7,7 +7,7 @@ package="com.yoshman29.codenameengine" version="0.1.0" company="Yoshman29" /> - diff --git a/source/funkin/backend/MusicBeatTransition.hx b/source/funkin/backend/MusicBeatTransition.hx index 6313c10b..34b02388 100644 --- a/source/funkin/backend/MusicBeatTransition.hx +++ b/source/funkin/backend/MusicBeatTransition.hx @@ -53,7 +53,7 @@ class MusicBeatTransition extends MusicBeatSubstate { finish(); } }); - + super.create(); } diff --git a/source/funkin/backend/assets/Paths.hx b/source/funkin/backend/assets/Paths.hx index 00aae99d..d8c6ba39 100644 --- a/source/funkin/backend/assets/Paths.hx +++ b/source/funkin/backend/assets/Paths.hx @@ -100,7 +100,7 @@ class Paths } return getPath('images/$key.$ext', library); } - + inline static public function script(key:String, ?library:String, isAssetsPath:Bool = false) { var scriptPath = isAssetsPath ? key : getPath(key, library); if (!OpenFlAssets.exists(scriptPath)) { diff --git a/source/funkin/backend/chart/EventsData.hx b/source/funkin/backend/chart/EventsData.hx index 36f20a2e..7c105d22 100644 --- a/source/funkin/backend/chart/EventsData.hx +++ b/source/funkin/backend/chart/EventsData.hx @@ -13,7 +13,7 @@ class EventsData { public static var defaultEventsList:Array = ["HScript Call", "Camera Movement", "Add Camera Zoom", "Camera Modulo Change", "Camera Flash", "BPM Change", "Scroll Speed Change", "Alt Animation Toggle", "Play Animation"]; public static var defaultEventsParams:Map> = [ "HScript Call" => [ - {name: "Function Name", type: TString, defValue: "myFunc"}, + {name: "Function Name", type: TString, defValue: "myFunc"}, {name: "Function Parameters (String split with commas)", type: TString, defValue: ""} ], "Camera Movement" => [{name: "Camera Target", type: TStrumLine, defValue: 0}], diff --git a/source/funkin/backend/scripting/DummyScript.hx b/source/funkin/backend/scripting/DummyScript.hx index 24ef2194..75080b45 100644 --- a/source/funkin/backend/scripting/DummyScript.hx +++ b/source/funkin/backend/scripting/DummyScript.hx @@ -5,7 +5,7 @@ package funkin.backend.scripting; */ class DummyScript extends Script { public var variables:Map = []; - + public override function get(v:String) {return variables.get(v);} public override function set(v:String, v2:Dynamic) {return variables.set(v, v2);} public override function onCall(method:String, parameters:Array):Dynamic { diff --git a/source/funkin/backend/system/MainState.hx b/source/funkin/backend/system/MainState.hx index 94b1a2d3..9a1502cd 100644 --- a/source/funkin/backend/system/MainState.hx +++ b/source/funkin/backend/system/MainState.hx @@ -41,7 +41,7 @@ class MainState extends FlxState { else if (addon.startsWith("[HIGH]")) _highPriorityAddons.insert(0, addon); else _noPriorityAddons.insert(0, addon); } - for (addon in _lowPriorityAddons) + for (addon in _lowPriorityAddons) Paths.assetsTree.addLibrary(ModsFolder.loadModLib('${ModsFolder.addonsPath}$addon', StringTools.ltrim(addon.substr("[LOW]".length)))); } if (ModsFolder.currentModFolder != null) diff --git a/source/funkin/backend/system/framerate/FlixelInfo.hx b/source/funkin/backend/system/framerate/FlixelInfo.hx index 5535c962..259b7f8f 100644 --- a/source/funkin/backend/system/framerate/FlixelInfo.hx +++ b/source/funkin/backend/system/framerate/FlixelInfo.hx @@ -13,7 +13,7 @@ class FlixelInfo extends FramerateCategory { var c:Int = 0; for(_ in FlxG.bitmap._cache.keys()) c++; - + _text = 'State: ${Type.getClassName(Type.getClass(FlxG.state))}'; _text += '\nObject Count: ${FlxG.state.members.length}'; _text += '\nCamera Count: ${FlxG.cameras.list.length}'; @@ -27,7 +27,7 @@ class FlixelInfo extends FramerateCategory { _text += '\nPoint Count: ${points._count}'; #end } - + this.text.text = _text; super.__enterFrame(t); } diff --git a/source/funkin/backend/system/framerate/MemoryCounter.hx b/source/funkin/backend/system/framerate/MemoryCounter.hx index 863bdb8c..01321f0d 100644 --- a/source/funkin/backend/system/framerate/MemoryCounter.hx +++ b/source/funkin/backend/system/framerate/MemoryCounter.hx @@ -7,7 +7,7 @@ import openfl.text.TextField; class MemoryCounter extends Sprite { public var memoryText:TextField; public var memoryPeakText:TextField; - + public var memory:Float = 0; public var memoryPeak:Float = 0; diff --git a/source/funkin/backend/system/framerate/StatsInfo.hx b/source/funkin/backend/system/framerate/StatsInfo.hx index 77a9cc9e..937bdb10 100644 --- a/source/funkin/backend/system/framerate/StatsInfo.hx +++ b/source/funkin/backend/system/framerate/StatsInfo.hx @@ -14,7 +14,7 @@ class StatsInfo extends FramerateCategory { _text = "totalDC: " + Context3DStats.totalDrawCalls(); _text += "\nstageDC: " + Context3DStats.contextDrawCalls(DrawCallContext.STAGE); _text += "\nstage3DDC: " + Context3DStats.contextDrawCalls(DrawCallContext.STAGE3D); - + this.text.text = _text; super.__enterFrame(t); } diff --git a/source/funkin/backend/system/github/GitHub.hx b/source/funkin/backend/system/github/GitHub.hx index eeb535c5..fa664112 100644 --- a/source/funkin/backend/system/github/GitHub.hx +++ b/source/funkin/backend/system/github/GitHub.hx @@ -179,12 +179,12 @@ class GitHub { return r; } private static function isRedirect(status:Int):Bool { - switch (status) { + switch (status) { // 301: Moved Permanently, 302: Found (Moved Temporarily), 307: Temporary Redirect, 308: Permanent Redirect - Nex - case 301 | 302 | 307 | 308 : - trace("Redirected with status code: " + status); + case 301 | 302 | 307 | 308 : + trace("Redirected with status code: " + status); return true; - } + } return false; } private static function __parseGitHubException(obj:Dynamic):GitHubException { diff --git a/source/funkin/backend/system/updating/AsyncUpdater.hx b/source/funkin/backend/system/updating/AsyncUpdater.hx index 52b59766..af7cfff5 100644 --- a/source/funkin/backend/system/updating/AsyncUpdater.hx +++ b/source/funkin/backend/system/updating/AsyncUpdater.hx @@ -21,14 +21,14 @@ class AsyncUpdater { public function new(releases:Array) { this.releases = releases; } - + public function execute() { Main.execAsync(installUpdates); } #end - - - #if windows + + + #if windows public static var executableGitHubName:String = "update-windows.exe"; public static var executableName:String = "CodenameEngine.exe"; #end @@ -49,7 +49,7 @@ class AsyncUpdater { public var lastTime:Float = 0; public var oldBytesLoaded:Float = 0; - + public function installUpdates() { prepareInstallationEnvironment(); downloadFiles(); @@ -64,7 +64,7 @@ class AsyncUpdater { progress.curFileName = e; trace('extracting file ${path}'); var reader = ZipUtil.openZip(path); - + progress.curZipProgress = new ZipProgress(); ZipUtil.uncompressZip(reader, './', null, progress.curZipProgress); // FileSystem.deleteFile(path); @@ -72,7 +72,7 @@ class AsyncUpdater { if (executableReplaced = FileSystem.exists('$path$executableName')) { progress.curFile = files.length; progress.curFileName = executableName; - + var progPath = Sys.programPath(); var bakFile = '${Path.withoutExtension(progPath)}.bak'; if (FileSystem.exists(bakFile)) @@ -133,7 +133,7 @@ class AsyncUpdater { downloadStream.addEventListener(ProgressEvent.PROGRESS, function(e) { progress.bytesLoaded = e.bytesLoaded; progress.bytesTotal = e.bytesTotal; - + var curTime = Lib.getTimer(); progress.downloadSpeed = (e.bytesLoaded - oldBytesLoaded) / ((curTime - lastTime) / 1000); @@ -160,7 +160,7 @@ class AsyncUpdater { public function prepareInstallationEnvironment() { progress.step = PREPARING; - + #if windows path = '${Sys.getEnv("TEMP")}\\Codename Engine\\Updater\\'; #else diff --git a/source/funkin/backend/system/updating/UpdateScreen.hx b/source/funkin/backend/system/updating/UpdateScreen.hx index d57a3d4a..4fbe4cf8 100644 --- a/source/funkin/backend/system/updating/UpdateScreen.hx +++ b/source/funkin/backend/system/updating/UpdateScreen.hx @@ -59,7 +59,7 @@ class UpdateScreen extends MusicBeatState { overSound = FlxG.sound.load(Paths.sound('gameOverEnd')); updater.execute(); - + FlxG.camera.addShader(rainbowShader = new CustomShader("engine/updaterShader")); } @@ -104,7 +104,7 @@ class UpdateScreen extends MusicBeatState { // update is done, play bf's anim FlxG.sound.music.stop(); overSound.play(); - + remove(generalProgress); remove(partProgress); generalProgress = FlxDestroyUtil.destroy(generalProgress); diff --git a/source/funkin/backend/system/updating/UpdateUtil.hx b/source/funkin/backend/system/updating/UpdateUtil.hx index 44b37beb..f8268b93 100644 --- a/source/funkin/backend/system/updating/UpdateUtil.hx +++ b/source/funkin/backend/system/updating/UpdateUtil.hx @@ -11,7 +11,7 @@ using funkin.backend.system.github.GitHub; class UpdateUtil { public static final repoOwner:String = "YoshiCrafter29"; public static final repoName:String = "CodenameTestRepo"; - + public static function init() { // deletes old bak file if it exists #if sys @@ -22,11 +22,11 @@ class UpdateUtil { } public static function checkForUpdates():UpdateCheckCallback { - var curTag = 'v${Application.current.meta.get('version')}'; + var curTag = 'v${Application.current.meta.get('version')}'; trace(curTag); - + var error = false; - + var newUpdates = __doReleaseFiltering(GitHub.getReleases(repoOwner, repoName, function(e) { error = true; }), curTag); @@ -35,7 +35,7 @@ class UpdateUtil { success: false, newUpdate: false }; - + if (newUpdates.length <= 0) { return { success: true, diff --git a/source/funkin/backend/utils/XMLUtil.hx b/source/funkin/backend/utils/XMLUtil.hx index 0ac1bef7..23ed0516 100644 --- a/source/funkin/backend/utils/XMLUtil.hx +++ b/source/funkin/backend/utils/XMLUtil.hx @@ -180,13 +180,13 @@ class XMLUtil { } /** - * Creates a new sprite based on a XML node. - */ + * Creates a new sprite based on a XML node. + */ public static inline function createSpriteFromXML(node:Access, parentFolder:String = "", defaultAnimType:XMLAnimType = BEAT, ?cl:Class, ?args:Array):FunkinSprite { - if(cl == null) cl = FunkinSprite; - if(args == null) args = []; - return loadSpriteFromXML(Type.createInstance(cl, args), node, parentFolder, defaultAnimType); - } + if(cl == null) cl = FunkinSprite; + if(args == null) args = []; + return loadSpriteFromXML(Type.createInstance(cl, args), node, parentFolder, defaultAnimType); + } public static function extractAnimFromXML(anim:Access, animType:XMLAnimType = NONE, loop:Bool = false):AnimData { var animData:AnimData = { diff --git a/source/funkin/editors/SaveWarning.hx b/source/funkin/editors/SaveWarning.hx index 86dedecb..b475e3e2 100644 --- a/source/funkin/editors/SaveWarning.hx +++ b/source/funkin/editors/SaveWarning.hx @@ -21,7 +21,7 @@ class SaveWarning { if (warningFunc != null) warningFunc(closingWindow); if (FlxG.state != null && FlxG.state is UIState) { - FlxG.state.openSubState(new UIWarningSubstate("Unsaved Changes!", "Your changes will be lost if you don't save them. (Can't be recovered)\n\n\nWould you like to Cancel?", + FlxG.state.openSubState(new UIWarningSubstate("Unsaved Changes!", "Your changes will be lost if you don't save them. (Can't be recovered)\n\n\nWould you like to Cancel?", [ { label: "Cancel", diff --git a/source/funkin/editors/character/CharacterEditor.hx b/source/funkin/editors/character/CharacterEditor.hx index 25c2d33b..3fb76ed0 100644 --- a/source/funkin/editors/character/CharacterEditor.hx +++ b/source/funkin/editors/character/CharacterEditor.hx @@ -52,7 +52,7 @@ class CharacterEditor extends UIState { WindowUtils.endfix = " (Character Editor)"; SaveWarning.selectionClass = CharacterSelection; SaveWarning.saveFunc = () -> {_file_save(null);}; - + topMenu = [ { label: "File", diff --git a/source/funkin/editors/character/CharacterInfoScreen.hx b/source/funkin/editors/character/CharacterInfoScreen.hx index d6be7ba7..f7645ca0 100644 --- a/source/funkin/editors/character/CharacterInfoScreen.hx +++ b/source/funkin/editors/character/CharacterInfoScreen.hx @@ -182,7 +182,7 @@ class CharacterInfoScreen extends UISubstateWindow { xml.set("sprite", spriteTextBox.label.text); if (iconColorWheel.colorChanged) xml.set("color", iconColorWheel.curColor.toHexString(false).replace("0x", "#")); - for (val in customPropertiesButtonList.buttons.members) + for (val in customPropertiesButtonList.buttons.members) xml.set(val.propertyText.label.text, val.valueText.label.text); for (anim in character.animDatas) diff --git a/source/funkin/editors/charter/Charter.hx b/source/funkin/editors/charter/Charter.hx index 38023cfc..376488a6 100644 --- a/source/funkin/editors/charter/Charter.hx +++ b/source/funkin/editors/charter/Charter.hx @@ -99,7 +99,7 @@ class Charter extends UIState { WindowUtils.endfix = " (Chart Editor)"; SaveWarning.selectionClass = CharterSelection; SaveWarning.saveFunc = () -> {_file_save(null);}; - + topMenu = [ { label: "File", @@ -501,7 +501,7 @@ class Charter extends UIState { for(strL in PlayState.SONG.strumLines) createStrumline(strumLines.members.length, strL, false, false); - + // create notes notesGroup.autoSort = false; var noteCount:Int = 0; @@ -669,11 +669,11 @@ class Charter extends UIState { for (s in selection) { if (s.draggable) { var changePoint:FlxPoint = FlxPoint.get(verticalChange, horizontalChange); - if (!FlxG.keys.pressed.SHIFT) + if (!FlxG.keys.pressed.SHIFT) changePoint.x -= ((s.step + verticalChange) - quantStepRounded(s.step+verticalChange, verticalChange > 0 ? 0.35 : 0.65)); var boundedChange:FlxPoint = changePoint.clone(); - + // Some maths, so cool bro -lunar (i dont know why i quopte my self here) if (s.step + changePoint.x < 0) boundedChange.x += Math.abs(s.step + changePoint.x); if (s.step + changePoint.x > __endStep-1) boundedChange.x -= (s.step + changePoint.x) - (__endStep-1); @@ -702,7 +702,7 @@ class Charter extends UIState { } case NONE: if (FlxG.mouse.justPressed) - FlxG.mouse.getWorldPosition(charterCamera, dragStartPos); + FlxG.mouse.getWorldPosition(charterCamera, dragStartPos); if (gridBackdropDummy.hovered) { // AUTO DETECT @@ -711,11 +711,11 @@ class Charter extends UIState { var id = Math.floor(mousePos.x / 40); var mouseOnGrid = id >= 0 && id < 4 * gridBackdrops.strumlinesAmount && mousePos.y >= 0; - + if (FlxG.mouse.justReleased) { for (n in selection) n.selected = false; selection = []; - + if (mouseOnGrid && mousePos.y > 0 && mousePos.y < (__endStep)*40) { var note = new CharterNote(); note.updatePos( @@ -760,7 +760,7 @@ class Charter extends UIState { var change:Float = Math.max((mousePos.y-(FlxG.keys.pressed.SHIFT ? dragStartPos.y : quantStep(dragStartPos.y))) / 40, -n.susLength); n.tempSusLength = change; - if (!FlxG.keys.pressed.SHIFT) + if (!FlxG.keys.pressed.SHIFT) n.tempSusLength -= (n.susLength + change) - quantStepRounded(n.susLength + change, change > 0 ? 0.35 : 0.65); @:privateAccess n.__susInstaLerp = FlxG.keys.pressed.SHIFT; }); @@ -777,7 +777,7 @@ class Charter extends UIState { undoChanges.push({before: oldSusLen, after: n.susLength, note: n}); }); undos.addToUndo(CEditSustains(undoChanges)); - + gridActionType = NONE; currentCursor = ARROW; } @@ -785,7 +785,7 @@ class Charter extends UIState { addEventSpr.selectable = !selectionBox.visible; var inBoundsY:Bool = (mousePos.y > 0 && mousePos.y < (__endStep)*40); - + // Event Spr if (mousePos.x < 0 && mousePos.x > -addEventSpr.bWidth && gridActionType == NONE && inBoundsY) { addEventSpr.incorporeal = false; @@ -927,7 +927,7 @@ class Charter extends UIState { var i = 0; var toBeDeleted:Selection = []; for (note in notesGroup.members) - if (note.strumLineID == strumLineID) { + if (note.strumLineID == strumLineID) { undoNotes.push(buildNote(note)); toBeDeleted.push(note); } @@ -1019,8 +1019,8 @@ class Charter extends UIState { var buttonI:Int = 0; for (button in quantButtons) { - button.visible = ((button.quant == quant) || - (button.quant == quants[FlxMath.wrap(quants.indexOf(quant)-1, 0, quants.length-1)]) || + button.visible = ((button.quant == quant) || + (button.quant == quants[FlxMath.wrap(quants.indexOf(quant)-1, 0, quants.length-1)]) || (button.quant == quants[FlxMath.wrap(quants.indexOf(quant)+1, 0, quants.length-1)])); button.selectable = button.visible; if (!button.visible) continue; @@ -1039,7 +1039,7 @@ class Charter extends UIState { noteTypeText.y = Std.int((noteTopButton.bHeight - noteTypeText.height) / 2); } noteTypeText.text = '($noteType) ${noteTypes[noteType-1] == null ? "Default Note" : noteTypes[noteType-1]}'; - + super.update(elapsed); scrollBar.size = (FlxG.height / 40 / charterCamera.zoom); @@ -1245,7 +1245,7 @@ class Charter extends UIState { } selection = sObjects; _edit_copy(_); // to fix stupid bugs - + undos.addToUndo(CCreateSelection(sObjects.copy())); } @@ -1263,7 +1263,7 @@ class Charter extends UIState { function _edit_undo(_) { if (strumLines.isDragging || selectionDragging || subState != null) return; - + selection = []; var undo = undos.undo(); switch(undo) { @@ -1286,7 +1286,7 @@ class Charter extends UIState { case CSelectionDrag(selectionDrags): for (s in selectionDrags) if (s.selectable.draggable) s.selectable.handleDrag(s.change * -1); - + selection = [for (s in selectionDrags) s.selectable]; case CEditSustains(changes): for(n in changes) @@ -1466,7 +1466,7 @@ class Charter extends UIState { null ]; - for (_quant in quants) + for (_quant in quants) newChilds.push({ label: '${_quant}x Grid Snap', onSelect: (_) -> {setquant(_quant); buildSnapsUI();}, @@ -1485,7 +1485,7 @@ class Charter extends UIState { function _note_selectall(_) { selection = [for (note in notesGroup.members) note]; - } + } function _note_selectmeasure(_) { selection = [for (note in notesGroup.members) @@ -1614,7 +1614,7 @@ class Charter extends UIState { } notesGroup.sortNotes(); for(n in notesGroup.members) { - if (PlayState.SONG.strumLines[n.strumLineID] != null) + if (PlayState.SONG.strumLines[n.strumLineID] != null) PlayState.SONG.strumLines[n.strumLineID].notes.push(buildNote(n)); } buildEvents(); @@ -1681,7 +1681,7 @@ class Charter extends UIState { newChanges[i] = CSelectionDrag([ for (selectionDrag in selectionDrags) { - selectable: __relinkSingleSelection(selectionDrag.selectable), + selectable: __relinkSingleSelection(selectionDrag.selectable), change: selectionDrag.change } ]); @@ -1725,7 +1725,7 @@ class Charter extends UIState { songPosition: Conductor.songPosition, playbackSpeed: playBackSlider.value, quantSelected: quant, - noteTypeSelected: noteType, + noteTypeSelected: noteType, strumlinesDraggable: strumLines.draggable, hitSounds: [for (strumLine in strumLines.members) strumLine.hitsounds], mutedVocals: [for (strumLine in strumLines.members) !(strumLine.vocals.volume > 0)], diff --git a/source/funkin/editors/charter/CharterBackdropGroup.hx b/source/funkin/editors/charter/CharterBackdropGroup.hx index f99571ab..851df461 100644 --- a/source/funkin/editors/charter/CharterBackdropGroup.hx +++ b/source/funkin/editors/charter/CharterBackdropGroup.hx @@ -46,7 +46,7 @@ class CharterBackdropGroup extends FlxTypedGroup { public override function update(elapsed:Float) { for (grid in members) grid.active = grid.visible = false; - + super.update(elapsed); for (i => strumLine in strumLineGroup.members) { @@ -74,7 +74,6 @@ class CharterBackdropGroup extends FlxTypedGroup { grid.active = grid.visible = true; grid.updateSprites(); } - } public var draggingObj:CharterBackdrop = null; @@ -135,7 +134,7 @@ class CharterBackdrop extends FlxTypedGroup { beatSeparator = new FlxBackdrop(null, Y, 0, 0); beatSeparator.y = -1; beatSeparator.visible = Options.charterShowBeats; - + for(sep in [sectionSeparator, beatSeparator]) { sep.makeSolid(1, 1, -1); sep.alpha = 0.5; diff --git a/source/funkin/editors/charter/CharterEvent.hx b/source/funkin/editors/charter/CharterEvent.hx index ff62f465..89a5d0d9 100644 --- a/source/funkin/editors/charter/CharterEvent.hx +++ b/source/funkin/editors/charter/CharterEvent.hx @@ -51,7 +51,7 @@ class CharterEvent extends UISliceSprite implements ICharterSelectable { if (Assets.exists(Paths.pack('events/$name'))) { var packimg = Assets.getText(Paths.pack('events/$name')).split('________PACKSEP________')[3]; if (isBase64 = (packimg != null)) - path = Assets.getText(Paths.pack('events/$name')).split('________PACKSEP________')[3]; + path = Assets.getText(Paths.pack('events/$name')).split('________PACKSEP________')[3]; } var spr = new FlxSprite().loadGraphic(isBase64 ? openfl.display.BitmapData.fromBase64(path.trim(), 'UTF8') : path); return spr; diff --git a/source/funkin/editors/charter/CharterNote.hx b/source/funkin/editors/charter/CharterNote.hx index 1ea7804d..1d130842 100644 --- a/source/funkin/editors/charter/CharterNote.hx +++ b/source/funkin/editors/charter/CharterNote.hx @@ -31,7 +31,7 @@ class CharterNote extends UISprite implements ICharterSelectable { public function new() { super(); - + antialiasing = true; ID = -1; loadGraphic(Paths.image('editors/charter/note'), true, 157, 154); animation.add("note", [for(i in 0...frames.frames.length) i], 0, true); @@ -154,7 +154,7 @@ class CharterNote extends UISprite implements ICharterSelectable { if (strumLine != null) { sustainSpr.alpha = alpha = !strumLine.strumLine.visible ? (__passed ? 0.2 : 0.4) : (__passed ? 0.6 : 1); - typeText.alpha = !strumLine.strumLine.visible ? (__passed ? 0.4 : 0.6) : (__passed ? 0.8 : 1); + typeText.alpha = !strumLine.strumLine.visible ? (__passed ? 0.4 : 0.6) : (__passed ? 0.8 : 1); } colorTransform.redMultiplier = colorTransform.greenMultiplier = colorTransform.blueMultiplier = selected ? 0.75 : 1; diff --git a/source/funkin/editors/charter/CharterNoteGroup.hx b/source/funkin/editors/charter/CharterNoteGroup.hx index 78995dca..66530af1 100644 --- a/source/funkin/editors/charter/CharterNoteGroup.hx +++ b/source/funkin/editors/charter/CharterNoteGroup.hx @@ -64,7 +64,7 @@ class CharterNoteGroup extends FlxTypedGroup { if (autoSort && members.length != __lastSort) sortNotes(); - + forEach((n) -> { if(n.exists && n.active) { n.cameras = n.__lastDrawCameras = cameras; diff --git a/source/funkin/editors/charter/CharterNoteHoverer.hx b/source/funkin/editors/charter/CharterNoteHoverer.hx index 46997a9b..e20000a2 100644 --- a/source/funkin/editors/charter/CharterNoteHoverer.hx +++ b/source/funkin/editors/charter/CharterNoteHoverer.hx @@ -44,18 +44,18 @@ class CharterNoteHoverer extends CharterNote { if (Charter.instance.gridActionType == NOTE_DRAG) { var verticalChange:Float = (__mousePos.y - Charter.instance.dragStartPos.y) / 40; var horizontalChange:Int = CoolUtil.floorInt((__mousePos.x - (Std.int(Charter.instance.dragStartPos.x / 40) * 40)) / 40); - + for (s in Charter.selection) { if (s != null && s.draggable && s is CharterNote) { var draggingNote:CharterNote = cast(s, CharterNote); y = (draggingNote.step + verticalChange); - if (!FlxG.keys.pressed.SHIFT) + if (!FlxG.keys.pressed.SHIFT) y -= ((draggingNote.step + verticalChange) - Charter.instance.quantStepRounded(draggingNote.step+verticalChange, verticalChange > 0 ? 0.35 : 0.65)); y *= 40; var newID:Int = Std.int(FlxMath.bound(draggingNote.fullID + horizontalChange, 0, (Charter.instance.strumLines.members.length*4)-1)); x = (id=newID) * 40; y = FlxMath.bound(y, 0, (Charter.instance.__endStep*40) - height); - + angle = switch(animation.curAnim.curFrame = (draggingNote.id % 4)) { case 0: -90; case 1: 180; diff --git a/source/funkin/editors/charter/CharterNoteTypesList.hx b/source/funkin/editors/charter/CharterNoteTypesList.hx index 7eb3abce..b1cc28b6 100644 --- a/source/funkin/editors/charter/CharterNoteTypesList.hx +++ b/source/funkin/editors/charter/CharterNoteTypesList.hx @@ -108,7 +108,7 @@ class NoteTypeButton extends UIButton { var path:String = 'game/notes/default'; if (Assets.exists(Paths.image('game/notes/${notetype}'))) path = 'game/notes/${notetype}'; - + noteSpr.frames = Paths.getFrames(path); noteSpr.animation.addByPrefix('scroll', 'green0'); noteSpr.animation.play("scroll"); diff --git a/source/funkin/editors/charter/CharterSelection.hx b/source/funkin/editors/charter/CharterSelection.hx index ba1acdc4..f9a1ea5e 100644 --- a/source/funkin/editors/charter/CharterSelection.hx +++ b/source/funkin/editors/charter/CharterSelection.hx @@ -29,7 +29,7 @@ class CharterSelection extends EditorTreeMenu { for(s in freeplayList.songs) new EditorIconOption(s.name, "Press ACCEPT to choose a difficulty to edit.", s.icon, function() { curSong = s; var list:Array = [ - for(d in s.difficulties) if (d != "") + for(d in s.difficulties) if (d != "") new TextOption(d, "Press ACCEPT to edit the chart for the selected difficulty", function() { FlxG.switchState(new Charter(s.name, d)); }) diff --git a/source/funkin/editors/charter/CharterStrumLineGroup.hx b/source/funkin/editors/charter/CharterStrumLineGroup.hx index a342c779..483b62ce 100644 --- a/source/funkin/editors/charter/CharterStrumLineGroup.hx +++ b/source/funkin/editors/charter/CharterStrumLineGroup.hx @@ -79,7 +79,7 @@ class CharterStrumLineGroup extends FlxTypedGroup { fixEvents(); } - public inline function fixEvents() { + public inline function fixEvents() { for (i in Charter.instance.eventsGroup.members) { for (j in i.events) { var paramTypes:Array = EventsData.getEventParams(j.name); diff --git a/source/funkin/editors/charter/CharterStrumlineScreen.hx b/source/funkin/editors/charter/CharterStrumlineScreen.hx index 5af1b606..3b8f7920 100644 --- a/source/funkin/editors/charter/CharterStrumlineScreen.hx +++ b/source/funkin/editors/charter/CharterStrumlineScreen.hx @@ -63,7 +63,7 @@ class CharterStrumlineScreen extends UISubstateWindow { var charFileList = Character.getList(true); if (charFileList.length == 0) charFileList = Character.getList(false); - + charactersList = new UIButtonList(15, title.y + title.height + 36, 250, 269, "", FlxPoint.get(250, 54), null, 0); charactersList.addButton.callback = () -> charactersList.add(new CharacterButton(0, 0, "New Char", charFileList, charactersList)); charactersList.cameraSpacing = 0; @@ -142,7 +142,7 @@ class CharterStrumlineScreen extends UISubstateWindow { closeButton.color = 0xFFFF0000; var suffixlist = ["NONE"]; - for (i in Paths.getFolderContent('songs/${Charter.__song.toLowerCase()}/song')) + for (i in Paths.getFolderContent('songs/${Charter.__song.toLowerCase()}/song')) if (i.startsWith("Voices")) { i = haxe.io.Path.withoutExtension(i.substr("Voices".length)); if (i == "") continue; diff --git a/source/funkin/editors/ui/UIAudioPlayer.hx b/source/funkin/editors/ui/UIAudioPlayer.hx index ad1ba457..b6b95448 100644 --- a/source/funkin/editors/ui/UIAudioPlayer.hx +++ b/source/funkin/editors/ui/UIAudioPlayer.hx @@ -87,7 +87,7 @@ class UIAudioPlayer extends UIButton { playingSprite.animation.play(sound.playing ? "playing" : "paused"); timeText.text = '${FlxStringUtil.formatTime(sound.time/1000, true)} / ${FlxStringUtil.formatTime(sound.length/1000)}'; - if(timeBarPlayer.clipRect == null) + if(timeBarPlayer.clipRect == null) timeBarPlayer.clipRect = new FlxRect(0, 0, timeBarPlayer.frameWidth, timeBarPlayer.frameHeight); timeBarPlayer.clipRect.x = timeBarPlayer.frameWidth * (sound.time/sound.length); @@ -106,13 +106,13 @@ class UIAudioPlayer extends UIButton { var spritePos:FlxPoint = sprite.getScreenPosition(FlxPoint.get(), __lastDrawCameras[0]); - if (((mousePos.x > (spritePos.x)) && (mousePos.x < (spritePos.x) + timeBar.barWidth)) + if (((mousePos.x > (spritePos.x)) && (mousePos.x < (spritePos.x) + timeBar.barWidth)) && ((mousePos.y > (spritePos.y)) && (mousePos.y < (spritePos.y) + timeBar.barHeight))) { if (FlxG.mouse.justPressed) { draggingObj = sprite; wasPlaying = draggingObj == timeBar ? sound.playing : false; } - + if (FlxG.mouse.pressed) { if (draggingObj == timeBar) { if (sound.playing) sound.pause(); @@ -137,7 +137,7 @@ class UIAudioPlayer extends UIButton { super.destroy(); sound.stop(); - @:privateAccess sound.reset(); + @:privateAccess sound.reset(); bytes = null; } } \ No newline at end of file diff --git a/source/funkin/editors/ui/UIButtonList.hx b/source/funkin/editors/ui/UIButtonList.hx index 59d88971..f6fbc3a1 100644 --- a/source/funkin/editors/ui/UIButtonList.hx +++ b/source/funkin/editors/ui/UIButtonList.hx @@ -121,7 +121,6 @@ class UIButtonList extends UIWindow { if (dragCallback != null) dragCallback(cast button, button.ID, i); button.ID = i; // Ok back to normal :D } - } addButton.selectable = (hovered && !dragging); diff --git a/source/funkin/editors/ui/UIColorwheel.hx b/source/funkin/editors/ui/UIColorwheel.hx index a25b41bd..421814c4 100644 --- a/source/funkin/editors/ui/UIColorwheel.hx +++ b/source/funkin/editors/ui/UIColorwheel.hx @@ -91,7 +91,7 @@ class UIColorwheel extends UISliceSprite { } inline function updateColorPickerSelector() - colorPickerSelector.selector.setPosition(colorPicker.x + (colorPicker.width *saturation) - 8, colorPicker.y + (colorPicker.height + (colorPicker.height * -brightness))- 8); + colorPickerSelector.selector.setPosition(colorPicker.x + (colorPicker.width *saturation) - 8, colorPicker.y + (colorPicker.height + (colorPicker.height * -brightness))- 8); inline function updateColorPickerMouse(mousePos:FlxPoint) { saturation = mousePos.x/colorPicker.width; brightness = 1 + -(mousePos.y/colorPicker.height); diff --git a/source/funkin/editors/ui/UISliceSprite.hx b/source/funkin/editors/ui/UISliceSprite.hx index 9556a521..09226205 100644 --- a/source/funkin/editors/ui/UISliceSprite.hx +++ b/source/funkin/editors/ui/UISliceSprite.hx @@ -55,7 +55,7 @@ class UISliceSprite extends UISprite { frame = topleft; setPosition(x, y); __setSize( - topleft.frame.width * Math.min(bWidth/(topleft.frame.width*2), 1), + topleft.frame.width * Math.min(bWidth/(topleft.frame.width*2), 1), topleft.frame.height * Math.min(bHeight/(topleft.frame.height*2), 1) ); super.drawSuper(); @@ -72,7 +72,7 @@ class UISliceSprite extends UISprite { setPosition(x + bWidth - (topright.frame.width * Math.min(bWidth/(topright.frame.width*2), 1)), y); frame = topright; __setSize( - topright.frame.width * Math.min(bWidth/(topright.frame.width*2), 1), + topright.frame.width * Math.min(bWidth/(topright.frame.width*2), 1), topright.frame.height * Math.min(bHeight/(topright.frame.height*2), 1) ); super.drawSuper(); @@ -110,7 +110,7 @@ class UISliceSprite extends UISprite { frame = bottomleft; setPosition(x, y + bHeight - (bottomleft.frame.height * Math.min(bHeight/(bottomleft.frame.height*2), 1))); __setSize( - bottomleft.frame.width * Math.min(bWidth/(bottomleft.frame.width*2), 1), + bottomleft.frame.width * Math.min(bWidth/(bottomleft.frame.width*2), 1), bottomleft.frame.height * Math.min(bHeight/(bottomleft.frame.height*2), 1) ); super.drawSuper(); @@ -126,11 +126,11 @@ class UISliceSprite extends UISprite { // BOTTOM RIGHT frame = bottomright; setPosition( - x + bWidth - (bottomright.frame.width * Math.min(bWidth/(bottomright.frame.width*2), 1)), + x + bWidth - (bottomright.frame.width * Math.min(bWidth/(bottomright.frame.width*2), 1)), y + bHeight - (bottomright.frame.height * Math.min(bHeight/(bottomright.frame.height*2), 1)) ); __setSize( - bottomright.frame.width * Math.min(bWidth/(bottomright.frame.width*2), 1), + bottomright.frame.width * Math.min(bWidth/(bottomright.frame.width*2), 1), bottomright.frame.height * Math.min(bHeight/(bottomright.frame.height*2), 1) ); super.drawSuper(); diff --git a/source/funkin/editors/ui/UISlider.hx b/source/funkin/editors/ui/UISlider.hx index 8c5a4537..277c7b95 100644 --- a/source/funkin/editors/ui/UISlider.hx +++ b/source/funkin/editors/ui/UISlider.hx @@ -43,21 +43,21 @@ class UISlider extends UISprite { makeGraphic(barWidth, 12, 0x00000000, true); this.drawRoundRect(0, 0, barWidth, 12, 8, 6, 0xFFC0C0C0); - this.drawRoundRect(1, 1, barWidth-2, 12-2, 8, 5, 0xFF140013); + this.drawRoundRect(1, 1, barWidth-2, 12-2, 8, 5, 0xFF140013); cursor = BUTTON; - progressbar = new UISprite(centered ? barWidth/2 : 0); + progressbar = new UISprite(centered ? barWidth/2 : 0); progressbar.makeGraphic(barWidth, 8, 0x00000000, true); progressbar.drawRoundRect(2, 0, barWidth-4, 8, 8, 2, 0xFFFFFFFF); - progressbar.origin.x = 0; progressbar.colorTransform.color = 0xFF67009B; - members.push(progressbar); + progressbar.origin.x = 0; progressbar.colorTransform.color = 0xFF67009B; + members.push(progressbar); this.value = value; visualProgress = __barProgress; members.push(startText = new UIText(x, y, 0, Std.string(segments[0].start).replace("0.", "."))); members.push(endText = new UIText(x + (barWidth) + 8, y, 0, Std.string(segments[segments.length-1].end).replace("0.", "."))); - + for (i in 0...2) { var selectableBar:UISprite = new UISprite(x,y); selectableBar.loadGraphic(Paths.image("editors/ui/slider")); @@ -91,14 +91,14 @@ class UISlider extends UISprite { var visualProgress:Float = 0; var __stepperWidth = 25; - + public override function update(elapsed:Float) { selectableHitbox.follow(this, 0, (height-selectableHitbox.height)/2); __stepperWidth = valueStepper.label.text.length <= 0 ? 25 : Std.int(valueStepper.label.textField.width) + 12; valueStepper.bWidth = Std.int(FlxMath.lerp(valueStepper.bWidth, __stepperWidth, 1/2.25)); valueStepper.follow(this, -startText.width-10 - valueStepper.bWidth - 4, (height-valueStepper.bHeight)/2); - + var lastBarProgress:Float = __barProgress; if (selectableHitbox.hovered && FlxG.mouse.pressed) { @@ -111,13 +111,13 @@ class UISlider extends UISprite { if (onChange != null) onChange(@:bypassAccessor value = __calcValue(__barProgress)); valueStepper.value = value; } - + visualProgress = FlxMath.lerp(visualProgress, __barProgress, 1/2.25); progressbar.follow(this, progressCentered ? barWidth/2 : 0, (height-progressbar.height)/2); progressbar.scale.x = FlxMath.bound(visualProgress-(progressCentered?0.5:0),-1,1); progressbar.colorTransform.color = FlxColor.interpolate(progressbar.colorTransform.color, selectableHitbox.hovered ? 0xFF7F00BF : 0xFF67009B, 1/14); - selectableBar.follow(this, (visualProgress * barWidth) - (selectableBar.width/2), (height-selectableBar.height)/2); selectableBarHighlight.follow(selectableBar); + selectableBar.follow(this, (visualProgress * barWidth) - (selectableBar.width/2), (height-selectableBar.height)/2); selectableBarHighlight.follow(selectableBar); selectableBarHighlight.alpha = FlxMath.lerp(selectableBarHighlight.alpha, selectableHitbox.hovered ? 0.1: 0, 1/14); startText.follow(this, -startText.width-10, (height/2) - (startText.height/2)); @@ -128,13 +128,13 @@ class UISlider extends UISprite { private function __calcValue(progress:Float):Float { var totalProgress:Float = 0; - for (segment in segments) { - if (progress < totalProgress + segment.size) { - var relativeProgress = (progress - totalProgress) / segment.size; - return FlxMath.remapToRange(relativeProgress, 0, 1, segment.start, segment.end); - } - totalProgress += segment.size; - } + for (segment in segments) { + if (progress < totalProgress + segment.size) { + var relativeProgress = (progress - totalProgress) / segment.size; + return FlxMath.remapToRange(relativeProgress, 0, 1, segment.start, segment.end); + } + totalProgress += segment.size; + } return segments[segments.length-1].end; } @@ -142,14 +142,14 @@ class UISlider extends UISprite { if (value >= segments[segments.length-1].end) return 1; if (value <= segments[0].start) return 0; - var totalProgress:Float = 0; - for (segment in segments) { - if (value >= segment.start && value <= segment.end) { - var relativeProgress = FlxMath.remapToRange(value, segment.start, segment.end, 0, 1); - return totalProgress + relativeProgress * segment.size; - } - totalProgress += segment.size; - } + var totalProgress:Float = 0; + for (segment in segments) { + if (value >= segment.start && value <= segment.end) { + var relativeProgress = FlxMath.remapToRange(value, segment.start, segment.end, 0, 1); + return totalProgress + relativeProgress * segment.size; + } + totalProgress += segment.size; + } return -1; } } \ No newline at end of file diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index c567b3c5..fd9b13e7 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -649,7 +649,7 @@ class PlayState extends MusicBeatState var strLine = new StrumLine(chars, startingPos, strumLine.strumScale == null ? 1 : strumLine.strumScale, - strumLine.type == 2 || (!coopMode && !((strumLine.type == 1 && !opponentMode) || (strumLine.type == 0 && opponentMode))), + strumLine.type == 2 || (!coopMode && !((strumLine.type == 1 && !opponentMode) || (strumLine.type == 0 && opponentMode))), strumLine.type != 1, coopMode ? (strumLine.type == 1 ? controlsP1 : controlsP2) : controls, strumLine.vocalsSuffix ); @@ -758,7 +758,7 @@ class PlayState extends MusicBeatState SaveWarning.selectionClass = CharterSelection; SaveWarning.warningFunc = saveWarn; SaveWarning.saveFunc = () -> { - @:privateAccess Chart.save('${Paths.getAssetsRoot()}/songs/${Charter.__song.toLowerCase()}', + @:privateAccess Chart.save('${Paths.getAssetsRoot()}/songs/${Charter.__song.toLowerCase()}', PlayState.SONG, Charter.__diff.toLowerCase(), {saveMetaInChart: false, saveEventsInChart: true}); } } diff --git a/source/funkin/game/cutscenes/ScriptedCutscene.hx b/source/funkin/game/cutscenes/ScriptedCutscene.hx index 522ad668..3f36f1af 100644 --- a/source/funkin/game/cutscenes/ScriptedCutscene.hx +++ b/source/funkin/game/cutscenes/ScriptedCutscene.hx @@ -51,7 +51,7 @@ class ScriptedCutscene extends Cutscene { script.call("destroy"); super.destroy(); } - + // VIDEOS #if REGION public function startVideo(path:String, ?callback:Void->Void) { diff --git a/source/funkin/menus/FreeplayState.hx b/source/funkin/menus/FreeplayState.hx index f88b8d99..0a6f3493 100644 --- a/source/funkin/menus/FreeplayState.hx +++ b/source/funkin/menus/FreeplayState.hx @@ -119,7 +119,7 @@ class FreeplayState extends MusicBeatState DiscordUtil.changePresence("In the Menus", null); super.create(); - + // LOAD CHARACTERS bg = new FlxSprite(0, 0).loadAnimatedGraphic(Paths.image('menus/menuDesat')); diff --git a/source/funkin/menus/GitarooPause.hx b/source/funkin/menus/GitarooPause.hx index a8448b4e..b1741978 100644 --- a/source/funkin/menus/GitarooPause.hx +++ b/source/funkin/menus/GitarooPause.hx @@ -19,25 +19,25 @@ class GitarooPause extends MusicBeatState if (FlxG.sound.music != null) FlxG.sound.music.stop(); - var bg:FlxSprite = new FlxSprite().loadAnimatedGraphic(Paths.image('menus/pauseAlt//pauseBG')); + var bg:FlxSprite = new FlxSprite().loadAnimatedGraphic(Paths.image('menus/pauseAlt/pauseBG')); add(bg); var bf:FlxSprite = new FlxSprite(0, 30); - bf.frames = Paths.getFrames('menus/pauseAlt//bfLol'); + bf.frames = Paths.getFrames('menus/pauseAlt/bfLol'); bf.animation.addByPrefix('lol', "funnyThing", 13); bf.animation.play('lol'); add(bf); bf.screenCenter(X); replayButton = new FlxSprite(FlxG.width * 0.28, FlxG.height * 0.7); - replayButton.frames = Paths.getFrames('menus/pauseAlt//pauseUI'); + replayButton.frames = Paths.getFrames('menus/pauseAlt/pauseUI'); replayButton.animation.addByPrefix('selected', 'bluereplay', 0, false); replayButton.animation.appendByPrefix('selected', 'yellowreplay'); replayButton.animation.play('selected'); add(replayButton); cancelButton = new FlxSprite(FlxG.width * 0.58, replayButton.y); - cancelButton.frames = Paths.getFrames('menus/pauseAlt//pauseUI'); + cancelButton.frames = Paths.getFrames('menus/pauseAlt/pauseUI'); cancelButton.animation.addByPrefix('selected', 'bluecancel', 0, false); cancelButton.animation.appendByPrefix('selected', 'cancelyellow'); cancelButton.animation.play('selected'); diff --git a/source/funkin/menus/MainMenuState.hx b/source/funkin/menus/MainMenuState.hx index 2c5c7101..7744564b 100644 --- a/source/funkin/menus/MainMenuState.hx +++ b/source/funkin/menus/MainMenuState.hx @@ -118,7 +118,6 @@ class MainMenuState extends MusicBeatState FlxG.switchState(new TitleState()); #if MOD_SUPPORT - // make it customisable if (controls.SWITCHMOD) { openSubState(new ModSwitchMenu()); persistentUpdate = false; diff --git a/source/funkin/menus/PauseSubState.hx b/source/funkin/menus/PauseSubState.hx index b0c34bf9..edc0cb61 100644 --- a/source/funkin/menus/PauseSubState.hx +++ b/source/funkin/menus/PauseSubState.hx @@ -161,7 +161,7 @@ class PauseSubState extends MusicBeatSubstate else { PlayState.resetSongInfos(); if (Charter.instance != null) Charter.instance.__clearStatics(); - + CoolUtil.playMenuSong(); FlxG.switchState(PlayState.isStoryMode ? new StoryMenuState() : new FreeplayState()); } diff --git a/source/funkin/menus/PlaytestingWarningSubstate.hx b/source/funkin/menus/PlaytestingWarningSubstate.hx index 047d42ce..e366bf9f 100644 --- a/source/funkin/menus/PlaytestingWarningSubstate.hx +++ b/source/funkin/menus/PlaytestingWarningSubstate.hx @@ -80,7 +80,7 @@ class PlaytestingWarningSubstate extends MusicBeatSubstate if (controls.RIGHT_P) changeSelection(1); if (controls.LEFT_P) changeSelection(-1); - + for (i => option in options) { option.x = FlxG.width * ((1+i)/4) - (option.fieldWidth/2); switch(i) { diff --git a/source/funkin/menus/StoryMenuState.hx b/source/funkin/menus/StoryMenuState.hx index 0f8dd1d5..6d9e27f2 100644 --- a/source/funkin/menus/StoryMenuState.hx +++ b/source/funkin/menus/StoryMenuState.hx @@ -276,7 +276,6 @@ class StoryMenuState extends MusicBeatState { } public function addCharacter(charName:String) { - var char:Access = null; try { char = new Access(Xml.parse(Assets.getText(Paths.xml('weeks/characters/$charName'))).firstElement()); @@ -307,7 +306,7 @@ class StoryMenuState extends MusicBeatState { } else { weeksFound = [for(c in Paths.getFolderContent('data/weeks/weeks/', false, source)) if (Path.extension(c).toLowerCase() == "xml") Path.withoutExtension(c)]; } - + if (weeksFound.length > 0) { for(s in weeksFound) weeks.push(s); diff --git a/source/funkin/menus/TitleState.hx b/source/funkin/menus/TitleState.hx index a24a8e86..491bc65a 100644 --- a/source/funkin/menus/TitleState.hx +++ b/source/funkin/menus/TitleState.hx @@ -34,7 +34,7 @@ class TitleState extends MusicBeatState MusicBeatState.skipTransIn = true; startIntro(); - + super.create(); } diff --git a/source/funkin/options/OptionsMenu.hx b/source/funkin/options/OptionsMenu.hx index e8226a9b..5b786e10 100644 --- a/source/funkin/options/OptionsMenu.hx +++ b/source/funkin/options/OptionsMenu.hx @@ -65,7 +65,7 @@ class OptionsMenu extends TreeMenu { } } })]); - + var xmlPath = Paths.xml("config/options"); for(source in [funkin.backend.assets.AssetsLibraryList.AssetSource.SOURCE, funkin.backend.assets.AssetsLibraryList.AssetSource.MODS]) { if (Paths.assetsTree.existsSpecific(xmlPath, "TEXT", source)) { @@ -75,13 +75,13 @@ class OptionsMenu extends TreeMenu { } catch(e) { Logs.trace('Error while parsing options.xml: ${Std.string(e)}', ERROR); } - + if (access != null) for(o in parseOptionsFromXML(access)) main.add(o); } } - + } public override function exit() { @@ -123,7 +123,7 @@ class OptionsMenu extends TreeMenu { Logs.trace("A choice option requires an \"id\" for option saving.", WARNING); continue; } - + var optionOptions:Array = []; var optionDisplayOptions:Array = []; @@ -131,10 +131,10 @@ class OptionsMenu extends TreeMenu { optionOptions.push(choice.att.value); optionDisplayOptions.push(choice.att.name); } - + if(optionOptions.length > 0) options.push(new ArrayOption(name, desc, optionOptions, optionDisplayOptions, node.att.id, null, FlxG.save.data)); - + case "menu": options.push(new TextOption(name + " >", desc, function() { optionsTree.add(new OptionsScreen(name, desc, parseOptionsFromXML(node))); diff --git a/source/funkin/options/OptionsScreen.hx b/source/funkin/options/OptionsScreen.hx index ad4f01b9..f21bdaaf 100644 --- a/source/funkin/options/OptionsScreen.hx +++ b/source/funkin/options/OptionsScreen.hx @@ -71,7 +71,7 @@ class OptionsScreen extends FlxTypedSpriteGroup { public function updateMenuDesc(?customTxt:String) { if (parent.treeParent == null) return; - + var text:String = members[curSelected].desc; if (customTxt != null) text = customTxt; parent.treeParent.updateDesc(text); diff --git a/source/funkin/options/keybinds/KeybindSetting.hx b/source/funkin/options/keybinds/KeybindSetting.hx index 3fa1a9fc..8201f013 100644 --- a/source/funkin/options/keybinds/KeybindSetting.hx +++ b/source/funkin/options/keybinds/KeybindSetting.hx @@ -52,10 +52,10 @@ class KeybindSetting extends FlxTypedSpriteGroup { var min = Math.min(icon.scale.x, icon.scale.y); icon.scale.set(min, min); add(icon); - + title.setPosition(100, 0); } - + setPosition(x, y); } diff --git a/source/funkin/options/keybinds/KeybindsOptions.hx b/source/funkin/options/keybinds/KeybindsOptions.hx index cb974c47..e4e7d26c 100644 --- a/source/funkin/options/keybinds/KeybindsOptions.hx +++ b/source/funkin/options/keybinds/KeybindsOptions.hx @@ -192,7 +192,7 @@ class KeybindsOptions extends MusicBeatSubstate { if (canSelect) { changeSelection((controls.UP_P ? -1 : 0) + (controls.DOWN_P ? 1 : 0)); - + if (controls.BACK) { MusicBeatState.skipTransIn = true; if (isSubState) diff --git a/source/lime/_internal/backend/native/NativeWindow.hx b/source/lime/_internal/backend/native/NativeWindow.hx index 9d318ec9..397d94ac 100644 --- a/source/lime/_internal/backend/native/NativeWindow.hx +++ b/source/lime/_internal/backend/native/NativeWindow.hx @@ -107,7 +107,7 @@ class NativeWindow #if (!macro && lime_cffi) handle = NativeCFFI.lime_window_create(parent.application.__backend.handle, width, height, flags, title); - + #if (DARK_MODE_WINDOW && !macro) funkin.backend.utils.NativeAPI.setDarkMode(title, true); #end