Skip to content

Commit

Permalink
ae
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackx2 committed Jan 11, 2025
1 parent 2225250 commit 181f90b
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
buildLinux:
name: Linux Build
runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
Expand Down
3 changes: 1 addition & 2 deletions source/funkin/backend/utils/ClientPrefs.hx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import funkin.game.Init.Volume;
public var noteSplashes:Bool = true;
public var opnoteSplashes:Bool = true;
public var lowQuality:Bool = false;
public var hideFullHUD:Bool = false;
public var hideHud:Bool = false;
public var botplayEnabled:Bool = false;
#if SHADERS_ALLOWED
public var shaders:Bool = true;
Expand All @@ -35,7 +35,6 @@ import funkin.game.Init.Volume;
public var cursing:Bool = true;
public var violence:Bool = true;
public var camZooms:Bool = true;
public var hideHud:Bool = false;
public var noteOffset:Int = 0;
public var arrowHSV:Array<Array<Int>> = [[0, 0, 0], [0, 0, 0], [0, 0, 0], [0, 0, 0]];
public var ghostTapping:Bool = true;
Expand Down
18 changes: 9 additions & 9 deletions source/funkin/game/objects/scorebars/AstroScore.hx
Original file line number Diff line number Diff line change
Expand Up @@ -22,29 +22,29 @@ class AstroScore extends BaseScorebar
scoreText = new FlxText(0, defaultPos.y + 36, FlxG.width, "erm, owo???", 20);
scoreText.scrollFactor.set();
scoreText.borderSize = 1.25;
scoreText.visible = !ClientPrefs.data.hideFullHUD;
scoreText.visible = !ClientPrefs.data.hideHud;
scoreText.setFormat(Paths.font("PhantomMuff.ttf"), 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
add(scoreText);

watermark = new FlxText(40, defaultPos.y + 37, 0, "", 16);
watermark.setFormat(Paths.font("PhantomMuff.ttf"), 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
watermark.scrollFactor.set();
watermark.borderSize = 1.25;
watermark.visible = !ClientPrefs.data.hideFullHUD;
watermark.visible = !ClientPrefs.data.hideHud;
add(watermark);

songLeft = new FlxText(1140, defaultPos.y + 37, 0, "0:00 • 0:00", 16);
songLeft.setFormat(Paths.font("PhantomMuff.ttf"), 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
songLeft.scrollFactor.set();
songLeft.borderSize = 1.25;
songLeft.visible = !ClientPrefs.data.hideFullHUD;
songLeft.visible = !ClientPrefs.data.hideHud;
add(songLeft);

versionTxtSmth = new FlxText(FlxG.width - 320, 10, 400, "Astro Engine: v" + EngineData.engineData.coreVersion, 32);
versionTxtSmth.setFormat(Paths.font("PhantomMuff.ttf"), 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
versionTxtSmth.scrollFactor.set();
versionTxtSmth.updateHitbox();
versionTxtSmth.visible = !ClientPrefs.data.hideFullHUD;
versionTxtSmth.visible = !ClientPrefs.data.hideHud;
add(versionTxtSmth);

watermark.text = PlayState.SONG.song.formatText() + "" + Difficulty.list[PlayState.storyDifficulty];
Expand All @@ -66,34 +66,34 @@ class AstroScore extends BaseScorebar
var MAIN_SIZE:Int = 24;
sickTxt = new FlxText(x, main_y, 0, "SICKS: 000",
MAIN_SIZE).setFormat(Paths.font("PhantomMuff.ttf"), MAIN_SIZE, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
sickTxt.visible = !ClientPrefs.data.hideFullHUD;
sickTxt.visible = !ClientPrefs.data.hideHud;
add(sickTxt);
addCurveBG(sickTxt.x - 10, sickTxt.y - 2.5, sickTxt.fieldWidth - 10, 35, 35, 0, game.uiBackgroundGroup);

goodsTxt = new FlxText(x, main_y, 0, "GOODS: 000",
MAIN_SIZE).setFormat(Paths.font("PhantomMuff.ttf"), MAIN_SIZE, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
goodsTxt.visible = !ClientPrefs.data.hideFullHUD;
goodsTxt.visible = !ClientPrefs.data.hideHud;
goodsTxt.y += y;
add(goodsTxt);
addCurveBG(goodsTxt.x - 10, goodsTxt.y - 2.5, sickTxt.fieldWidth - 10, 35, 35, 0, game.uiBackgroundGroup);

badTxt = new FlxText(x, main_y, 0, "BAD: 000",
MAIN_SIZE).setFormat(Paths.font("PhantomMuff.ttf"), MAIN_SIZE, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
badTxt.visible = !ClientPrefs.data.hideFullHUD;
badTxt.visible = !ClientPrefs.data.hideHud;
badTxt.y = goodsTxt.y + y;
add(badTxt);
addCurveBG(badTxt.x - 10, badTxt.y - 2.5, sickTxt.fieldWidth - 10, 35, 35, 0, game.uiBackgroundGroup);

shitsTxt = new FlxText(x, main_y, 0, "SHIT: 000",
MAIN_SIZE).setFormat(Paths.font("PhantomMuff.ttf"), MAIN_SIZE, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
shitsTxt.visible = !ClientPrefs.data.hideFullHUD;
shitsTxt.visible = !ClientPrefs.data.hideHud;
shitsTxt.y = badTxt.y + y;
add(shitsTxt);
addCurveBG(shitsTxt.x - 10, shitsTxt.y - 2.5, sickTxt.fieldWidth - 10, 35, 35, 0, game.uiBackgroundGroup);

missTxt = new FlxText(x, main_y, 0, "MISS: 000",
MAIN_SIZE).setFormat(Paths.font("PhantomMuff.ttf"), MAIN_SIZE, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
missTxt.visible = !ClientPrefs.data.hideFullHUD;
missTxt.visible = !ClientPrefs.data.hideHud;
missTxt.y = shitsTxt.y + y;
add(missTxt);
addCurveBG(missTxt.x - 10, missTxt.y - 2.5, sickTxt.fieldWidth - 10, 35, 35, 0, game.uiBackgroundGroup);
Expand Down
6 changes: 3 additions & 3 deletions source/funkin/game/objects/scorebars/DefaultHUD.hx
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ class DefaultHUD extends FlxBasic
// furry
iconP1 = new HealthIcon(game.boyfriend.healthIcon, true);
iconP1.y = healthBar.y - 75;
iconP1.visible = !ClientPrefs.data.hideFullHUD;
iconP1.visible = !ClientPrefs.data.hideHud;
iconP1.alpha = ClientPrefs.data.healthBarAlpha;
game.uiGroup.add(iconP1);

iconP2 = new HealthIcon(game.dad.healthIcon, false);
iconP2.y = healthBar.y - 75;
iconP2.visible = !ClientPrefs.data.hideFullHUD;
iconP2.visible = !ClientPrefs.data.hideHud;
iconP2.alpha = ClientPrefs.data.healthBarAlpha;
game.uiGroup.add(iconP2);
}
Expand Down Expand Up @@ -108,7 +108,7 @@ class DefaultHUD extends FlxBasic
game.uiGroup.add(timeBar);
game.uiGroup.add(timeTxt);

if (ClientPrefs.data.hideFullHUD)
if (ClientPrefs.data.hideHud)
timeBar.visible = false;
else
timeBar.visible = showTime;
Expand Down
2 changes: 1 addition & 1 deletion source/funkin/game/objects/scorebars/PsychScore.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PsychScore extends BaseScorebar
scoreText = new FlxText(0, defaultPos.y + 40, FlxG.width, "", 20);
scoreText.scrollFactor.set();
scoreText.borderSize = 1.25;
scoreText.visible = !ClientPrefs.data.hideFullHUD;
scoreText.visible = !ClientPrefs.data.hideHud;
scoreText.alpha = 0;
scoreText.setFormat(Constants.DEFAULT_FONT, 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
add(scoreText);
Expand Down
2 changes: 1 addition & 1 deletion source/funkin/game/objects/scorebars/VSliceScore.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class VSliceScore extends BaseScorebar
scoreText = new FlxText(defaultPosButBetter.x + defaultPosButBetter.width - 190, defaultPosButBetter.y + 30, 0, '', 20);
scoreText.scrollFactor.set();
scoreText.borderSize = 1.25;
scoreText.visible = !ClientPrefs.data.hideFullHUD;
scoreText.visible = !ClientPrefs.data.hideHud;
scoreText.alpha = 0;
scoreText.setFormat(Constants.DEFAULT_FONT, 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
add(scoreText);
Expand Down
8 changes: 4 additions & 4 deletions source/funkin/game/options/VisualsUISubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ class VisualsUISubState extends BaseOptionsMenu

var option:Option = new Option('Hide HUD',
'Hide\'s all HUD elements\nimproves performance.',
'hideFullHUD',
'hideHud',
BOOL);
addOption(option);
option.onChange = () -> {
if (ClientPrefs.data.hideFullHUD){
if (ClientPrefs.data.hideHud){
ClientPrefs.data.showFPS = false;
}else{
ClientPrefs.data.showFPS = true;
Expand Down Expand Up @@ -238,9 +238,9 @@ class VisualsUISubState extends BaseOptionsMenu
function onChangeFPSCounter()
{
if(funkin.backend.utils.ClientPrefs.data.showFPS){
funkin.backend.utils.ClientPrefs.data.hideFullHUD = false;
funkin.backend.utils.ClientPrefs.data.hideHud = false;
} else {
funkin.backend.utils.ClientPrefs.data.hideFullHUD = true;
funkin.backend.utils.ClientPrefs.data.hideHud = true;
}

if(funkin.game.Main.fpsVar != null)
Expand Down
11 changes: 7 additions & 4 deletions source/funkin/game/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,7 @@ class PlayState extends MusicBeatState
comboGroup = new FlxSpriteGroup();
add(comboGroup);
noteGroup = new FlxTypedGroup<FlxBasic>();
noteGroup.visible = !ClientPrefs.data.hideHud;
add(noteGroup);
uiBackgroundGroup = new FlxTypedGroup<FlxSprite>();
add(uiBackgroundGroup);
Expand All @@ -691,19 +692,21 @@ class PlayState extends MusicBeatState
if (ClientPrefs.data.downScroll)
strumLine.y = FlxG.height - 150;
strumLine.scrollFactor.set();
strumLine.visible = !ClientPrefs.data.hideFullHUD;
strumLine.visible = !ClientPrefs.data.hideHud;

strumLineNotes = new FlxTypedGroup<StrumNote>();
noteGroup.add(strumLineNotes);
strumLineNotes.visible = !ClientPrefs.data.hideFullHUD;
strumLineNotes.visible = !ClientPrefs.data.hideHud;
noteGroup.add(grpNoteSplashes);

var splash:NoteSplash = new NoteSplash();
grpNoteSplashes.add(splash);
splash.alpha = 0.000001;

opponentStrums = new FlxTypedGroup<StrumNote>();
opponentStrums.visible = !ClientPrefs.data.hideHud;
playerStrums = new FlxTypedGroup<StrumNote>();
playerStrums.visible = !ClientPrefs.data.hideHud;

generateSong();

Expand Down Expand Up @@ -740,7 +743,7 @@ class PlayState extends MusicBeatState

if (!ClientPrefs.data.downScroll)
uiBackgroundGroup.visible = true;
if (ClientPrefs.data.hideFullHUD)
if (ClientPrefs.data.hideHud)
uiBackgroundGroup.visible = false;

noteGroup.cameras = [camHUD];
Expand Down Expand Up @@ -3540,7 +3543,7 @@ class PlayState extends MusicBeatState
*/
public function spawnNoteSplashOnNote(note:Note)
{
if (ClientPrefs.data.noteSplashes && note != null && !ClientPrefs.data.hideFullHUD)
if (ClientPrefs.data.noteSplashes && note != null && !ClientPrefs.data.hideHud)
{
var strum:StrumNote = playerStrums.members[note.noteData];
if (ClientPrefs.data.opnoteSplashes && note.hitByOpponent)
Expand Down
9 changes: 7 additions & 2 deletions source/funkin/game/states/substates/GameOverSubstate.hx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ class GameOverSubstate extends MusicBeatSubstate
Conductor.songPosition = 0;

if(boyfriend == null)
{
boyfriend = new Character(PlayState.instance.boyfriend.getScreenPosition().x, PlayState.instance.boyfriend.getScreenPosition().y, characterName, true);
{
if(PlayState.instance.boyfriendMap.exists(characterName)){
boyfriend = PlayState.instance.boyfriendMap.get(characterName);
boyfriend.alpha = 1;
}else{
boyfriend = new Character(PlayState.instance.boyfriend.getScreenPosition().x, PlayState.instance.boyfriend.getScreenPosition().y, characterName, true);
}
boyfriend.x += boyfriend.positionArray[0] - PlayState.instance.boyfriend.positionArray[0];
boyfriend.y += boyfriend.positionArray[1] - PlayState.instance.boyfriend.positionArray[1];
}
Expand Down

0 comments on commit 181f90b

Please sign in to comment.