From 1ba1ecb6affbbe4e8f4fb63fd16b170f5e0295c8 Mon Sep 17 00:00:00 2001 From: pahaze Date: Fri, 1 Jan 2021 00:39:58 -0500 Subject: [PATCH 1/2] Add enemies' dying faces --- source/Controls.hx | 3 ++- source/PlayState.hx | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/source/Controls.hx b/source/Controls.hx index 7d1e2c40e..0a63dc0b1 100644 --- a/source/Controls.hx +++ b/source/Controls.hx @@ -405,7 +405,7 @@ class Controls extends FlxActionSet switch (device) { case null: - // add all + // add all #if (haxe >= "4.0.0") for (gamepad in controls.gamepadsAdded) if (!gamepadsAdded.contains(gamepad)) @@ -415,6 +415,7 @@ class Controls extends FlxActionSet if (gamepadsAdded.indexOf(gamepad) == -1) gamepadsAdded.push(gamepad); #end + mergeKeyboardScheme(controls.keyboardScheme); diff --git a/source/PlayState.hx b/source/PlayState.hx index 404a5d30c..8ac43f675 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -725,6 +725,8 @@ class PlayState extends MusicBeatState private var paused:Bool = false; var startedCountdown:Bool = false; var canPause:Bool = true; + + override public function update(elapsed:Float) { @@ -783,7 +785,7 @@ class PlayState extends MusicBeatState iconP1.updateHitbox(); iconP2.updateHitbox(); - + var iconOffset:Int = 26; iconP1.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01) - iconOffset); @@ -791,12 +793,19 @@ class PlayState extends MusicBeatState if (health > 2) health = 2; + + if (healthBar.percent < 20) iconP1.animation.curAnim.curFrame = 1; else iconP1.animation.curAnim.curFrame = 0; - + + if (healthBar.percent > 80) + iconP2.animation.curAnim.curFrame = Std.parseInt(curStage) + 1; + else + iconP2.animation.curAnim.curFrame = Std.parseInt(curStage); + /* if (FlxG.keys.justPressed.NINE) FlxG.switchState(new Charting()); */ From 5082b857fd22d00fa7f5c213641fe05a8b346dab Mon Sep 17 00:00:00 2001 From: pahaze Date: Tue, 5 Jan 2021 07:53:42 -0500 Subject: [PATCH 2/2] Update to latest master commit --- CHANGELOG.md | 4 + LICENSE | 201 ++++++++++++++++++ Project.xml | 2 + README.md | 23 +- assets/data/introText.txt | 3 +- assets/data/specialThanks.txt | 2 + .../mods/introMod/_append/data/introText.txt | 1 + source/Alphabet.hx | 2 +- source/BackgroundDancer.hx | 2 +- source/Character.hx | 14 +- source/ChartingState.hx | 6 + source/Controls.hx | 3 +- source/DialogueBox.hx | 2 +- source/FreeplayState.hx | 2 +- source/GameOverState.hx | 4 +- source/HealthIcon.hx | 2 +- source/MainMenuState.hx | 6 +- source/MenuCharacter.hx | 2 +- source/MenuItem.hx | 2 +- source/Note.hx | 2 +- source/OptionsMenu.hx | 2 +- source/PlayState.hx | 48 ++--- source/StoryMenuState.hx | 2 +- source/TitleState.hx | 13 +- 24 files changed, 290 insertions(+), 60 deletions(-) create mode 100644 LICENSE create mode 100644 assets/mods/introMod/_append/data/introText.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index a3aa76091..435804328 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [UNRELEASED] +### Fixed +- Song no longer loops when finishing the song. ([Thanks Injourn for the Pull Request!](https://github.com/ninjamuffin99/Funkin/pull/132)) + ## [0.2.5] - 2020-12-27 ### Added - MOMMY GF, 3 NEW ASS SONGS BY KAWAISPRITE, NEW ART BY PHANTOMARCADE,WOOOOOOAH!!!! diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..261eeb9e9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Project.xml b/Project.xml index e8abec2e7..329a7ab82 100644 --- a/Project.xml +++ b/Project.xml @@ -42,6 +42,7 @@ + @@ -68,6 +69,7 @@ + diff --git a/README.md b/README.md index f65fe6fc5..d3052d244 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ The link to that is on the [HaxeFlixel website](https://haxeflixel.com/documenta That should give you HaxeFlixel and all of it's setup and shit. If you run into issues, ask them in the #flixel channel in the Haxe discord server: https://discord.gg/5ybrNNWx9S -Other installations you'd need is the additional libraries, a fully updated list will be in `Project.xml`, but here are the one's I'm using as of writing. +Other installations you'd need is the additional libraries, a fully updated list will be in `Project.xml` in the project root, but here are the one's I'm using as of writing. ``` hscript @@ -55,10 +55,25 @@ and you should be good to go there. ### Compiling game -Once you have all those installed, it's pretty easy to compile game! One that you can compile right off the bat is for HTML5, -you just need to run `lime test html5 -debug` in your command prompt in the project root. (command prompt navigation guide can be found here: [https://ninjamuffin99.newgrounds.com/news/post/1090480](https://ninjamuffin99.newgrounds.com/news/post/1090480)) +Once you have all those installed, it's pretty easy to compile the game. You just need to run 'lime test html5 -debug' in the root of the project to build and run the HTML5 version. (command prompt navigation guide can be found here: [https://ninjamuffin99.newgrounds.com/news/post/1090480](https://ninjamuffin99.newgrounds.com/news/post/1090480)) -To run it for your desktop (Windows, Mac, Linux) it's a bit more complicated. I know for Windows you need to download Visual Studio Community 2017 or 2019 or something, and in the libraries download in that download somethin that says build tools LOL homie im too dumb idk how to do that shit most of the time. +To run it from your desktop (Windows, Mac, Linux) it can be a bit more involved. For Linux, you only need to open a terminal in the project directory and run 'lime test linux -debug' and then run the executible file in export/release/linux/bin. For Windows, you need to install Visual Studio Community 2019. While installing VSC, don't click on any of the options to install workloads. Instead, go to the individual components tab and choose the following: +* MSCV v142 - VS 2019 C++ x64/x86 build tools +* Windows SDK (10.0.17763.0) +* C++ profiling tools +* C++ CMake tools for windows +* C++ ATL for v142 build tools (x86 & x64) +* C++ MFC for v142 build tools (x86 & x64) +* C++/CLI support for v142 build tools (14.21) +* C++ Modules for v142 build tools (x64/x86 -) +* Clang Compiler for Windows +* Windows 10 SDK (10.0.17134.0) +* Windows 10 SDk (10.0.16299.0) +* MSVC v141 - VS 2017 C++ x64/x86 build tools +* MSVC v140 - VS 2015 C++ build tools (v14.00) + +This will install about 22GB of crap, but once that is done you can open up a command line in the project's directory and run `lime test windows -debug`. Once that command finishes (it takes forever even on a higher end PC), you can run FNF from the .exe file under export\release\windows\bin +As for Mac, 'lime test mac -debug' should work, if not the internet surely has a guide on how to compile Haxe stuff for Mac. ### Additional guides diff --git a/assets/data/introText.txt b/assets/data/introText.txt index 323f5904f..c982185ba 100644 --- a/assets/data/introText.txt +++ b/assets/data/introText.txt @@ -29,4 +29,5 @@ refined taste in music--if i say so myself his name isnt keith--dumb eggy lol his name isnt evan--silly tiktok stream chuckie finster--on spotify -never forget to--pray to god \ No newline at end of file +never forget to--pray to god +dont play rust--we only funkin \ No newline at end of file diff --git a/assets/data/specialThanks.txt b/assets/data/specialThanks.txt index 565452d1a..b5a526dea 100644 --- a/assets/data/specialThanks.txt +++ b/assets/data/specialThanks.txt @@ -12,5 +12,7 @@ GeoKureli Will Blanton SrPelo Austin East +Krystin, Kaye-lyn, Cassidy, Mack, Levi, and Jasmine. +Laurel BIT BOY - MIKE WELSH \ No newline at end of file diff --git a/assets/mods/introMod/_append/data/introText.txt b/assets/mods/introMod/_append/data/introText.txt new file mode 100644 index 000000000..45e0c08ab --- /dev/null +++ b/assets/mods/introMod/_append/data/introText.txt @@ -0,0 +1 @@ +swagshit--moneymoney \ No newline at end of file diff --git a/source/Alphabet.hx b/source/Alphabet.hx index ba5c75141..f9bfe23d7 100644 --- a/source/Alphabet.hx +++ b/source/Alphabet.hx @@ -245,7 +245,7 @@ class AlphaCharacter extends FlxSprite public function new(x:Float, y:Float) { super(x, y); - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.alphabet__png, AssetPaths.alphabet__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/alphabet.png', 'assets/images/alphabet.xml'); frames = tex; antialiasing = true; diff --git a/source/BackgroundDancer.hx b/source/BackgroundDancer.hx index 2a4645086..e88c01905 100644 --- a/source/BackgroundDancer.hx +++ b/source/BackgroundDancer.hx @@ -9,7 +9,7 @@ class BackgroundDancer extends FlxSprite { super(x, y); - frames = FlxAtlasFrames.fromSparrow(AssetPaths.limoDancer__png, AssetPaths.limoDancer__xml); + frames = FlxAtlasFrames.fromSparrow("assets/images/limo/limoDancer.png", "assets/images/limo/limoDancer.xml"); animation.addByIndices('danceLeft', 'bg dancer sketch PINK', [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); animation.addByIndices('danceRight', 'bg dancer sketch PINK', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); animation.play('danceLeft'); diff --git a/source/Character.hx b/source/Character.hx index 8565945e4..255fcdc3a 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -31,7 +31,7 @@ class Character extends FlxSprite { case 'gf': // GIRLFRIEND CODE - tex = FlxAtlasFrames.fromSparrow(AssetPaths.GF_assets__png, AssetPaths.GF_assets__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/GF_assets.png', 'assets/images/GF_assets.xml'); frames = tex; animation.addByPrefix('cheer', 'GF Cheer', 24, false); animation.addByPrefix('singLEFT', 'GF left note', 24, false); @@ -63,7 +63,7 @@ class Character extends FlxSprite case 'dad': // DAD ANIMATION LOADING CODE - tex = FlxAtlasFrames.fromSparrow(AssetPaths.DADDY_DEAREST__png, AssetPaths.DADDY_DEAREST__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/DADDY_DEAREST.png', 'assets/images/DADDY_DEAREST.xml'); frames = tex; animation.addByPrefix('idle', 'Dad idle dance', 24); animation.addByPrefix('singUP', 'Dad Sing Note UP', 24); @@ -78,7 +78,7 @@ class Character extends FlxSprite addOffset("singLEFT", -10, 10); addOffset("singDOWN", 0, -30); case 'spooky': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.spooky_kids_assets__png, AssetPaths.spooky_kids_assets__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/spooky_kids_assets.png', 'assets/images/spooky_kids_assets.xml'); frames = tex; animation.addByPrefix('singUP', 'spooky UP NOTE', 24, false); animation.addByPrefix('singDOWN', 'spooky DOWN note', 24, false); @@ -97,7 +97,7 @@ class Character extends FlxSprite playAnim('danceRight'); case 'mom': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.Mom_Assets__png, AssetPaths.Mom_Assets__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/Mom_Assets.png', 'assets/images/Mom_Assets.xml'); frames = tex; animation.addByPrefix('idle', "Mom Idle", 24, false); @@ -116,7 +116,7 @@ class Character extends FlxSprite addOffset("singLEFT", 250, -23); addOffset("singDOWN", 20, -160); case 'monster': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.Monster_Assets__png, AssetPaths.Monster_Assets__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/Monster_Assets.png', 'assets/images/Monster_Assets.xml'); frames = tex; animation.addByPrefix('idle', 'monster idle', 24); animation.addByPrefix('singUP', 'monster up note', 24, false); @@ -131,7 +131,7 @@ class Character extends FlxSprite addOffset("singDOWN", -30, -40); playAnim('idle'); case 'pico': - tex = FlxAtlasFrames.fromSparrow(AssetPaths.Pico_FNF_assetss__png, AssetPaths.Pico_FNF_assetss__xml); + tex = FlxAtlasFrames.fromSparrow('assets/images/.Pico_FNF_assetss.png', 'assets/images/Pico_FNF_assetss.xml'); frames = tex; animation.addByPrefix('idle', "Pico Idle Dance", 24); animation.addByPrefix('singUP', 'pico Up note0', 24, false); @@ -170,7 +170,7 @@ class Character extends FlxSprite flipX = true; case 'bf': - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.BOYFRIEND__png, AssetPaths.BOYFRIEND__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/BOYFRIEND.png', 'assets/images/BOYFRIEND.xml'); frames = tex; animation.addByPrefix('idle', 'BF idle dance', 24, false); animation.addByPrefix('singUP', 'BF NOTE UP0', 24, false); diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 3f8f8c190..db4c6b338 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -24,6 +24,7 @@ import flixel.ui.FlxButton; import flixel.ui.FlxSpriteButton; import flixel.util.FlxColor; import haxe.Json; +import lime.utils.Assets; import openfl.events.Event; import openfl.events.IOErrorEvent; import openfl.events.IOErrorEvent; @@ -190,6 +191,11 @@ class ChartingState extends MusicBeatState var characters:Array = ["bf", 'dad', 'gf', 'spooky', 'monster', 'pico', 'mom']; + for (i in Assets.getText('assets/images/custom_chars/charlist.txt').split('\n')) + { + characters.push(i); + } + var player1DropDown = new FlxUIDropDownMenu(10, 100, FlxUIDropDownMenu.makeStrIdLabelArray(characters, true), function(character:String) { _song.player1 = characters[Std.parseInt(character)]; diff --git a/source/Controls.hx b/source/Controls.hx index 0a63dc0b1..7d1e2c40e 100644 --- a/source/Controls.hx +++ b/source/Controls.hx @@ -405,7 +405,7 @@ class Controls extends FlxActionSet switch (device) { case null: - // add all + // add all #if (haxe >= "4.0.0") for (gamepad in controls.gamepadsAdded) if (!gamepadsAdded.contains(gamepad)) @@ -415,7 +415,6 @@ class Controls extends FlxActionSet if (gamepadsAdded.indexOf(gamepad) == -1) gamepadsAdded.push(gamepad); #end - mergeKeyboardScheme(controls.keyboardScheme); diff --git a/source/DialogueBox.hx b/source/DialogueBox.hx index 488fe35fd..17f3d616d 100644 --- a/source/DialogueBox.hx +++ b/source/DialogueBox.hx @@ -20,7 +20,7 @@ class DialogueBox extends FlxSpriteGroup super(); box = new FlxSprite(40); - box.frames = FlxAtlasFrames.fromSparrow(AssetPaths.speech_bubble_talking__png, AssetPaths.speech_bubble_talking__xml); + box.frames = FlxAtlasFrames.fromSparrow('assets/images/speech_bubble_talking.png', 'assets/images/speech_bubble_talking.xml'); box.animation.addByPrefix('normalOpen', 'Speech Bubble Normal Open', 24, false); box.animation.addByPrefix('normal', 'speech bubble normal', 24); box.animation.play('normalOpen'); diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index 13742f687..e20858def 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -66,7 +66,7 @@ class FreeplayState extends MusicBeatState // LOAD CHARACTERS - var bg:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.menuBGBlue__png); + var bg:FlxSprite = new FlxSprite().loadGraphic('assets/images/menuBGBlue.png'); add(bg); grpSongs = new FlxTypedGroup(); diff --git a/source/GameOverState.hx b/source/GameOverState.hx index 064325478..ba7cb3472 100644 --- a/source/GameOverState.hx +++ b/source/GameOverState.hx @@ -24,7 +24,7 @@ class GameOverState extends FlxTransitionableState override function create() { /* var loser:FlxSprite = new FlxSprite(100, 100); - var loseTex = FlxAtlasFrames.fromSparrow(AssetPaths.lose__png, AssetPaths.lose__xml); + var loseTex = FlxAtlasFrames.fromSparrow(AssetPaths.lose.png, AssetPaths.lose.xml); loser.frames = loseTex; loser.animation.addByPrefix('lose', 'lose', 24, false); loser.animation.play('lose'); @@ -37,7 +37,7 @@ class GameOverState extends FlxTransitionableState FlxG.camera.follow(bf, LOCKON, 0.001); /* - var restart:FlxSprite = new FlxSprite(500, 50).loadGraphic(AssetPaths.restart__png); + var restart:FlxSprite = new FlxSprite(500, 50).loadGraphic(AssetPaths.restart.png); restart.setGraphicSize(Std.int(restart.width * 0.6)); restart.updateHitbox(); restart.alpha = 0; diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index 683a27114..99f0e32ae 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -8,7 +8,7 @@ class HealthIcon extends FlxSprite { super(); - loadGraphic(AssetPaths.iconGrid__png, true, 150, 150); + loadGraphic('assets/images/iconGrid.png', true, 150, 150); antialiasing = true; animation.add('bf', [0, 1], 0, false, isPlayer); diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 5b1afb628..1c470084f 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -39,7 +39,7 @@ class MainMenuState extends MusicBeatState persistentUpdate = persistentDraw = true; - var bg:FlxSprite = new FlxSprite(-80).loadGraphic(AssetPaths.menuBG__png); + var bg:FlxSprite = new FlxSprite(-80).loadGraphic('assets/images/menuBG.png'); bg.scrollFactor.x = 0; bg.scrollFactor.y = 0.18; bg.setGraphicSize(Std.int(bg.width * 1.1)); @@ -51,7 +51,7 @@ class MainMenuState extends MusicBeatState camFollow = new FlxObject(0, 0, 1, 1); add(camFollow); - magenta = new FlxSprite(-80).loadGraphic(AssetPaths.menuDesat__png); + magenta = new FlxSprite(-80).loadGraphic('assets/images/menuDesat.png'); magenta.scrollFactor.x = 0; magenta.scrollFactor.y = 0.18; magenta.setGraphicSize(Std.int(magenta.width * 1.1)); @@ -66,7 +66,7 @@ class MainMenuState extends MusicBeatState menuItems = new FlxTypedGroup(); add(menuItems); - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.FNF_main_menu_assets__png, AssetPaths.FNF_main_menu_assets__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/FNF_main_menu_assets.png', 'assets/images/FNF_main_menu_assets.xml'); for (i in 0...optionShit.length) { diff --git a/source/MenuCharacter.hx b/source/MenuCharacter.hx index 361aede1f..a621409a0 100644 --- a/source/MenuCharacter.hx +++ b/source/MenuCharacter.hx @@ -13,7 +13,7 @@ class MenuCharacter extends FlxSprite this.character = character; - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_characters__png, AssetPaths.campaign_menu_UI_characters__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/campaign_menu_UI_characters.png', 'assets/images/campaign_menu_UI_characters.xml'); frames = tex; animation.addByPrefix('bf', "BF idle dance white", 24); diff --git a/source/MenuItem.hx b/source/MenuItem.hx index 17a5f6305..e35e26a1f 100644 --- a/source/MenuItem.hx +++ b/source/MenuItem.hx @@ -14,7 +14,7 @@ class MenuItem extends FlxSpriteGroup { super(x, y); - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_assets__png, AssetPaths.campaign_menu_UI_assets__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/campaign_menu_UI_assets.png', 'assets/images/campaign_menu_UI_assets.xml'); week = new FlxSprite(); week.frames = tex; diff --git a/source/Note.hx b/source/Note.hx index 06825e717..adbe6d984 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -43,7 +43,7 @@ class Note extends FlxSprite this.noteData = noteData; - var tex = FlxAtlasFrames.fromSparrow(AssetPaths.NOTE_assets__png, AssetPaths.NOTE_assets__xml); + var tex = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml'); frames = tex; animation.addByPrefix('greenScroll', 'green0'); animation.addByPrefix('redScroll', 'red0'); diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index c79c3ec70..9e9f35408 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -8,7 +8,7 @@ class OptionsMenu extends MusicBeatState { override function create() { - var menuBG:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.menuDesat__png); + var menuBG:FlxSprite = new FlxSprite().loadGraphic('assets/images/menuDesat.png'); menuBG.color = 0xFFea71fd; menuBG.setGraphicSize(Std.int(menuBG.width * 1.1)); menuBG.updateHitbox(); diff --git a/source/PlayState.hx b/source/PlayState.hx index 8ac43f675..bef9e30db 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -147,7 +147,7 @@ class PlayState extends MusicBeatState curStage = "spooky"; halloweenLevel = true; - var hallowTex = FlxAtlasFrames.fromSparrow(AssetPaths.halloween_bg__png, AssetPaths.halloween_bg__xml); + var hallowTex = FlxAtlasFrames.fromSparrow('assets/images/halloween_bg.png', 'assets/images/halloween_bg.xml'); halloweenBG = new FlxSprite(-200, -100); halloweenBG.frames = hallowTex; @@ -163,11 +163,11 @@ class PlayState extends MusicBeatState { curStage = 'philly'; - var bg:FlxSprite = new FlxSprite(-100).loadGraphic(AssetPaths.sky__png); + var bg:FlxSprite = new FlxSprite(-100).loadGraphic('assets/images/sky.png'); bg.scrollFactor.set(0.1, 0.1); add(bg); - var city:FlxSprite = new FlxSprite(-10).loadGraphic(AssetPaths.city__png); + var city:FlxSprite = new FlxSprite(-10).loadGraphic('assets/images/city.png'); city.scrollFactor.set(0.3, 0.3); city.setGraphicSize(Std.int(city.width * 0.85)); city.updateHitbox(); @@ -186,18 +186,18 @@ class PlayState extends MusicBeatState phillyCityLights.add(light); } - var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic(AssetPaths.behindTrain__png); + var streetBehind:FlxSprite = new FlxSprite(-40, 50).loadGraphic('assets/images/behindTrain.png'); add(streetBehind); - phillyTrain = new FlxSprite(2000, 360).loadGraphic(AssetPaths.train__png); + phillyTrain = new FlxSprite(2000, 360).loadGraphic('assets/images/train.png'); add(phillyTrain); trainSound = new FlxSound().loadEmbedded('assets/sounds/train_passes' + TitleState.soundExt); FlxG.sound.list.add(trainSound); - // var cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0__png); + // var cityLights:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.win0.png); - var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic(AssetPaths.street__png); + var street:FlxSprite = new FlxSprite(-40, streetBehind.y).loadGraphic('assets/images/street.png'); add(street); } else if (SONG.song.toLowerCase() == 'milf' || SONG.song.toLowerCase() == 'satin-panties' || SONG.song.toLowerCase() == 'high') @@ -205,12 +205,12 @@ class PlayState extends MusicBeatState curStage = 'limo'; defaultCamZoom = 0.90; - var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic(AssetPaths.limoSunset__png); + var skyBG:FlxSprite = new FlxSprite(-120, -50).loadGraphic('assets/images/limo/limoSunset.png'); skyBG.scrollFactor.set(0.1, 0.1); add(skyBG); var bgLimo:FlxSprite = new FlxSprite(-200, 480); - bgLimo.frames = FlxAtlasFrames.fromSparrow(AssetPaths.bgLimo__png, AssetPaths.bgLimo__xml); + bgLimo.frames = FlxAtlasFrames.fromSparrow('assets/images/limo/bgLimo.png', 'assets/images/limo/bgLimo.xml'); bgLimo.animation.addByPrefix('drive', "background limo pink", 24); bgLimo.animation.play('drive'); bgLimo.scrollFactor.set(0.4, 0.4); @@ -226,7 +226,7 @@ class PlayState extends MusicBeatState grpLimoDancers.add(dancer); } - var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic(AssetPaths.limoOverlay__png); + var overlayShit:FlxSprite = new FlxSprite(-500, -600).loadGraphic('assets/images/limo/limoOverlay.png'); overlayShit.alpha = 0.5; // add(overlayShit); @@ -236,7 +236,7 @@ class PlayState extends MusicBeatState // overlayShit.shader = shaderBullshit; - var limoTex = FlxAtlasFrames.fromSparrow(AssetPaths.limoDrive__png, AssetPaths.limoDrive__xml); + var limoTex = FlxAtlasFrames.fromSparrow('assets/images/limo/limoDrive.png', 'assets/images/limo/limoDrive.xml'); limo = new FlxSprite(-120, 550); limo.frames = limoTex; @@ -244,13 +244,13 @@ class PlayState extends MusicBeatState limo.animation.play('drive'); limo.antialiasing = true; - fastCar = new FlxSprite(-300, 160).loadGraphic(AssetPaths.fastCarLol__png); + fastCar = new FlxSprite(-300, 160).loadGraphic('assets/images/limo/fastCarLol.png'); // add(limo); } else { curStage = 'stage'; - var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(AssetPaths.stageback__png); + var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic('assets/images/stageback.png'); // bg.setGraphicSize(Std.int(bg.width * 2.5)); // bg.updateHitbox(); bg.antialiasing = true; @@ -258,7 +258,7 @@ class PlayState extends MusicBeatState bg.active = false; add(bg); - var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic(AssetPaths.stagefront__png); + var stageFront:FlxSprite = new FlxSprite(-650, 600).loadGraphic('assets/images/stagefront.png'); stageFront.setGraphicSize(Std.int(stageFront.width * 1.1)); stageFront.updateHitbox(); stageFront.antialiasing = true; @@ -266,7 +266,7 @@ class PlayState extends MusicBeatState stageFront.active = false; add(stageFront); - var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic(AssetPaths.stagecurtains__png); + var stageCurtains:FlxSprite = new FlxSprite(-500, -300).loadGraphic('assets/images/stagecurtains.png'); stageCurtains.setGraphicSize(Std.int(stageCurtains.width * 0.9)); stageCurtains.updateHitbox(); stageCurtains.antialiasing = true; @@ -365,7 +365,7 @@ class PlayState extends MusicBeatState FlxG.fixedTimestep = false; - healthBarBG = new FlxSprite(0, FlxG.height * 0.9).loadGraphic(AssetPaths.healthBar__png); + healthBarBG = new FlxSprite(0, FlxG.height * 0.9).loadGraphic('assets/images/healthBar.png'); healthBarBG.screenCenter(X); healthBarBG.scrollFactor.set(); add(healthBarBG); @@ -618,7 +618,7 @@ class PlayState extends MusicBeatState { FlxG.log.add(i); var babyArrow:FlxSprite = new FlxSprite(0, strumLine.y); - var arrTex = FlxAtlasFrames.fromSparrow(AssetPaths.NOTE_assets__png, AssetPaths.NOTE_assets__xml); + var arrTex = FlxAtlasFrames.fromSparrow('assets/images/NOTE_assets.png', 'assets/images/NOTE_assets.xml'); babyArrow.frames = arrTex; babyArrow.animation.addByPrefix('green', 'arrowUP'); babyArrow.animation.addByPrefix('blue', 'arrowDOWN'); @@ -725,8 +725,6 @@ class PlayState extends MusicBeatState private var paused:Bool = false; var startedCountdown:Bool = false; var canPause:Bool = true; - - override public function update(elapsed:Float) { @@ -785,7 +783,7 @@ class PlayState extends MusicBeatState iconP1.updateHitbox(); iconP2.updateHitbox(); - + var iconOffset:Int = 26; iconP1.x = healthBar.x + (healthBar.width * (FlxMath.remapToRange(healthBar.percent, 0, 100, 100, 0) * 0.01) - iconOffset); @@ -793,19 +791,17 @@ class PlayState extends MusicBeatState if (health > 2) health = 2; - - if (healthBar.percent < 20) iconP1.animation.curAnim.curFrame = 1; else iconP1.animation.curAnim.curFrame = 0; - if (healthBar.percent > 80) + if (healthBar.percent > 80) iconP2.animation.curAnim.curFrame = Std.parseInt(curStage) + 1; else iconP2.animation.curAnim.curFrame = Std.parseInt(curStage); - + /* if (FlxG.keys.justPressed.NINE) FlxG.switchState(new Charting()); */ @@ -1037,7 +1033,7 @@ class PlayState extends MusicBeatState function endSong():Void { canPause = false; - + FlxG.sound.music = new FlxSound(); if (SONG.validScore) { #if !switch @@ -1150,7 +1146,7 @@ class PlayState extends MusicBeatState rating.antialiasing = true; rating.velocity.x -= FlxG.random.int(0, 10); - var comboSpr:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.combo__png); + var comboSpr:FlxSprite = new FlxSprite().loadGraphic('assets/images/combo.png'); comboSpr.screenCenter(); comboSpr.x = coolText.x; comboSpr.acceleration.y = 600; diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 7c3129f96..ad6aefa8b 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -69,7 +69,7 @@ class StoryMenuState extends MusicBeatState rankText.size = scoreText.size; rankText.screenCenter(X); - var ui_tex = FlxAtlasFrames.fromSparrow(AssetPaths.campaign_menu_UI_assets__png, AssetPaths.campaign_menu_UI_assets__xml); + var ui_tex = FlxAtlasFrames.fromSparrow('assets/images/campaign_menu_UI_assets.png', 'assets/images/campaign_menu_UI_assets.xml'); var yellowBG:FlxSprite = new FlxSprite(0, 56).makeGraphic(FlxG.width, 400, 0xFFF9CF51); grpWeekText = new FlxTypedGroup(); diff --git a/source/TitleState.hx b/source/TitleState.hx index e89a91b9c..786d2f2cc 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -21,6 +21,7 @@ import flixel.tweens.FlxTween; import flixel.util.FlxColor; import flixel.util.FlxTimer; import lime.utils.Assets; +import polymod.Polymod; class TitleState extends MusicBeatState { @@ -39,6 +40,8 @@ class TitleState extends MusicBeatState override public function create():Void { + Polymod.init({modRoot: "assets/mods", dirs: ['introMod']}); + #if (!web) TitleState.soundExt = '.ogg'; #end @@ -128,7 +131,7 @@ class TitleState extends MusicBeatState add(bg); logoBl = new FlxSprite(-150, -100); - logoBl.frames = FlxAtlasFrames.fromSparrow(AssetPaths.logoBumpin__png, AssetPaths.logoBumpin__xml); + logoBl.frames = FlxAtlasFrames.fromSparrow('assets/images/logoBumpin.png', 'assets/images/logoBumpin.xml'); logoBl.antialiasing = true; logoBl.animation.addByPrefix('bump', 'logo bumpin', 24); logoBl.animation.play('bump'); @@ -137,7 +140,7 @@ class TitleState extends MusicBeatState // logoBl.color = FlxColor.BLACK; gfDance = new FlxSprite(FlxG.width * 0.4, FlxG.height * 0.07); - gfDance.frames = FlxAtlasFrames.fromSparrow(AssetPaths.gfDanceTitle__png, AssetPaths.gfDanceTitle__xml); + gfDance.frames = FlxAtlasFrames.fromSparrow('assets/images/gfDanceTitle.png', 'assets/images/gfDanceTitle.xml'); gfDance.animation.addByIndices('danceLeft', 'gfDance', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); gfDance.animation.addByIndices('danceRight', 'gfDance', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); gfDance.antialiasing = true; @@ -145,7 +148,7 @@ class TitleState extends MusicBeatState add(logoBl); titleText = new FlxSprite(100, FlxG.height * 0.8); - titleText.frames = FlxAtlasFrames.fromSparrow(AssetPaths.titleEnter__png, AssetPaths.titleEnter__xml); + titleText.frames = FlxAtlasFrames.fromSparrow('assets/images/titleEnter.png', 'assets/images/titleEnter.xml'); titleText.animation.addByPrefix('idle', "Press Enter to Begin", 24); titleText.animation.addByPrefix('press', "ENTER PRESSED", 24); titleText.antialiasing = true; @@ -154,7 +157,7 @@ class TitleState extends MusicBeatState // titleText.screenCenter(X); add(titleText); - var logo:FlxSprite = new FlxSprite().loadGraphic(AssetPaths.logo__png); + var logo:FlxSprite = new FlxSprite().loadGraphic('assets/images/logo.png'); logo.screenCenter(); logo.antialiasing = true; // add(logo); @@ -176,7 +179,7 @@ class TitleState extends MusicBeatState credTextShit.visible = false; - ngSpr = new FlxSprite(0, FlxG.height * 0.52).loadGraphic(AssetPaths.newgrounds_logo__png); + ngSpr = new FlxSprite(0, FlxG.height * 0.52).loadGraphic('assets/images/newgrounds_logo.png'); add(ngSpr); ngSpr.visible = false; ngSpr.setGraphicSize(Std.int(ngSpr.width * 0.8));