From 32eb2cf6dec1af831c7c410fa12572a1d2475a90 Mon Sep 17 00:00:00 2001 From: Apro716 <89444135+APRO716@users.noreply.github.com> Date: Sat, 13 May 2023 09:28:03 +0700 Subject: [PATCH] i lost interest about this... --- .github/workflows/main.yml | 4 ++-- hmm.json | 6 ++++-- source/PauseSubState.hx | 1 + source/PlayState.hx | 13 +++++-------- source/ResultState.hx | 2 ++ source/TitleState.hx | 8 ++++---- source/editors/ChartingState.hx | 5 +---- 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f2d8a54..96ce15d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,7 +55,7 @@ jobs: - uses: krdlab/setup-haxe@master with: - haxe-version: 4.2.5 + haxe-version: 4.3.1 # Runs a set of commands using the runners shell - name: Install Haxelib run: | @@ -87,7 +87,7 @@ jobs: - uses: krdlab/setup-haxe@master with: - haxe-version: 4.2.5 + haxe-version: 4.3.1 # Runs a set of commands using the runners shell - name: Install Haxelib run: | diff --git a/hmm.json b/hmm.json index 86d2e02..7a4cf1c 100644 --- a/hmm.json +++ b/hmm.json @@ -32,8 +32,10 @@ }, { "name": "hxcpp", - "type": "haxelib", - "version": null + "type": "git", + "dir": null, + "ref": "c3e5ab8", + "url": "https://github.com/HaxeFoundation/hxcpp" }, { "name": "tjson", diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index 14f7dd7..b0961e9 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -281,6 +281,7 @@ class PauseSubState extends MusicBeatSubstate MusicBeatState.switchState(new FreeplayState()); } PlayState.cancelMusicFadeTween(); + FlxG.mouse.visible = true; // fuck u FlxG.sound.playMusic(Paths.music('freakyMenu')); PlayState.changedDifficulty = false; PlayState.chartingMode = false; diff --git a/source/PlayState.hx b/source/PlayState.hx index a0c21f5..353f95e 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -28,7 +28,7 @@ import flixel.math.FlxPoint; import flixel.math.FlxRect; #if (flixel >= "5.3.0") import flixel.sound.FlxSound; -#else +#else import flixel.system.FlxSound; #end import flixel.text.FlxText; @@ -194,7 +194,7 @@ class PlayState extends MusicBeatState public var health:Float = 1; public var combo:Int = 0; - var displayedHealth:Float = 0; + public var displayedHealth:Float = 0; private var healthBarBG:AttachedSprite; public var healthBar:FlxBar; var songPercent:Float = 0; @@ -1427,7 +1427,7 @@ class PlayState extends MusicBeatState #end } - function startAndEnd() + inline function startAndEnd() { if(endingSong) endSong(); @@ -3040,7 +3040,6 @@ class PlayState extends MusicBeatState } noteMiss(daNote); } - daNote.active = daNote.visible = false; daNote.kill(); @@ -3664,8 +3663,6 @@ class PlayState extends MusicBeatState } } - FlxG.mouse.visible = true; - timeBarBG.visible = timeBar.visible = timeTxt.visible = false; canPause = false; endingSong = true; @@ -4069,7 +4066,7 @@ class PlayState extends MusicBeatState if (sortedNotesList.length > 0) { for (epicNote in sortedNotesList) { for (doubleNote in pressNotes) { - if (!doubleNote.isSustainNote && Math.abs(doubleNote.strumTime - epicNote.strumTime) < 2) { + if (Math.abs(doubleNote.strumTime - epicNote.strumTime) < 2) { doubleNote.kill(); notes.remove(doubleNote, true); doubleNote.destroy(); @@ -5032,4 +5029,4 @@ class PlayState extends MusicBeatState var curLight:Int = -1; var curLightEvent:Int = -1; -} +} \ No newline at end of file diff --git a/source/ResultState.hx b/source/ResultState.hx index 7515220..e0eb475 100644 --- a/source/ResultState.hx +++ b/source/ResultState.hx @@ -64,6 +64,7 @@ class ResultState extends MusicBeatState destroyText(); if (PlayState.isStoryMode){ if(PlayState.storyPlaylist.length <= 0){ + FlxG.mouse.visible = true; FlxG.sound.playMusic(Paths.music('freakyMenu')); MusicBeatState.switchState(new StoryMenuState()); }else{ @@ -77,6 +78,7 @@ class ResultState extends MusicBeatState } }else{ trace('WENT BACK TO FREEPLAY??'); + FlxG.mouse.visible = true; MusicBeatState.switchState(new FreeplayState()); FlxG.sound.playMusic(Paths.music('freakyMenu')); } diff --git a/source/TitleState.hx b/source/TitleState.hx index 28c51e3..e1a0e70 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -347,9 +347,9 @@ class TitleState extends MusicBeatState var pressedEnter:Bool = FlxG.keys.justPressed.ENTER || controls.ACCEPT || FlxG.mouse.justPressed; #if desktop - if (FlxG.keys.justPressed.ESCAPE && initialized && !pressedEnter && !stopplz) // THANK YOU BeastlyGhost idk i write correct + if (FlxG.keys.justPressed.ESCAPE && initialized && !pressedEnter && !stopplz) // THANK YOU BeastlyGhost { - stopplz = true; + stopplz = true; // prevent spam cancelmenu sound lol FlxG.sound.play(Paths.sound("cancelMenu"), 0.8); FlxG.sound.music.fadeOut(0.3); FlxG.camera.fade(FlxColor.BLACK, 0.5, false, function() @@ -409,7 +409,7 @@ class TitleState extends MusicBeatState titleText.color = FlxColor.WHITE; titleText.alpha = 1; titleText.animation.play('press'); - }; + } FlxG.camera.flash(ClientPrefs.flashing ? FlxColor.WHITE : 0x4CFFFFFF, 1); FlxG.sound.play(Paths.sound('confirmMenu'), 0.7); @@ -674,4 +674,4 @@ class TitleState extends MusicBeatState skippedIntro = true; } } -} +} \ No newline at end of file diff --git a/source/editors/ChartingState.hx b/source/editors/ChartingState.hx index 4f2b0b0..a5652e9 100644 --- a/source/editors/ChartingState.hx +++ b/source/editors/ChartingState.hx @@ -1667,13 +1667,11 @@ class ChartingState extends MusicBeatState } } - if (FlxG.keys.justPressed.BACKSPACE) { autosaveSong(); PlayState.chartingMode = false; MusicBeatState.switchState(new editors.MasterEditorMenu()); FlxG.sound.playMusic(Paths.music('freakyMenu')); - FlxG.mouse.visible = false; return; } @@ -1682,7 +1680,6 @@ class ChartingState extends MusicBeatState } - if(FlxG.keys.justPressed.Z && curZoom > 0 && !FlxG.keys.pressed.CONTROL) { --curZoom; updateZoom(); @@ -2119,7 +2116,7 @@ class ChartingState extends MusicBeatState if (FlxG.save.data.chart_waveformInst) { var sound:FlxSound = FlxG.sound.music; - if (sound.buffer != null) { + if (sound != null && sound.buffer != null) { var bytes:Bytes = sound.buffer.data.toBytes(); wavData = waveformData(