Skip to content

Commit

Permalink
officially deprecate html5
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRealJake12 committed May 17, 2023
1 parent bbb675e commit 42e0662
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 133 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/html5.yml

This file was deleted.

15 changes: 5 additions & 10 deletions source/FreeplayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ class FreeplayState extends MusicBeatState

override function create()
{

instance = this;
PlayState.SONG = null;
FlxG.mouse.visible = true;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand All @@ -887,7 +882,7 @@ class FreeplayState extends MusicBeatState

songPath = null;
}

MainMenuState.freakyPlaying = false;

TimingStruct.clearTimings();
Expand Down Expand Up @@ -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")
{
Expand Down
2 changes: 2 additions & 0 deletions source/GameplayCustomizeState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class GameplayCustomizeState extends MusicBeatState

var text:FlxText;
var blackBorder:FlxSprite;

public static var instance:GameplayCustomizeState = null;

var laneunderlay:FlxSprite;
Expand Down Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion source/MusicBeatState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ class MusicBeatState extends FlxUIState
oldStep = curStep;
}
}
}
}

if (FlxG.keys.anyJustPressed([fullscreenBind]))
{
Expand Down
3 changes: 2 additions & 1 deletion source/PauseSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
129 changes: 63 additions & 66 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2305,7 +2305,7 @@ class PlayState extends MusicBeatState
vocals.time = startTime;
Conductor.songPosition = startTime;
startTime = 0;

recalculateAllSectionTimes();

#if FEATURE_DISCORD
Expand Down Expand Up @@ -2449,7 +2449,7 @@ class PlayState extends MusicBeatState
}
#end
}

recalculateAllSectionTimes();
checkforSections();

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -3728,7 +3728,6 @@ class PlayState extends MusicBeatState
}
}
}

}

if (camZooming)
Expand Down Expand Up @@ -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();
Expand All @@ -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)
{
Expand All @@ -5808,7 +5807,6 @@ class PlayState extends MusicBeatState
boyfriend = new Boyfriend(x, y, value);
add(boyfriend);
boyfriend.alpha = 1;

}
}

Expand Down Expand Up @@ -5947,7 +5945,7 @@ class PlayState extends MusicBeatState
luaModchart.die();
luaModchart = null;
}

noteskinSprite = null;
cpuNoteskinSprite = null;

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -6589,7 +6587,7 @@ class PlayState extends MusicBeatState
timerManager.clear();

tweenManager.clear();

while (unspawnNotes.length > 0)
{
var note = unspawnNotes[0];
Expand Down Expand Up @@ -6623,7 +6621,6 @@ class PlayState extends MusicBeatState
return;
}
}


Stage.destroy();
Stage = null;
Expand Down
2 changes: 1 addition & 1 deletion source/Song.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 42e0662

Please sign in to comment.