diff --git a/.github/actions/setup-haxeshit/action.yml b/.github/actions/setup-haxeshit/action.yml index 3931e62a7..5844499b7 100644 --- a/.github/actions/setup-haxeshit/action.yml +++ b/.github/actions/setup-haxeshit/action.yml @@ -1,10 +1,20 @@ name: setup-haxeshit -description: "sets up haxe shit, using lix!" +description: "sets up haxe shit, using HMM!" runs: using: "composite" steps: - - uses: lix-pm/setup-lix@1.0.0 + - uses: krdlab/setup-haxe@v1.4.0 with: - lix-version: 15.8.9 # optional - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' + haxe-version: 4.2.5 + - name: Config haxelib + run: | + haxelib config + shell: bash + - name: Installing Haxe lol + run: | + haxe -version + haxelib git haxelib https://github.com/HaxeFoundation/haxelib.git + haxelib version + haxelib --global install hmm + haxelib --global run hmm install --quiet + shell: bash diff --git a/.github/workflows/build-shit.yml b/.github/workflows/build-shit.yml index 182ee2af6..0d9ab8677 100644 --- a/.github/workflows/build-shit.yml +++ b/.github/workflows/build-shit.yml @@ -55,15 +55,10 @@ jobs: export/debug/windows/haxe/ export/debug/windows/obj/ - - name: lix stuff - run: | - npm i -g lix - lix download - lix +lib lime - lix run lime setup + - uses: ./.github/actions/setup-haxeshit - name: Build game run: | - lix run lime build windows + haxelib run lime build windows -debug dir - uses: ./.github/actions/upload-itch with: diff --git a/.gitignore b/.gitignore index 8896597a0..d4aba58ac 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ .DS_STORE .haxelib/ -.vscode/ APIStuff.hx dump/ export/ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..d7433698d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,84 @@ +{ + "[haxe]": { + // Automatically keep Haxe files formatted. + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + "editor.codeActionsOnSave": { + // Compilation server issues can cause auto-cleanup to remove valid imports. + "source.organizeImports": false + }, + "editor.defaultFormatter": "nadako.vshaxe", + "editor.tabSize": 2 + }, + + "[json]": { + // Automatically keep JSON files formatted. + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + + "[jsonc]": { + // Automatically keep JSONC files formatted. + "editor.formatOnSave": true, + "editor.formatOnPaste": true, + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "prettier.tabWidth": 2, + + // Automatically detect indentation. + "editor.detectIndentation": true, + "editor.insertSpaces": true, + "editor.tabSize": 2, + + // Automatically enforce Linux style line endings. + "files.eol": "\n", + + "haxe.displayPort": "auto", + "haxe.enableCompilationServer": true, + "haxe.displayServer": { + "arguments": ["-v"] + }, + // Fix file associations for HScript. + "files.associations": { + "*.hxp": "haxe", + "*.hscript": "haxe", + "*.haxe": "haxe", + "*.hxs": "haxe", + "*.hxc": "haxe" + }, + "projectManager.git.baseFolders": ["./"], + + "haxecheckstyle.sourceFolders": ["src", "Source"], + "haxecheckstyle.externalSourceRoots": [], + "haxecheckstyle.configurationFile": "checkstyle.json", + "haxecheckstyle.codeSimilarityBufferSize": 100, + + "lime.targetConfigurations": [ + { + "label": "Windows / Debug", + "target": "windows", + "args": ["-debug"] + }, + { + "label": "Windows / Debug (DEBUG ASSETS)", + "target": "windows", + "args": ["-debug", "-DDEBUG_ASSETS"] + }, + { + "label": "Windows / Debug (ANIMATE)", + "target": "windows", + "args": ["-debug", "-DANIMATE"] + }, + { + "label": "HTML5 / Debug", + "target": "html5", + "args": ["-debug"] + }, + { + "label": "HTML5 / Debug (Watch)", + "target": "html5", + "args": ["-debug", "-watch"] + } + ] + } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 000000000..16a77646f --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,13 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "lime", + "command": "test", + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} diff --git a/Project.xml b/Project.xml index c2f03f83b..ef58d5b53 100644 --- a/Project.xml +++ b/Project.xml @@ -129,7 +129,7 @@ - + diff --git a/hmm.json b/hmm.json index f6bd38cb5..06b1837bc 100644 --- a/hmm.json +++ b/hmm.json @@ -1,4 +1,5 @@ { +<<<<<<< HEAD "dependencies": [ { "name": "discord_rpc", @@ -114,3 +115,112 @@ } ] } +======= + "dependencies": [{ + "name": "discord_rpc", + "type": "git", + "dir": null, + "ref": "2d83fa8", + "url": "https://github.com/Aidan63/linc_discord-rpc" + }, + { + "name": "flixel", + "type": "git", + "dir": null, + "ref": "d6100cc8", + "url": "https://github.com/EliteMasterEric/flixel" + }, + { + "name": "flixel-addons", + "type": "git", + "dir": null, + "ref": "f107166", + "url": "https://github.com/EliteMasterEric/flixel-addons" + }, + { + "name": "flixel-ui", + "type": "haxelib", + "version": "2.4.0" + }, + { + "name": "flxanimate", + "type": "git", + "dir": null, + "ref": "49f5554", + "url": "https://github.com/Dot-Stuff/flxanimate" + }, + { + "name": "format", + "type": "haxelib", + "version": "3.5.0" + }, + { + "name": "haxeui-core", + "type": "git", + "dir": null, + "ref": "dd7a95d", + "url": "https://github.com/haxeui/haxeui-core/" + }, + { + "name": "haxeui-flixel", + "type": "git", + "dir": null, + "ref": "3882f1f", + "url": "https://github.com/haxeui/haxeui-flixel" + }, + { + "name": "hmm", + "type": "git", + "dir": null, + "ref": "3ef9522", + "url": "https://github.com/steviegt6/hmm" + }, + { + "name": "hscript", + "type": "haxelib", + "version": "2.5.0" + }, + { + "name": "hxcpp", + "type": "haxelib", + "version": "4.2.1" + }, + { + "name": "hxcpp-debug-server", + "type": "haxelib", + "version": "1.2.4" + }, + { + "name": "hxp", + "type": "haxelib", + "version": null + }, + { + "name": "lime", + "type": "git", + "dir": null, + "ref": "afadf5f", + "url": "https://github.com/openfl/lime" + }, + { + "name": "openfl", + "type": "git", + "dir": null, + "ref": "b2c18513", + "url": "https://github.com/EliteMasterEric/openfl" + }, + { + "name": "polymod", + "type": "git", + "dir": null, + "ref": "4e5b4b3", + "url": "https://github.com/larsiusprime/polymod" + }, + { + "name": "thx.semver", + "type": "haxelib", + "version": "0.2.2" + } + ] +} +>>>>>>> bc83dd7399f1c77a96f04dff6ab990831cd5c165 diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 57691f13a..61d2dc509 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -27,12 +27,9 @@ import funkin.modding.events.ScriptEventDispatcher; import funkin.play.Strumline.StrumlineArrow; import funkin.play.Strumline.StrumlineStyle; import funkin.play.character.BaseCharacter; -<<<<<<< HEAD -import funkin.play.character.CharacterData; -======= import funkin.play.character.CharacterData.CharacterDataParser; +import funkin.play.character.CharacterData; import funkin.play.cutscene.VanillaCutscenes; ->>>>>>> feature/flxanimate import funkin.play.event.SongEvent.SongEventParser; import funkin.play.scoring.Scoring; import funkin.play.song.Song; @@ -93,15 +90,14 @@ class PlayState extends MusicBeatState public static var isInCutscene:Bool = false; /** -<<<<<<< HEAD * Whether the inputs should be disabled for whatever reason... used for the stage edit lol! */ public static var disableKeys:Bool = false; -======= + + /* * Whether the game is currently in dialog, and gameplay should be stopped. */ public static var isInDialog:Bool = false; ->>>>>>> feature/flxanimate /** * Whether the game is currently in the countdown before the song resumes. @@ -1419,7 +1415,10 @@ class PlayState extends MusicBeatState startingSong = true; + inputSpitter = []; + // Reset music properly. + FlxG.sound.music.pause(); vocals.pause(); FlxG.sound.music.time = 0; @@ -1854,6 +1853,11 @@ class PlayState extends MusicBeatState { dispatchEvent(new ScriptEvent(ScriptEvent.SONG_END)); + #if sys + // spitter for ravy, teehee!! + sys.io.File.saveContent("./scores.txt", inputSpitter.join("\n")); + #end + seenCutscene = false; deathCounter = 0; mayPauseGame = false; @@ -2084,6 +2088,11 @@ class PlayState extends MusicBeatState */ // } + /** + * Spitting out the input for ravy 🙇‍♂️!! + */ + var inputSpitter:Array = []; + public function keyShit(test:Bool):Void { if (PlayState.instance == null) return; @@ -2102,6 +2111,15 @@ class PlayState extends MusicBeatState controls.NOTE_UP_R, controls.NOTE_RIGHT_R ]; + + if (pressArray.contains(true)) + { + var lol:Array = cast pressArray; + inputSpitter.push(Std.int(Conductor.songPosition) + " " + lol.join(" ")); + } + + if (FlxG.keys.justPressed.B) trace(inputSpitter.join("\n")); + // HOLDS, check for sustain notes if (holdArray.contains(true) && PlayState.instance.generatedMusic) { diff --git a/source/funkin/play/cutscene/VanillaCutscenes.hx b/source/funkin/play/cutscene/VanillaCutscenes.hx index 99d0bd0d8..9f51b214c 100644 --- a/source/funkin/play/cutscene/VanillaCutscenes.hx +++ b/source/funkin/play/cutscene/VanillaCutscenes.hx @@ -1,12 +1,13 @@ package funkin.play.cutscene; -import hxcodec.flixel.FlxVideoSprite; -import hxcodec.flixel.FlxCutsceneState; +// import hxcodec.flixel.FlxVideoSprite; +// import hxcodec.flixel.FlxCutsceneState; import flixel.FlxSprite; import flixel.tweens.FlxEase; import flixel.tweens.FlxTween; import flixel.util.FlxColor; import flixel.util.FlxTimer; +import funkin.graphics.video.FlxVideo; /** * Static methods for playing cutscenes in the PlayState. @@ -62,7 +63,7 @@ class VanillaCutscenes vid.finishCallback = finishCutscene; #else // Video displays OVER the FlxState. - vid = new FlxVideoSprite(0, 0); + // vid = new FlxVideoSprite(0, 0); vid.cameras = [PlayState.instance.camCutscene]; @@ -73,7 +74,7 @@ class VanillaCutscenes #end } - static var vid:#if html5 FlxVideo #else FlxVideoSprite #end; + static var vid:#if html5 FlxVideo #else Dynamic /**FlxVideoSprite **/ #end; /** * Does the cleanup to start the countdown after the video is done. diff --git a/source/funkin/util/FileUtil.hx b/source/funkin/util/FileUtil.hx index 03b7bc8a9..89aaaaf77 100644 --- a/source/funkin/util/FileUtil.hx +++ b/source/funkin/util/FileUtil.hx @@ -1,12 +1,10 @@ package funkin.util; -import cpp.abi.Abi; import haxe.zip.Entry; import lime.utils.Bytes; import lime.ui.FileDialog; import openfl.net.FileFilter; import haxe.io.Path; -import lime.utils.Resource; /** * Utilities for reading and writing files on various platforms. @@ -145,15 +143,13 @@ class FileUtil #elseif html5 var filter = convertTypeFilter(typeFilter); - var onFileLoaded = function(event) - { + var onFileLoaded = function(event) { var loadedFileRef:FileReference = event.target; trace('Loaded file: ' + loadedFileRef.name); onOpen(loadedFileRef.data); } - var onFileSelected = function(event) - { + var onFileSelected = function(event) { var selectedFileRef:FileReference = event.target; trace('Selected file: ' + selectedFileRef.name); selectedFileRef.addEventListener(Event.COMPLETE, onFileLoaded); @@ -214,8 +210,7 @@ class FileUtil { #if desktop // Prompt the user for a directory, then write all of the files to there. - var onSelectDir = function(targetPath:String) - { + var onSelectDir = function(targetPath:String) { var paths:Array = []; for (resource in resources) { @@ -264,8 +259,7 @@ class FileUtil // Create a ZIP file. var zipBytes = createZIPFromEntries(resources); - var onSave = function(path:String) - { + var onSave = function(path:String) { onSave([path]); };