From 42e06620835659b0e63a8687c2aacf726cc2432d Mon Sep 17 00:00:00 2001 From: TheRealJake_12 <84357907+TheRealJake12@users.noreply.github.com> Date: Wed, 17 May 2023 18:02:26 -0500 Subject: [PATCH] officially deprecate html5 --- .github/workflows/html5.yml | 54 ------------- source/FreeplayState.hx | 15 ++-- source/GameplayCustomizeState.hx | 2 + source/MusicBeatState.hx | 2 +- source/PauseSubState.hx | 3 +- source/PlayState.hx | 129 +++++++++++++++---------------- source/Song.hx | 2 +- 7 files changed, 74 insertions(+), 133 deletions(-) delete mode 100644 .github/workflows/html5.yml diff --git a/.github/workflows/html5.yml b/.github/workflows/html5.yml deleted file mode 100644 index 64738ffc..00000000 --- a/.github/workflows/html5.yml +++ /dev/null @@ -1,54 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: HTML5 Build CI - -# Controls when the workflow will run -on: [push, pull_request] - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - uses: krdlab/setup-haxe@v1 - with: - haxe-version: 4.3.1 - # Runs a set of commands using the runners shell - - name: download the librarys - run: | - sudo add-apt-repository ppa:haxe/releases -y - sudo apt-get update - sudo apt-get install gcc-multilib g++-multilib haxe -y - mkdir "%HAXELIB_ROOT%" - haxelib setup "%HAXELIB_ROOT%" - haxelib install lime - haxelib install openfl - haxelib install flixel - haxelib run lime setup flixel - haxelib run lime setup - haxelib install flixel-tools - haxelib install flixel-addons - haxelib install polymod 1.7.0 - haxelib install flixel-ui - haxelib install hscript - haxelib install flixel-addons - haxelib install hxcpp-debug-server - haxelib git faxe https://github.com/uhrobots/faxe - haxelib git discord_rpc https://github.com/Aidan63/linc_discord-rpc - haxelib git linc_luajit https://github.com/nebulazorua/linc_luajit.git - haxelib git hxvm-luajit https://github.com/nebulazorua/hxvm-luajit - haxelib git hxCodec https://github.com/TheRealJake12/hxCodec.git - haxelib install actuate - haxelib list - haxelib run lime build html5 - - - uses: actions/upload-artifact@v2 - with: - name: Web Browser (HTML5) - path: export/release/html5/bin diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index cb4239db..7561a307 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -111,7 +111,6 @@ class FreeplayState extends MusicBeatState override function create() { - instance = this; PlayState.SONG = null; FlxG.mouse.visible = true; @@ -195,10 +194,7 @@ class FreeplayState extends MusicBeatState var bottomText:String = #if !mobile #if PRELOAD_ALL " Press SPACE to listen to the Song Instrumental / Click and scroll through the songs with your MOUSE /" + #else " Click and scroll through the songs with your MOUSE /" + #end #end - " Your offset is " - + FlxG.save.data.offset - + "ms " - + (FlxG.save.data.optimize ? "/ Optimized" : ""); + " Your offset is " + FlxG.save.data.offset + "ms " + (FlxG.save.data.optimize ? "/ Optimized" : ""); var scoreBG:FlxSprite = new FlxSprite(scoreText.x - 6, 0).makeGraphic(Std.int(FlxG.width * 0.4), 337, 0xFF000000); scoreBG.alpha = 0.6; @@ -867,10 +863,9 @@ class FreeplayState extends MusicBeatState { FlxG.sound.music.stop(); - //playinSong = Song.loadFromJson(songs[curSelected].songName,CoolUtil.getSuffixFromDiff(CoolUtil.difficultyArray[CoolUtil.difficultyArray.indexOf(songs[curSelected].diffs[curDifficulty])])); + // playinSong = Song.loadFromJson(songs[curSelected].songName,CoolUtil.getSuffixFromDiff(CoolUtil.difficultyArray[CoolUtil.difficultyArray.indexOf(songs[curSelected].diffs[curDifficulty])])); - //activeSong = playinSong; - + // activeSong = playinSong; if (currentSongPlaying != songs[curSelected].songName) { @@ -887,7 +882,7 @@ class FreeplayState extends MusicBeatState songPath = null; } - + MainMenuState.freakyPlaying = false; TimingStruct.clearTimings(); @@ -962,7 +957,7 @@ class FreeplayState extends MusicBeatState PlayState.storyWeek = instance.songs[curSelected].week; PlayState.isStoryMode = false; - //Debug.logInfo('Loading song ${PlayState.SONG.songId} from week ${PlayState.storyWeek} into Free Play...'); + // Debug.logInfo('Loading song ${PlayState.SONG.songId} from week ${PlayState.storyWeek} into Free Play...'); #if FEATURE_STEPMANIA if (instance.songs[curSelected].songCharacter == "sm") { diff --git a/source/GameplayCustomizeState.hx b/source/GameplayCustomizeState.hx index d6bba0a5..e586c956 100644 --- a/source/GameplayCustomizeState.hx +++ b/source/GameplayCustomizeState.hx @@ -22,6 +22,7 @@ class GameplayCustomizeState extends MusicBeatState var text:FlxText; var blackBorder:FlxSprite; + public static var instance:GameplayCustomizeState = null; var laneunderlay:FlxSprite; @@ -54,6 +55,7 @@ class GameplayCustomizeState extends MusicBeatState public var dad:Character; public var gf:Character; public var boyfriend:Boyfriend; + public static var Stage:Stage; public static var freeplayBf:String = 'bf'; public static var freeplayDad:String = 'dad'; diff --git a/source/MusicBeatState.hx b/source/MusicBeatState.hx index ee4e004e..67a03dc5 100644 --- a/source/MusicBeatState.hx +++ b/source/MusicBeatState.hx @@ -259,7 +259,7 @@ class MusicBeatState extends FlxUIState oldStep = curStep; } } - } + } if (FlxG.keys.anyJustPressed([fullscreenBind])) { diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index 6ec2f75b..b2470a61 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -184,7 +184,8 @@ class PauseSubState extends MusicBeatSubstate { if (menuItems.length - 1 != curSelected && difficultyChoices.contains(daSelected)) { - PlayState.SONG = Song.loadFromJson(PlayState.SONG.songId.toLowerCase(), CoolUtil.getSuffixFromDiff(CoolUtil.difficultyArray[PlayState.storyDifficulty])); + PlayState.SONG = Song.loadFromJson(PlayState.SONG.songId.toLowerCase(), + CoolUtil.getSuffixFromDiff(CoolUtil.difficultyArray[PlayState.storyDifficulty])); PlayState.storyDifficulty = curSelected; PlayState.startTime = 0; MusicBeatState.resetState(); diff --git a/source/PlayState.hx b/source/PlayState.hx index a3d7adf5..ede4294d 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -2305,7 +2305,7 @@ class PlayState extends MusicBeatState vocals.time = startTime; Conductor.songPosition = startTime; startTime = 0; - + recalculateAllSectionTimes(); #if FEATURE_DISCORD @@ -2449,7 +2449,7 @@ class PlayState extends MusicBeatState } #end } - + recalculateAllSectionTimes(); checkforSections(); @@ -2546,8 +2546,8 @@ class PlayState extends MusicBeatState sustainNote = new Note(daStrumTime + (anotherStepCrochet * susNote) + anotherStepCrochet, daNoteData, oldNote, true, false, true, null, songNotes[4], daNoteType); else - sustainNote = new Note(daStrumTime + (anotherStepCrochet * susNote) + anotherStepCrochet, daNoteData, oldNote, true, false, - false, null, songNotes[4], daNoteType); + sustainNote = new Note(daStrumTime + (anotherStepCrochet * susNote) + anotherStepCrochet, daNoteData, oldNote, true, false, false, + null, songNotes[4], daNoteType); sustainNote.scrollFactor.set(); unspawnNotes.push(sustainNote); @@ -3423,7 +3423,7 @@ class PlayState extends MusicBeatState } var mult:Float = FlxMath.lerp(1, iconP1.scale.x, CoolUtil.boundTo(1 - (elapsed * 9 * songMultiplier), 0, 1)); var mult2:Float = FlxMath.lerp(1, iconP2.scale.x, CoolUtil.boundTo(1 - (elapsed * 9 * songMultiplier), 0, 1)); - + if (!FlxG.save.data.motion) { iconP1.scale.set(mult, mult); @@ -3728,7 +3728,6 @@ class PlayState extends MusicBeatState } } } - } if (camZooming) @@ -5710,8 +5709,8 @@ class PlayState extends MusicBeatState #end #if FEATURE_HSCRIPT - scripts.setAll("curSection", curSection); - scripts.executeAllFunc("sectionHit", [curSection]); + scripts.setAll("curSection", curSection); + scripts.executeAllFunc("sectionHit", [curSection]); #end changeCameraFocus(); @@ -5721,71 +5720,71 @@ class PlayState extends MusicBeatState { try { - if (currentSection != null) + if (currentSection != null) + { + if (!currentSection.mustHitSection) { - if (!currentSection.mustHitSection) + var offsetX = 0; + var offsetY = 0; + #if FEATURE_LUAMODCHART + if (luaModchart != null) { - var offsetX = 0; - var offsetY = 0; - #if FEATURE_LUAMODCHART - if (luaModchart != null) - { - offsetX = luaModchart.getVar("followXOffset", "float"); - offsetY = luaModchart.getVar("followYOffset", "float"); - } - #end - camFollow.setPosition(dad.getMidpoint().x + dad.camPos[0] + offsetX, dad.getMidpoint().y + dad.camPos[1] + offsetY); - #if FEATURE_LUAMODCHART - if (luaModchart != null) - luaModchart.executeState('playerTwoTurn', []); - #end + offsetX = luaModchart.getVar("followXOffset", "float"); + offsetY = luaModchart.getVar("followYOffset", "float"); + } + #end + camFollow.setPosition(dad.getMidpoint().x + dad.camPos[0] + offsetX, dad.getMidpoint().y + dad.camPos[1] + offsetY); + #if FEATURE_LUAMODCHART + if (luaModchart != null) + luaModchart.executeState('playerTwoTurn', []); + #end - #if FEATURE_HSCRIPT - scripts.executeAllFunc("playerTwoTurn"); - #end - // camFollow.setPosition(lucky.getMidpoint().x - 120, lucky.getMidpoint().y + 210); + #if FEATURE_HSCRIPT + scripts.executeAllFunc("playerTwoTurn"); + #end + // camFollow.setPosition(lucky.getMidpoint().x - 120, lucky.getMidpoint().y + 210); - switch (dad.curCharacter) - { - case 'mom' | 'mom-car': - camFollow.y = dad.getMidpoint().y; - } + switch (dad.curCharacter) + { + case 'mom' | 'mom-car': + camFollow.y = dad.getMidpoint().y; } + } - if (currentSection.mustHitSection) + if (currentSection.mustHitSection) + { + var offsetX = 0; + var offsetY = 0; + #if FEATURE_LUAMODCHART + if (luaModchart != null) { - var offsetX = 0; - var offsetY = 0; - #if FEATURE_LUAMODCHART - if (luaModchart != null) - { - offsetX = luaModchart.getVar("followXOffset", "float"); - offsetY = luaModchart.getVar("followYOffset", "float"); - } - #end - camFollow.setPosition(boyfriend.getMidpoint().x + boyfriend.camPos[0] + offsetX, - boyfriend.getMidpoint().y + boyfriend.camPos[1] + offsetY); + offsetX = luaModchart.getVar("followXOffset", "float"); + offsetY = luaModchart.getVar("followYOffset", "float"); + } + #end + camFollow.setPosition(boyfriend.getMidpoint().x + boyfriend.camPos[0] + offsetX, + boyfriend.getMidpoint().y + boyfriend.camPos[1] + offsetY); - #if FEATURE_LUAMODCHART - if (luaModchart != null) - luaModchart.executeState('playerOneTurn', []); - #end + #if FEATURE_LUAMODCHART + if (luaModchart != null) + luaModchart.executeState('playerOneTurn', []); + #end - #if FEATURE_HSCRIPT - scripts.executeAllFunc("playerOneTurn"); - #end - if (!PlayStateChangeables.Optimize) + #if FEATURE_HSCRIPT + scripts.executeAllFunc("playerOneTurn"); + #end + if (!PlayStateChangeables.Optimize) + { + switch (Stage.curStage) { - switch (Stage.curStage) - { - case 'limo': - camFollow.x = boyfriend.getMidpoint().x - 300; - case 'mall': - camFollow.y = boyfriend.getMidpoint().y - 200; - } + case 'limo': + camFollow.x = boyfriend.getMidpoint().x - 300; + case 'mall': + camFollow.y = boyfriend.getMidpoint().y - 200; } } - } + } + } } catch (e) { @@ -5808,7 +5807,6 @@ class PlayState extends MusicBeatState boyfriend = new Boyfriend(x, y, value); add(boyfriend); boyfriend.alpha = 1; - } } @@ -5947,7 +5945,7 @@ class PlayState extends MusicBeatState luaModchart.die(); luaModchart = null; } - + noteskinSprite = null; cpuNoteskinSprite = null; @@ -6535,7 +6533,7 @@ class PlayState extends MusicBeatState while (lastSecBeat < totalBeats) { - //Debug.logTrace('LastBeat: $lastSecBeat | totalBeats: $totalBeats '); + // Debug.logTrace('LastBeat: $lastSecBeat | totalBeats: $totalBeats '); SONG.notes.push(newSection(SONG.notes[SONG.notes.length - 1].lengthInSteps, true, false, false)); recalculateAllSectionTimes(SONG.notes.length - 1); lastSecBeat = TimingStruct.getBeatFromTime(SONG.notes[SONG.notes.length - 1].endTime); @@ -6589,7 +6587,7 @@ class PlayState extends MusicBeatState timerManager.clear(); tweenManager.clear(); - + while (unspawnNotes.length > 0) { var note = unspawnNotes[0]; @@ -6623,7 +6621,6 @@ class PlayState extends MusicBeatState return; } } - Stage.destroy(); Stage = null; diff --git a/source/Song.hx b/source/Song.hx index 36687aa0..c1ef78e3 100644 --- a/source/Song.hx +++ b/source/Song.hx @@ -79,7 +79,7 @@ class Song return parseJSONshit('rawsong', jsonData, 'rawname'); } - + public static function loadFromJson(songId:String, difficulty:String):SongData { var songFile = '$songId/$songId$difficulty';