diff --git a/source/Alphabet.hx b/source/Alphabet.hx index c9b922b..9d55608 100644 --- a/source/Alphabet.hx +++ b/source/Alphabet.hx @@ -293,7 +293,7 @@ class AlphaCharacter extends FlxSprite var tex = Paths.getSparrowAtlas('ui/alphabet'); frames = tex; - antialiasing = true; + antialiasing = FlxG.save.data.antialiasing; } public function createBoldLetter(letter:String) { diff --git a/source/BGSprite.hx b/source/BGSprite.hx index 813586f..4abd991 100644 --- a/source/BGSprite.hx +++ b/source/BGSprite.hx @@ -1,4 +1,5 @@ package; +import flixel.FlxG; import flixel.group.FlxGroup.FlxTypedGroup; import flixel.FlxSprite; import sys.io.File; @@ -60,7 +61,7 @@ class BGSprite extends FlxSprite } } } - this.antialiasing = antialiasing; + this.antialiasing = this.antialiasing ? FlxG.save.data.antialiasing : antialiasing; scrollFactor.set(scrollX, scrollY); this.active = active; } diff --git a/source/ChangeKeybinds.hx b/source/ChangeKeybinds.hx index 9d1f925..ae1ec66 100644 --- a/source/ChangeKeybinds.hx +++ b/source/ChangeKeybinds.hx @@ -112,7 +112,7 @@ class ChangeKeybinds extends MusicBeatState tutorial.screenCenter(X); tutorial.setFormat("Comic Sans MS Bold", 32, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); tutorial.borderSize = 2; - tutorial.antialiasing = true; + tutorial.antialiasing = FlxG.save.data.antialiasing; add(tutorial); createPresetUI(); @@ -285,7 +285,7 @@ class ChangeKeybinds extends MusicBeatState var control:FlxText = new FlxText((FlxG.width / 2) - textx, (preset.y + 125) + (order * 100), 0, uiControl.uiName + ":", 32); control.setFormat("Comic Sans MS Bold", 32, FlxColor.WHITE, CENTER); control.borderSize = 2; - control.antialiasing = true; + control.antialiasing = FlxG.save.data.antialiasing; add(control); controlTexts.push(control); @@ -305,7 +305,7 @@ class ChangeKeybinds extends MusicBeatState keybind.y = control.y; keybind.setFormat("Comic Sans MS Bold", 32, FlxColor.WHITE, CENTER); keybind.borderSize = 2; - keybind.antialiasing = true; + keybind.antialiasing = FlxG.save.data.antialiasing; add(keybind); keybindTexts.add(keybind); @@ -323,7 +323,7 @@ class ChangeKeybinds extends MusicBeatState choosePreset.screenCenter(X); choosePreset.setFormat("Comic Sans MS Bold", 32, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); choosePreset.borderSize = 2; - choosePreset.antialiasing = true; + choosePreset.antialiasing = FlxG.save.data.antialiasing; keybindPresetGroup.add(choosePreset); add(choosePreset); @@ -331,7 +331,7 @@ class ChangeKeybinds extends MusicBeatState preset.screenCenter(X); preset.setFormat("Comic Sans MS Bold", 32, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); preset.borderSize = 2; - preset.antialiasing = true; + preset.antialiasing = FlxG.save.data.antialiasing; add(preset); keybindPresetGroup.add(preset); selectableItems.push(preset); @@ -339,14 +339,14 @@ class ChangeKeybinds extends MusicBeatState presetLeft = new FlxText(preset.x - arrowOffset, preset.y - preset.textField.height - 2, FlxG.width / 2, "<", 32); presetLeft.setFormat("Comic Sans MS Bold", 32, FlxColor.WHITE, CENTER); presetLeft.borderSize = 1; - presetLeft.antialiasing = true; + presetLeft.antialiasing = FlxG.save.data.antialiasing; keybindPresetGroup.add(presetLeft); add(presetLeft); presetRight = new FlxText(preset.x + arrowOffset, preset.y - preset.textField.height - 2, FlxG.width / 2, ">", 32); presetRight.setFormat("Comic Sans MS Bold", 32, FlxColor.WHITE, CENTER); presetRight.borderSize = 1; - presetRight.antialiasing = true; + presetRight.antialiasing = FlxG.save.data.antialiasing; keybindPresetGroup.add(presetRight); add(presetRight); diff --git a/source/ChangeLanguageState.hx b/source/ChangeLanguageState.hx index 26ceb37..8880bcd 100644 --- a/source/ChangeLanguageState.hx +++ b/source/ChangeLanguageState.hx @@ -36,13 +36,13 @@ class ChangeLanguageState extends MusicBeatState menuBG.color = 0xFFea71fd; menuBG.setGraphicSize(Std.int(menuBG.width * 1.1)); menuBG.updateHitbox(); - menuBG.antialiasing = true; + menuBG.antialiasing = FlxG.save.data.antialiasing; menuBG.loadGraphic(MainMenuState.randomizeBG()); add(menuBG); var helper:FlxText = new FlxText(0, 150, FlxG.width, "Select a language", 40); helper.setFormat("Comic Sans MS Bold", 60, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); - helper.antialiasing = true; + helper.antialiasing = FlxG.save.data.antialiasing; helper.borderSize = 3; helper.screenCenter(X); add(helper); @@ -53,7 +53,7 @@ class ChangeLanguageState extends MusicBeatState var text:FlxText = new FlxText(0, 350 + (i * 75), FlxG.width, curLanguage.langaugeName, 40); text.setFormat("Comic Sans MS Bold", 30, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE); - text.antialiasing = true; + text.antialiasing = FlxG.save.data.antialiasing; text.screenCenter(X); add(text); languageTextGroup.add(text); diff --git a/source/Character.hx b/source/Character.hx index c3109ea..b9d9ec0 100644 --- a/source/Character.hx +++ b/source/Character.hx @@ -87,7 +87,7 @@ class Character extends FlxSprite skins.set('recursed', 'bf-recursed'); skins.set('gfSkin', 'gf-none'); - antialiasing = true; + antialiasing = FlxG.save.data.antialiasing; switch (curCharacter) { @@ -1292,7 +1292,7 @@ class Character extends FlxSprite nativelyPlayable = jsonCustom.nativelyPlayable; - antialiasing = jsonCustom.antialiasing; + antialiasing = jsonCustom.antialiasing ? FlxG.save.data.antialiasing : jsonCustom.antialiasing; if (!jsonCustom.iconAntialiasing) { HealthIcon.noAaChars.push(curCharacter); diff --git a/source/CharacterSelectState.hx b/source/CharacterSelectState.hx index f511130..9e3d55d 100644 --- a/source/CharacterSelectState.hx +++ b/source/CharacterSelectState.hx @@ -257,7 +257,7 @@ class CharacterSelectState extends MusicBeatState //create BG var bg:FlxSprite = new FlxSprite(-600, -200).loadGraphic(Paths.image('backgrounds/shared/sky_night')); - bg.antialiasing = true; + bg.antialiasing = FlxG.save.data.antialiasing; bg.scrollFactor.set(0.75, 0.75); bg.active = false; @@ -317,7 +317,7 @@ class CharacterSelectState extends MusicBeatState legs.frames = Paths.getSparrowAtlas('characters/shaggy_god', 'shared'); legs.animation.addByPrefix('legs', "solo_legs", 30); legs.animation.play('legs'); - legs.antialiasing = true; + legs.antialiasing = FlxG.save.data.antialiasing; legs.flipX = true; legs.updateHitbox(); legs.offset.set(legs.frameWidth / 2, 10); @@ -351,7 +351,7 @@ class CharacterSelectState extends MusicBeatState characterText.borderSize = 5; characterText.screenCenter(X); characterText.cameras = [camHUD]; - characterText.antialiasing = true; + characterText.antialiasing = FlxG.save.data.antialiasing; characterText.y = FlxG.height - 180; add(characterText); @@ -363,26 +363,26 @@ class CharacterSelectState extends MusicBeatState resetText.y -= resetText.textField.textHeight - 100; resetText.borderSize = 3; resetText.cameras = [camHUD]; - resetText.antialiasing = true; + resetText.antialiasing = FlxG.save.data.antialiasing; resetText.visible = false; add(resetText); funnyIconMan = new HealthIcon('bf', true); funnyIconMan.cameras = [camHUD]; funnyIconMan.visible = false; - funnyIconMan.antialiasing = true; + funnyIconMan.antialiasing = FlxG.save.data.antialiasing; updateIconPosition(); add(funnyIconMan); var tutorialThing:FlxSprite = new FlxSprite(-110, -30).loadGraphic(Paths.image('ui/charSelectGuide')); tutorialThing.setGraphicSize(Std.int(tutorialThing.width * 1.5)); - tutorialThing.antialiasing = true; + tutorialThing.antialiasing = FlxG.save.data.antialiasing; tutorialThing.cameras = [camHUD]; add(tutorialThing); var arrowLeft:FlxSprite = new FlxSprite(10,0).loadGraphic(Paths.image("ui/ArrowLeft_Idle", "preload")); arrowLeft.screenCenter(Y); - arrowLeft.antialiasing = true; + arrowLeft.antialiasing = FlxG.save.data.antialiasing; arrowLeft.scrollFactor.set(); arrowLeft.cameras = [camHUD]; arrows[0] = arrowLeft; @@ -390,7 +390,7 @@ class CharacterSelectState extends MusicBeatState var arrowRight:FlxSprite = new FlxSprite(-5,0).loadGraphic(Paths.image("ui/ArrowRight_Idle", "preload")); arrowRight.screenCenter(Y); - arrowRight.antialiasing = true; + arrowRight.antialiasing = FlxG.save.data.antialiasing; arrowRight.x = 1280 - arrowRight.width - 5; arrowRight.scrollFactor.set(); arrowRight.cameras = [camHUD]; @@ -433,7 +433,7 @@ class CharacterSelectState extends MusicBeatState babyArrow.animation.addByPrefix('purple', 'arrowLEFT0'); babyArrow.animation.addByPrefix('red', 'arrowRIGHT0'); - babyArrow.antialiasing = true; + babyArrow.antialiasing = FlxG.save.data.antialiasing; babyArrow.setGraphicSize(Std.int(babyArrow.width * 0.7)); babyArrow.x += 160 * 0.7 * i; diff --git a/source/ChartingState.hx b/source/ChartingState.hx index 75fdd6f..aae4602 100644 --- a/source/ChartingState.hx +++ b/source/ChartingState.hx @@ -123,7 +123,7 @@ class ChartingState extends MusicBeatState bg.setGraphicSize(Std.int(bg.width * 1.1)); bg.updateHitbox(); bg.screenCenter(); - bg.antialiasing = true; + bg.antialiasing = FlxG.save.data.antialiasing; bg.color = FlxColor.GRAY; add(bg); diff --git a/source/CreditsMenuState.hx b/source/CreditsMenuState.hx index 024ee84..06da1d8 100644 --- a/source/CreditsMenuState.hx +++ b/source/CreditsMenuState.hx @@ -543,7 +543,7 @@ if (FileSystem.exists(TitleState.modFolder + '/data/credits.json')) { titleText.borderSize = 3; titleText.borderQuality = 3; titleText.screenCenter(X); - titleText.antialiasing = true; + titleText.antialiasing = FlxG.save.data.antialiasing; titleText.scrollFactor.set(0, 1); if (DoFunnyScroll) { @@ -563,7 +563,7 @@ if (FileSystem.exists(TitleState.modFolder + '/data/credits.json')) { var textItem:FlxText = new FlxText(0, i * 50, 0, currentPerson.name, 32); textItem.setFormat(defaultFormat.font, defaultFormat.size, defaultFormat.color, defaultFormat.alignment, defaultFormat.borderStyle, defaultFormat.borderColor); textItem.screenCenter(X); - textItem.antialiasing = true; + textItem.antialiasing = FlxG.save.data.antialiasing; textItem.scrollFactor.set(0, 1); var iconImage:Dynamic = FileSystem.exists(TitleState.modFolder + '/images/credits/icons/Mod Devs/' + currentPerson.name + '.png') ? Paths.customImage(TitleState.modFolder + '/images/credits/icons/Mod Devs/' + currentPerson.name) : Paths.image('credits/icons/' + creditsTypeString + '/' + currentPerson.name); @@ -573,7 +573,7 @@ if (FileSystem.exists(TitleState.modFolder + '/data/credits.json')) { add(personIcon); personIcon.visible = !DoFunnyScroll; - personIcon.antialiasing = currentPerson.antialiasing; + personIcon.antialiasing = currentPerson.antialiasing ? FlxG.save.data.antialiasing : currentPerson.antialiasing; var creditsTextItem:CreditsText = new CreditsText(textItem, true, personIcon); @@ -606,7 +606,7 @@ if (FileSystem.exists(TitleState.modFolder + '/data/credits.json')) { { var logoBl:FlxSprite = new FlxSprite(StupidCameraFollow.x, StupidCameraFollow.y); logoBl.frames = Paths.getSparrowAtlas('ui/logoBumpin'); - logoBl.antialiasing = true; + logoBl.antialiasing = FlxG.save.data.antialiasing; logoBl.alpha = 0; logoBl.x -= logoBl.width / 2; logoBl.y -= logoBl.height / 2; @@ -860,7 +860,7 @@ if (FileSystem.exists(TitleState.modFolder + '/data/credits.json')) { personName.setFormat(selectedFormat.font, selectedFormat.size, selectedFormat.color, selectedFormat.alignment, selectedFormat.borderStyle, selectedFormat.borderColor); personName.screenCenter(X); personName.updateHitbox(); - personName.antialiasing = true; + personName.antialiasing = FlxG.save.data.antialiasing; personName.scrollFactor.set(); personName.active = false; @@ -868,7 +868,7 @@ if (FileSystem.exists(TitleState.modFolder + '/data/credits.json')) { credits.setFormat(selectedFormat.font, selectedFormat.size, selectedFormat.color, selectedFormat.alignment, selectedFormat.borderStyle, selectedFormat.borderColor); credits.screenCenter(X); credits.updateHitbox(); - credits.antialiasing = true; + credits.antialiasing = FlxG.save.data.antialiasing; credits.scrollFactor.set(); credits.active = false; @@ -916,7 +916,7 @@ if (FileSystem.exists(TitleState.modFolder + '/data/credits.json')) { discordText.alpha = 0; discordText.updateHitbox(); discordText.scrollFactor.set(); - discordText.antialiasing = true; + discordText.antialiasing = FlxG.save.data.antialiasing; discordText.active = false; add(discordText); FlxTween.tween(discordText, { alpha: 1 }, fadeTime); diff --git a/source/CreditsPopUp.hx b/source/CreditsPopUp.hx index cf02f3a..24c20f7 100644 --- a/source/CreditsPopUp.hx +++ b/source/CreditsPopUp.hx @@ -1,5 +1,6 @@ package; +import flixel.FlxG; import haxe.Json; import sys.io.File; import sys.FileSystem; @@ -84,39 +85,39 @@ class CreditsPopUp extends FlxSpriteGroup case 0 | 1: headingPath = {path: 'songHeadings/daveHeading', antiAliasing: false, iconOffset: 0}; case 2: - headingPath = {path: 'songHeadings/bambiHeading', antiAliasing: true, iconOffset: 0}; + headingPath = {path: 'songHeadings/bambiHeading', antiAliasing: FlxG.save.data.antialiasing, iconOffset: 0}; case 3: headingPath = {path: 'songHeadings/splitathonHeading', antiAliasing: false, iconOffset: 0}; case 4: - headingPath = {path: 'songHeadings/festivalHeading', antiAliasing: true, iconOffset: 0}; + headingPath = {path: 'songHeadings/festivalHeading', antiAliasing: FlxG.save.data.antialiasing, iconOffset: 0}; case 5: headingPath = {path: 'songHeadings/bevelHeading', antiAliasing: false, iconOffset: 0}; case 6: - headingPath = {path: 'songHeadings/kabungaHeading', antiAliasing: true, iconOffset: 0}; + headingPath = {path: 'songHeadings/kabungaHeading', antiAliasing: FlxG.save.data.antialiasing, iconOffset: 0}; case 7: - headingPath = {path: 'songHeadings/secretLeakHeading', antiAliasing: true, iconOffset: 3}; + headingPath = {path: 'songHeadings/secretLeakHeading', antiAliasing: FlxG.save.data.antialiasing, iconOffset: 3}; case 8: - headingPath = {path: 'songHeadings/tristanHeading', antiAliasing: true, iconOffset: 0}; + headingPath = {path: 'songHeadings/tristanHeading', antiAliasing: FlxG.save.data.antialiasing, iconOffset: 0}; case 9: - headingPath = {path: 'songHeadings/botHeading', antiAliasing: true, + headingPath = {path: 'songHeadings/botHeading', antiAliasing: FlxG.save.data.antialiasing, animation: new Animation('botTrot', 'Bot trot', 24, true, [false, false]), iconOffset: 0}; case 10: - headingPath = {path: 'songHeadings/recursedHeading', antiAliasing: true, iconOffset: 5}; + headingPath = {path: 'songHeadings/recursedHeading', antiAliasing: FlxG.save.data.antialiasing, iconOffset: 5}; case 11: - headingPath = {path: 'songHeadings/californiaHeading', antiAliasing: true, + headingPath = {path: 'songHeadings/californiaHeading', antiAliasing: FlxG.save.data.antialiasing, animation: new Animation('california', 'California', 24, true, [false, false]), iconOffset: 0}; case 12: - headingPath = {path: 'songHeadings/fnafHeading', antiAliasing: true, iconOffset: 0}; + headingPath = {path: 'songHeadings/fnafHeading', antiAliasing: FlxG.save.data.antialiasing, iconOffset: 0}; case 13: headingPath = {path: 'songHeadings/fnfengeading', antiAliasing: false, iconOffset: 0}; case 14: - headingPath = {path: 'songHeadings/cheatingHeading', antiAliasing: true, + headingPath = {path: 'songHeadings/cheatingHeading', antiAliasing: FlxG.save.data.antialiasing, animation: new Animation('cheating', 'Cheating', 24, true, [false, false]), iconOffset: 0}; case 15: - headingPath = {path: 'songHeadings/unfairHeading', antiAliasing: true, + headingPath = {path: 'songHeadings/unfairHeading', antiAliasing: FlxG.save.data.antialiasing, animation: new Animation('unfair', 'Unfairness', 24, true, [false, false]), iconOffset: 0}; case 16: - headingPath = {path: 'songHeadings/expungedHeading', antiAliasing: true, + headingPath = {path: 'songHeadings/expungedHeading', antiAliasing: FlxG.save.data.antialiasing, animation: new Animation('expunged', 'Expunged', 24, true, [false, false]), iconOffset: 0}; default: if (FreeplayState.isaCustomSong) { @@ -259,7 +260,7 @@ class CreditsPopUp extends FlxSpriteGroup funnyText = new FlxText(1, 0, 650, text, 16); funnyText.setFormat('Comic Sans MS Bold', 30, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); funnyText.borderSize = 2; - funnyText.antialiasing = true; + funnyText.antialiasing = FlxG.save.data.antialiasing; add(funnyText); } public function rescaleIcon() diff --git a/source/DialogueBox.hx b/source/DialogueBox.hx index f65e33c..b78efc1 100644 --- a/source/DialogueBox.hx +++ b/source/DialogueBox.hx @@ -157,7 +157,7 @@ class DialogueBox extends FlxSpriteGroup box.updateHitbox(); box.animation.addByPrefix('normalOpen', 'Speech Bubble Normal Open', 24, false); box.animation.addByPrefix('normal', 'speech bubble normal', 24, true); - box.antialiasing = true; + box.antialiasing = FlxG.save.data.antialiasing; if (!PlayState.instance.hasDialogue) return; @@ -241,25 +241,25 @@ class DialogueBox extends FlxSpriteGroup dropText = new FlxText(242, 502, Std.int(FlxG.width * 0.6), "", 32); dropText.font = 'Comic Sans MS Bold'; dropText.color = PlayState.instance.localFunny != PlayState.CharacterFunnyEffect.Recurser ? 0xFFFFFFFF : 0xFF00137F; - dropText.antialiasing = true; + dropText.antialiasing = FlxG.save.data.antialiasing; add(dropText); swagDialogue = new FlxTypeText(240, 500, Std.int(FlxG.width * 0.6), "", 32); swagDialogue.font = 'Comic Sans MS Bold'; swagDialogue.color = 0xFF000000; - swagDialogue.antialiasing = true; + swagDialogue.antialiasing = FlxG.save.data.antialiasing; add(swagDialogue); default: dropText = new FlxText(242, 502, Std.int(FlxG.width * 0.6), "", 32); dropText.font = 'Comic Sans MS Bold'; dropText.color = 0xFF00137F; - dropText.antialiasing = true; + dropText.antialiasing = FlxG.save.data.antialiasing; add(dropText); swagDialogue = new FlxTypeText(240, 500, Std.int(FlxG.width * 0.6), "", 32); swagDialogue.font = 'Comic Sans MS Bold'; swagDialogue.color = 0xFF000000; - swagDialogue.antialiasing = true; + swagDialogue.antialiasing = FlxG.save.data.antialiasing; add(swagDialogue); } dialogue = new Alphabet(0, 80, "", false, true); diff --git a/source/FreeplayState.hx b/source/FreeplayState.hx index efd714d..8355aa1 100644 --- a/source/FreeplayState.hx +++ b/source/FreeplayState.hx @@ -268,7 +268,7 @@ class FreeplayState extends MusicBeatState CurrentSongIcon.centerOffsets(false); CurrentSongIcon.x = (1000 * i + 1) + (512 - CurrentSongIcon.width); CurrentSongIcon.y = (FlxG.height / 2) - 256; - CurrentSongIcon.antialiasing = true; + CurrentSongIcon.antialiasing = FlxG.save.data.antialiasing; var NameAlpha:Alphabet = new Alphabet(40, (FlxG.height / 2) - 282, translatedCatagory[i], true, false); NameAlpha.x = CurrentSongIcon.x; @@ -283,7 +283,7 @@ class FreeplayState extends MusicBeatState CurrentSongIcon.centerOffsets(false); CurrentSongIcon.x = (1000 * i + 1) + (512 - CurrentSongIcon.width); CurrentSongIcon.y = (FlxG.height / 2) - 256; - CurrentSongIcon.antialiasing = true; + CurrentSongIcon.antialiasing = FlxG.save.data.antialiasing; var NameAlpha:Alphabet = new Alphabet(40, (FlxG.height / 2) - 282, translatedCatagory[i], true, false); NameAlpha.x = CurrentSongIcon.x; @@ -314,7 +314,7 @@ class FreeplayState extends MusicBeatState curOptDesc.setFormat("Comic Sans MS Bold", 24, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); curOptDesc.scrollFactor.set(0, 0); curOptDesc.borderSize = 2; - curOptDesc.antialiasing = true; + curOptDesc.antialiasing = FlxG.save.data.antialiasing; curOptDesc.screenCenter(X); curOptDesc.y = FlxG.height - 58; add(curOptDesc); @@ -487,7 +487,7 @@ class FreeplayState extends MusicBeatState scoreText = new FlxText(FlxG.width * 0.7, 0, 0, "", 32); scoreText.setFormat(Paths.font("comic.ttf"), 32, FlxColor.WHITE, LEFT); - scoreText.antialiasing = true; + scoreText.antialiasing = FlxG.save.data.antialiasing; scoreText.y = -225; scoreText.scrollFactor.set(); @@ -498,7 +498,7 @@ class FreeplayState extends MusicBeatState diffText = new FlxText(scoreText.x, scoreText.y + 15, 0, "", 24); diffText.setFormat(Paths.font("comic.ttf"), 24, FlxColor.WHITE, LEFT); - diffText.antialiasing = true; + diffText.antialiasing = FlxG.save.data.antialiasing; diffText.scrollFactor.set(); settingsBG = new FlxSprite(FlxG.width * 0.7 - 6, 400).makeGraphic(Std.int(FlxG.width * 0.35), 300, 0xFF000000); @@ -508,7 +508,7 @@ class FreeplayState extends MusicBeatState cantEarnText = new FlxText(settingsBG.x - 20, settingsBG.y - 30, "You Can\'t Save Your Score With These Options", 20); cantEarnText.setFormat("Comic Sans MS Bold", 17, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); - cantEarnText.antialiasing = true; + cantEarnText.antialiasing = FlxG.save.data.antialiasing; cantEarnText.scrollFactor.set(); cantEarnText.alpha = 0; cantEarnText.visible = false; @@ -517,7 +517,7 @@ class FreeplayState extends MusicBeatState oppOption = new FlxText(settingsBG.x, settingsBG.y, FlxG.save.data.oppM ? "Oppenent Mode: On (O)" : "Oppenent Mode: Off (O)", 20); oppOption.setFormat(Paths.font("comic.ttf"), 24, FlxColor.WHITE, RIGHT); - oppOption.antialiasing = true; + oppOption.antialiasing = FlxG.save.data.antialiasing; oppOption.scrollFactor.set(); oppOption.alpha = 0; add(oppOption); @@ -525,7 +525,7 @@ class FreeplayState extends MusicBeatState oppOption = new FlxText(settingsBG.x, settingsBG.y, FlxG.save.data.oppM ? "Oppenent Mode: On (O)" : "Oppenent Mode: Off (O)", 20); oppOption.setFormat(Paths.font("comic.ttf"), 24, FlxColor.WHITE, RIGHT); - oppOption.antialiasing = true; + oppOption.antialiasing = FlxG.save.data.antialiasing; oppOption.scrollFactor.set(); oppOption.alpha = 0; add(oppOption); @@ -533,7 +533,7 @@ class FreeplayState extends MusicBeatState randomOption = new FlxText(settingsBG.x, settingsBG.y + 30, FlxG.save.data.randomNotes ? "Randomize Notes: On (R)" : "Randomize Notes: Off (R)", 20); randomOption.setFormat(Paths.font("comic.ttf"), 24, FlxColor.WHITE, RIGHT); - randomOption.antialiasing = true; + randomOption.antialiasing = FlxG.save.data.antialiasing; randomOption.scrollFactor.set(); randomOption.alpha = 0; add(randomOption); @@ -541,7 +541,7 @@ class FreeplayState extends MusicBeatState keyOption = new FlxText(settingsBG.x, settingsBG.y + 70, "Keys Added: " + FlxG.save.data.maniabutyeah + " (U)", 20); keyOption.setFormat(Paths.font("comic.ttf"), 24, FlxColor.WHITE, RIGHT); - keyOption.antialiasing = true; + keyOption.antialiasing = FlxG.save.data.antialiasing; keyOption.scrollFactor.set(); keyOption.alpha = 0; add(keyOption); @@ -549,7 +549,7 @@ class FreeplayState extends MusicBeatState rNText = new FlxText(settingsBG.x, settingsBG.y + 110, "Randomly Place Note Types: " + rPNT[FlxG.save.data.randomNoteTypes] + " (I)", 20); rNText.setFormat(Paths.font("comic.ttf"), 16, FlxColor.WHITE, RIGHT); - rNText.antialiasing = true; + rNText.antialiasing = FlxG.save.data.antialiasing; rNText.scrollFactor.set(); rNText.alpha = 0; add(rNText); @@ -557,7 +557,7 @@ class FreeplayState extends MusicBeatState bothSidesText = new FlxText(settingsBG.x, settingsBG.y + 150, FlxG.save.data.bothSides ? "Both Sides: On (S)" : "Both Sides: Off (S)", 20); bothSidesText.setFormat(Paths.font("comic.ttf"), 24, FlxColor.WHITE, RIGHT); - bothSidesText.antialiasing = true; + bothSidesText.antialiasing = FlxG.save.data.antialiasing; bothSidesText.scrollFactor.set(); bothSidesText.alpha = 0; add(bothSidesText); @@ -565,7 +565,7 @@ class FreeplayState extends MusicBeatState pModeOption = new FlxText(settingsBG.x, settingsBG.y + 230, FlxG.save.data.practiceMode ? "Practice Mode: On (P)" : "Practice Mode: Off (P)", 5); pModeOption.setFormat(Paths.font("comic.ttf"), 24, FlxColor.WHITE, RIGHT); - pModeOption.antialiasing = true; + pModeOption.antialiasing = FlxG.save.data.antialiasing; pModeOption.scrollFactor.set(); pModeOption.alpha = 0; add(pModeOption); @@ -573,7 +573,7 @@ class FreeplayState extends MusicBeatState botplayOption = new FlxText(settingsBG.x, settingsBG.y + 260, FlxG.save.data.botplay ? "Botplay: On (B)" : "Botplay: Off (B)", 5); botplayOption.setFormat(Paths.font("comic.ttf"), 24, FlxColor.WHITE, RIGHT); - botplayOption.antialiasing = true; + botplayOption.antialiasing = FlxG.save.data.antialiasing; botplayOption.scrollFactor.set(); botplayOption.alpha = 0; add(botplayOption); @@ -584,7 +584,7 @@ class FreeplayState extends MusicBeatState characterSelectText = new FlxText(FlxG.width - 6, FlxG.height, 0, LanguageManager.getTextString("freeplay_skipChar"), 18); characterSelectText.setFormat("Comic Sans MS Bold", 18, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); characterSelectText.borderSize = 1.5; - characterSelectText.antialiasing = true; + characterSelectText.antialiasing = FlxG.save.data.antialiasing; characterSelectText.scrollFactor.set(); characterSelectText.alpha = 0; characterSelectText.x -= characterSelectText.textField.textWidth; diff --git a/source/HealthIcon.hx b/source/HealthIcon.hx index c57dca4..7b51b43 100644 --- a/source/HealthIcon.hx +++ b/source/HealthIcon.hx @@ -5,6 +5,7 @@ import flixel.FlxSprite; import flixel.math.FlxMath; import flixel.graphics.FlxGraphic; import openfl.display.BitmapData; +import flixel.FlxG; class HealthIcon extends FlxSprite @@ -75,7 +76,7 @@ class HealthIcon extends FlxSprite if (char != "none" && !blank) { - antialiasing = !noAaChars.contains(char); + antialiasing = !noAaChars.contains(char) ? FlxG.save.data.antialiasing : !noAaChars.contains(char); //trace('Graphic width before setting: ' + width); if (winningIcon) { //trace('winning :) added'); diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index 8acb8d3..96eadfa 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -193,7 +193,7 @@ class MainMenuState extends MusicBeatState bg.setGraphicSize(Std.int(bg.width * 1.1)); bg.updateHitbox(); bg.screenCenter(); - bg.antialiasing = true; + bg.antialiasing = FlxG.save.data.antialiasing; bg.color = 0xFFFDE871; add(bg); @@ -203,13 +203,13 @@ class MainMenuState extends MusicBeatState magenta.updateHitbox(); magenta.screenCenter(); magenta.visible = false; - magenta.antialiasing = true; + magenta.antialiasing = FlxG.save.data.antialiasing; magenta.color = 0xFFfd719b; add(magenta); } selectUi = new FlxSprite(0, 0).loadGraphic(Paths.image('mainMenu/Select_Thing', 'preload')); selectUi.scrollFactor.set(0, 0); - selectUi.antialiasing = true; + selectUi.antialiasing = FlxG.save.data.antialiasing; selectUi.updateHitbox(); add(selectUi); @@ -220,7 +220,7 @@ class MainMenuState extends MusicBeatState bigIcons.animation.addByPrefix(optionShit[i], optionShit[i] == 'freeplay' ? 'freeplay0' : optionShit[i], 24); } bigIcons.scrollFactor.set(0, 0); - bigIcons.antialiasing = true; + bigIcons.antialiasing = FlxG.save.data.antialiasing; bigIcons.updateHitbox(); bigIcons.animation.play(optionShit[0]); bigIcons.screenCenter(X); @@ -230,7 +230,7 @@ class MainMenuState extends MusicBeatState curOptText.setFormat("Comic Sans MS Bold", 48, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); curOptText.scrollFactor.set(0, 0); curOptText.borderSize = 2.5; - curOptText.antialiasing = true; + curOptText.antialiasing = FlxG.save.data.antialiasing; curOptText.screenCenter(X); curOptText.y = FlxG.height / 2 + 28; add(curOptText); @@ -239,7 +239,7 @@ class MainMenuState extends MusicBeatState curOptDesc.setFormat("Comic Sans MS Bold", 24, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); curOptDesc.scrollFactor.set(0, 0); curOptDesc.borderSize = 2; - curOptDesc.antialiasing = true; + curOptDesc.antialiasing = FlxG.save.data.antialiasing; curOptDesc.screenCenter(X); curOptDesc.y = FlxG.height - 58; add(curOptDesc); @@ -295,7 +295,7 @@ class MainMenuState extends MusicBeatState firstStart = false; var versionShit:FlxText = new FlxText(1, FlxG.height - 70, 0, 'Fanmade Dave Engine v${fanmadeEngineVer}\n${daRealEngineVer} Engine v${engineVer}\nExtra Keys Addon v2.0.2\n', 12); - versionShit.antialiasing = true; + versionShit.antialiasing = FlxG.save.data.antialiasing; versionShit.scrollFactor.set(); versionShit.setFormat("Comic Sans MS Bold", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); add(versionShit); @@ -303,7 +303,7 @@ class MainMenuState extends MusicBeatState var pressR:FlxText = new FlxText(225, 10, 0, LanguageManager.getTextString("main_resetdata"), 12); pressR.setFormat("Comic Sans MS Bold", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); pressR.x -= versionShit.textField.textWidth; - pressR.antialiasing = true; + pressR.antialiasing = FlxG.save.data.antialiasing; pressR.alpha = 0; pressR.scrollFactor.set(); add(pressR); @@ -628,7 +628,7 @@ class Prompt extends FlxSpriteGroup promptText.screenCenter(X); promptText.scrollFactor.set(0, 0); promptText.borderSize = 2.5; - promptText.antialiasing = true; + promptText.antialiasing = FlxG.save.data.antialiasing; add(promptText); noText = new FlxText(0, FlxG.height / 2 + 100, 0, "No", 16); @@ -637,7 +637,7 @@ class Prompt extends FlxSpriteGroup noText.setFormat("Comic Sans MS Bold", 40, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); noText.scrollFactor.set(0, 0); noText.borderSize = 1.5; - noText.antialiasing = true; + noText.antialiasing = FlxG.save.data.antialiasing; add(noText); yesText = new FlxText(0, FlxG.height / 2 + 100, 0, "Yes", 16); diff --git a/source/MenuItem.hx b/source/MenuItem.hx index 1669301..d45b3ce 100644 --- a/source/MenuItem.hx +++ b/source/MenuItem.hx @@ -33,7 +33,7 @@ class MenuItem extends FlxSpriteGroup } } add(week); - week.antialiasing = true; + week.antialiasing = FlxG.save.data.antialiasing; } private var isFlashing:Bool = false; diff --git a/source/ModSubState.hx b/source/ModSubState.hx index b45765e..e751196 100644 --- a/source/ModSubState.hx +++ b/source/ModSubState.hx @@ -59,7 +59,7 @@ menuItems.push(new ModOption('Exit')); bg = new FlxBackdrop(Paths.image('ui/checkeredBG', 'preload'), 1, 1, true, true, 1, 1); bg.alpha = 0; - bg.antialiasing = true; + bg.antialiasing = FlxG.save.data.antialiasing; bg.scrollFactor.set(); add(bg); diff --git a/source/MusicPlayerState.hx b/source/MusicPlayerState.hx index e02cab6..17033f6 100644 --- a/source/MusicPlayerState.hx +++ b/source/MusicPlayerState.hx @@ -172,7 +172,7 @@ class MusicPlayerState extends MusicBeatState barText.setFormat(Paths.font("comic.ttf"), 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); barText.scrollFactor.set(); barText.borderSize = 1.5; - barText.antialiasing = true; + barText.antialiasing = FlxG.save.data.antialiasing; barText.screenCenter(X); add(barText); diff --git a/source/Note.hx b/source/Note.hx index 4269793..861f5c8 100644 --- a/source/Note.hx +++ b/source/Note.hx @@ -257,7 +257,7 @@ class Note extends FlxSprite setGraphicSize(Std.int(width * noteSize)); updateHitbox(); - antialiasing = noteStyle != '3D'; + antialiasing = noteStyle != '3D' ? FlxG.save.data.antialiasing : noteStyle != '3D'; case 'shape': frames = Paths.getSparrowAtlas(notePathLol, 'shared'); @@ -336,7 +336,7 @@ class Note extends FlxSprite animation.addByPrefix('darkhold', 'dark hold piece'); setGraphicSize(Std.int(width * 1.2 * (noteSize / 0.7))); updateHitbox(); - antialiasing = true; + antialiasing = FlxG.save.data.antialiasing; // noteOffset = -(width - 78 + (mania == 4 ? 30 : 0)); case 'guitarHero': @@ -365,7 +365,7 @@ class Note extends FlxSprite setGraphicSize(Std.int(width * 0.7)); updateHitbox(); - antialiasing = true; + antialiasing = FlxG.save.data.antialiasing; case 'phone' | 'phone-alt': if (!isSustainNote) { @@ -410,7 +410,7 @@ class Note extends FlxSprite setGraphicSize(Std.int(width * noteSize)); updateHitbox(); - antialiasing = true; + antialiasing = FlxG.save.data.antialiasing; // noteOffset = 20; diff --git a/source/OutdatedSubState.hx b/source/OutdatedSubState.hx index dc8e2de..f8caba3 100644 --- a/source/OutdatedSubState.hx +++ b/source/OutdatedSubState.hx @@ -39,7 +39,7 @@ class OutdatedSubState extends MusicBeatState } txt.setFormat("Comic Sans MS Bold", 32, FlxColor.WHITE, CENTER); txt.screenCenter(); - txt.antialiasing = true; + txt.antialiasing = FlxG.save.data.antialiasing; add(txt); } diff --git a/source/PauseSubState.hx b/source/PauseSubState.hx index d0a2c07..55827a7 100644 --- a/source/PauseSubState.hx +++ b/source/PauseSubState.hx @@ -71,7 +71,7 @@ class PauseSubState extends MusicBeatSubstate bg = new FlxBackdrop(Paths.image('ui/checkeredBG', 'preload'), 1, 1, true, true, 1, 1); bg.alpha = 0; - bg.antialiasing = true; + bg.antialiasing = FlxG.save.data.antialiasing; bg.scrollFactor.set(); add(bg); @@ -79,7 +79,7 @@ class PauseSubState extends MusicBeatSubstate levelInfo.text += PlayState.SONG.song; levelInfo.scrollFactor.set(); levelInfo.setFormat(Paths.font("comic.ttf"), 32, FlxColor.WHITE, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); - levelInfo.antialiasing = true; + levelInfo.antialiasing = FlxG.save.data.antialiasing; levelInfo.borderSize = 2.5; levelInfo.updateHitbox(); add(levelInfo); @@ -88,7 +88,7 @@ class PauseSubState extends MusicBeatSubstate levelDifficulty.text += CoolUtil.difficultyString() + '\nBy ' + CreditsPopUp.songCreator + '\n' + PlayState.blueBalls + ' Blue Balls'; levelDifficulty.scrollFactor.set(); levelDifficulty.setFormat(Paths.font('comic.ttf'), 32, FlxColor.WHITE, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); - levelDifficulty.antialiasing = true; + levelDifficulty.antialiasing = FlxG.save.data.antialiasing; levelDifficulty.borderSize = 2.5; levelDifficulty.updateHitbox(); if (!PlayState.isGreetingsCutscene) @@ -321,7 +321,7 @@ class PauseSubState extends MusicBeatSubstate difficulty.text += levelDifficulty.text; difficulty.scrollFactor.set(); difficulty.setFormat(Paths.font('comic.ttf'), 32, FlxColor.WHITE, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); - difficulty.antialiasing = true; + difficulty.antialiasing = FlxG.save.data.antialiasing; difficulty.borderSize = 2; difficulty.updateHitbox(); funnyTexts.add(difficulty); diff --git a/source/PlayState.hx b/source/PlayState.hx index b6bd9ed..6c01680 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -1186,7 +1186,7 @@ class PlayState extends MusicBeatState legs.frames = Paths.getSparrowAtlas('characters/shaggy_god', 'shared'); legs.animation.addByPrefix('legs', "solo_legs", 30); legs.animation.play('legs'); - legs.antialiasing = true; + legs.antialiasing = FlxG.save.data.antialiasing; legs.flipX = true; legs.updateHitbox(); legs.offset.set(legs.frameWidth / 2, 10); @@ -1414,7 +1414,7 @@ class PlayState extends MusicBeatState var yPos = scrollType == 'downscroll' ? FlxG.height * 0.9 + 20 : strumLine.y - 20; songPosBG = new FlxSprite(0, yPos).loadGraphic(Paths.image('ui/timerBar')); - songPosBG.antialiasing = true; + songPosBG.antialiasing = FlxG.save.data.antialiasing; songPosBG.screenCenter(X); songPosBG.scrollFactor.set(); add(songPosBG); @@ -1431,7 +1431,7 @@ class PlayState extends MusicBeatState songName.scrollFactor.set(); songName.borderSize = 2.5 * fontScaler; - songName.antialiasing = true; + songName.antialiasing = FlxG.save.data.antialiasing; if (barType == 'ShowTime') { songName.alpha = 0; @@ -1521,7 +1521,7 @@ class PlayState extends MusicBeatState healthBarBG.y = 50; healthBarBG.screenCenter(X); healthBarBG.scrollFactor.set(); - healthBarBG.antialiasing = true; + healthBarBG.antialiasing = FlxG.save.data.antialiasing; add(healthBarBG); healthBar = new FlxBar(healthBarBG.x + 4, healthBarBG.y + 4, inFiveNights || oppM ? LEFT_TO_RIGHT : RIGHT_TO_LEFT, Std.int(healthBarBG.width - 8), Std.int(healthBarBG.height - 8), this, @@ -1597,7 +1597,7 @@ class PlayState extends MusicBeatState kadeEngineWatermark.setFormat(font, 16 * fontScaler, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); kadeEngineWatermark.scrollFactor.set(); kadeEngineWatermark.borderSize = 1.25 * fontScaler; - kadeEngineWatermark.antialiasing = true; + kadeEngineWatermark.antialiasing = FlxG.save.data.antialiasing; add(kadeEngineWatermark); kadeEngineWatermark2 = new FlxText(4, textYPos + -20, 0, funkyText2, 16); @@ -1605,7 +1605,7 @@ class PlayState extends MusicBeatState kadeEngineWatermark2.setFormat(font, 16 * fontScaler, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); kadeEngineWatermark2.scrollFactor.set(); kadeEngineWatermark2.borderSize = 1.25 * fontScaler; - kadeEngineWatermark2.antialiasing = true; + kadeEngineWatermark2.antialiasing = FlxG.save.data.antialiasing; add(kadeEngineWatermark2); } if (creditsText) @@ -1614,7 +1614,7 @@ class PlayState extends MusicBeatState creditsWatermark.setFormat(font, 16 * fontScaler, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); creditsWatermark.scrollFactor.set(); creditsWatermark.borderSize = 1.25 * fontScaler; - creditsWatermark.antialiasing = true; + creditsWatermark.antialiasing = FlxG.save.data.antialiasing; add(creditsWatermark); creditsWatermark.cameras = [camHUD]; } @@ -1686,7 +1686,7 @@ class PlayState extends MusicBeatState scoreTxt.setFormat((SONG.song.toLowerCase() == "overdrive") ? Paths.font("ariblk.ttf") : font, 20 * fontScaler, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); scoreTxt.scrollFactor.set(); scoreTxt.borderSize = 1.5 * fontScaler; - scoreTxt.antialiasing = true; + scoreTxt.antialiasing = FlxG.save.data.antialiasing; scoreTxt.screenCenter(X); add(scoreTxt); @@ -2242,7 +2242,7 @@ class PlayState extends MusicBeatState add(freeplayBG); charBackdrop = new FlxBackdrop(Paths.image('recursed/daveScroll'), 1, 1, true, true); - charBackdrop.antialiasing = true; + charBackdrop.antialiasing = FlxG.save.data.antialiasing; charBackdrop.scale.set(2, 2); charBackdrop.screenCenter(); charBackdrop.color = FlxColor.multiply(charBackdrop.color, FlxColor.fromRGB(44, 44, 44)); @@ -2713,7 +2713,7 @@ class PlayState extends MusicBeatState var ready:FlxSprite = new FlxSprite().loadGraphic(Paths.image(introAlts[0])); ready.scrollFactor.set(); ready.updateHitbox(); - ready.antialiasing = true; + ready.antialiasing = FlxG.save.data.antialiasing; ready.screenCenter(); add(ready); @@ -2736,7 +2736,7 @@ class PlayState extends MusicBeatState set.screenCenter(); - set.antialiasing = true; + set.antialiasing = FlxG.save.data.antialiasing; add(set); FlxTween.tween(set, {y: set.y += 100, alpha: 0}, Conductor.crochet / 1000, { ease: FlxEase.cubeInOut, @@ -2759,7 +2759,7 @@ class PlayState extends MusicBeatState go.screenCenter(); - go.antialiasing = true; + go.antialiasing = FlxG.save.data.antialiasing; add(go); var sex:Float = 1000; @@ -5573,7 +5573,7 @@ class PlayState extends MusicBeatState var marcello:FlxSprite = new FlxSprite(dad.x - 170, dad.y); marcello.flipX = true; add(marcello); - marcello.antialiasing = true; + marcello.antialiasing = FlxG.save.data.antialiasing; marcello.color = 0xFF878787; dad.visible = false; boyfriend.stunned = true; @@ -5647,7 +5647,7 @@ class PlayState extends MusicBeatState var marcello:FlxSprite = new FlxSprite(dad.x, dad.y); marcello.flipX = true; add(marcello); - marcello.antialiasing = true; + marcello.antialiasing = FlxG.save.data.antialiasing; marcello.color = getBackgroundColor(curStage); dad.visible = false; boyfriend.stunned = true; @@ -5834,9 +5834,9 @@ class PlayState extends MusicBeatState } rating.setGraphicSize(Std.int(rating.width * 0.7)); - rating.antialiasing = true; + rating.antialiasing = FlxG.save.data.antialiasing; comboSpr.setGraphicSize(Std.int(comboSpr.width * 0.7)); - comboSpr.antialiasing = true; + comboSpr.antialiasing = FlxG.save.data.antialiasing; comboSpr.updateHitbox(); rating.updateHitbox(); @@ -5862,7 +5862,7 @@ class PlayState extends MusicBeatState numScore.x = coolText.x + (43 * daLoop) - 90; numScore.y += 80; - numScore.antialiasing = true; + numScore.antialiasing = FlxG.save.data.antialiasing; numScore.setGraphicSize(Std.int(numScore.width * 0.5)); numScore.updateHitbox(); @@ -7259,7 +7259,7 @@ if (oppM) { notesLeftText.setFormat("Comic Sans MS Bold", 30, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); notesLeftText.scrollFactor.set(); notesLeftText.borderSize = 2.5; - notesLeftText.antialiasing = true; + notesLeftText.antialiasing = FlxG.save.data.antialiasing; notesLeftText.cameras = [camHUD]; add(notesLeftText); recursedUI.add(notesLeftText); @@ -7276,7 +7276,7 @@ if (oppM) { timeLeftText.setFormat("Comic Sans MS Bold", 30, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); timeLeftText.scrollFactor.set(); timeLeftText.borderSize = 2.5; - timeLeftText.antialiasing = true; + timeLeftText.antialiasing = FlxG.save.data.antialiasing; timeLeftText.cameras = [camHUD]; add(timeLeftText); recursedUI.add(timeLeftText); @@ -8302,12 +8302,12 @@ if (oppM) { creditsPopup.changeText('', 'none', false); case 20: - creditsPopup.switchHeading({path: 'songHeadings/expungedHeading', antiAliasing: true, + creditsPopup.switchHeading({path: 'songHeadings/expungedHeading', antiAliasing: FlxG.save.data.antialiasing, animation: new Animation('expunged', 'Expunged', 24, true, [false, false]), iconOffset: 0}); creditsPopup.changeText('Song by Oxygen', 'Oxygen'); case 14, 24: - creditsPopup.switchHeading({path: 'songHeadings/expungedHeading', antiAliasing: true, + creditsPopup.switchHeading({path: 'songHeadings/expungedHeading', antiAliasing: FlxG.save.data.antialiasing, animation: new Animation('expunged', 'Expunged', 24, true, [false, false]), iconOffset: 0}); creditsPopup.changeText('Song by EXPUNGED', 'whoAreYou'); diff --git a/source/ResultsScreen.hx b/source/ResultsScreen.hx index 6600fed..e5781ed 100644 --- a/source/ResultsScreen.hx +++ b/source/ResultsScreen.hx @@ -59,12 +59,12 @@ class ResultsScreen extends FlxState bg.setGraphicSize(Std.int(bg.width * 1.1)); bg.updateHitbox(); bg.screenCenter(); - bg.antialiasing = true; + bg.antialiasing = FlxG.save.data.antialiasing; bg.color = 0xFF7F7F7F; add(bg); info = new FlxText(FlxG.width - 1850, FlxG.height - 420, 0, !PlayState.isStoryMode ? 'Total Notes Hit: ${PlayState.rstotalNotesHit}\nMax Combo: ${PlayState.rscombo}\nScore: ${PlayState.rssongScore}\nMisses: ${PlayState.rsmisses}\nAccuracy: ${PlayState.rsaccuracy}%\nSicks: ${PlayState.rssicks}\nGoods: ${PlayState.rsgoods}\nBads: ${PlayState.rsbads}\nShits: ${PlayState.rsshits}' : 'Total Notes Hit: ${PlayState.rstotalNotesHit}\nMax Combo: ${PlayState.rscombo}\nScore: ${PlayState.rssongScore}\nMisses: ${PlayState.rsmisses}\nBest Accuracy: ${PlayState.rsaccuracy}%\nSicks: ${PlayState.rssicks}\nGoods: ${PlayState.rsgoods}\nBads: ${PlayState.rsbads}\nShits: ${PlayState.rsshits}', 12); - info.antialiasing = true; + info.antialiasing = FlxG.save.data.antialiasing; info.scrollFactor.set(); info.setFormat("Comic Sans MS Bold", 30, FlxColor.BLACK, LEFT); info.alpha = 1; @@ -80,14 +80,14 @@ class ResultsScreen extends FlxState } info2 = new FlxText(FlxG.width - 1850, FlxG.height - 630, 0, '${score}% - ${PlayState.rssong} ${credit}', 12); - info2.antialiasing = true; + info2.antialiasing = FlxG.save.data.antialiasing; info2.scrollFactor.set(); info2.setFormat("Comic Sans MS Bold", 25, FlxColor.BLACK, LEFT); info2.alpha = 1; add(info2); notesTxt = new FlxText(0, 0, 0, score + '%', 12); - notesTxt.antialiasing = true; + notesTxt.antialiasing = FlxG.save.data.antialiasing; notesTxt.scrollFactor.set(); notesTxt.setFormat("Comic Sans MS Bold", 200, FlxColor.BLACK, CENTER); notesTxt.screenCenter(); diff --git a/source/SaveDataHandler.hx b/source/SaveDataHandler.hx index 7f1a140..e590d89 100644 --- a/source/SaveDataHandler.hx +++ b/source/SaveDataHandler.hx @@ -153,5 +153,8 @@ class SaveDataHandler if (FlxG.save.data.discord == null) FlxG.save.data.discord = false; + + if (FlxG.save.data.antialiasing == null) + FlxG.save.data.antialiasing = true; } } \ No newline at end of file diff --git a/source/StoryMenuState.hx b/source/StoryMenuState.hx index 720b2b1..40bcc8b 100644 --- a/source/StoryMenuState.hx +++ b/source/StoryMenuState.hx @@ -120,17 +120,17 @@ class StoryMenuState extends MusicBeatState scoreText = new FlxText(10, 0, 0, "SCORE: 49324858", 36); scoreText.setFormat("Comic Sans MS Bold", 32); - scoreText.antialiasing = true; + scoreText.antialiasing = FlxG.save.data.antialiasing; txtWeekTitle = new FlxText(FlxG.width * 0.7, 0, 0, "", 32); txtWeekTitle.setFormat("Comic Sans MS Bold", 32, FlxColor.WHITE, RIGHT); - txtWeekTitle.antialiasing = true; + txtWeekTitle.antialiasing = FlxG.save.data.antialiasing; txtWeekTitle.alpha = 0.7; var rankText:FlxText = new FlxText(0, 10); rankText.text = 'RANK: GREAT'; rankText.setFormat(Paths.font("comic.ttf"), 32); - rankText.antialiasing = true; + rankText.antialiasing = FlxG.save.data.antialiasing; rankText.size = scoreText.size; rankText.screenCenter(X); @@ -151,7 +151,7 @@ class StoryMenuState extends MusicBeatState var weekThing:MenuItem = new MenuItem(0, yellowBG.y + yellowBG.height + 80, i); weekThing.x += ((weekThing.width + 20) * i); weekThing.targetX = i; - weekThing.antialiasing = true; + weekThing.antialiasing = FlxG.save.data.antialiasing; grpWeekText.add(weekThing); } @@ -161,14 +161,14 @@ class StoryMenuState extends MusicBeatState txtTrackdeco.alignment = CENTER; txtTrackdeco.font = rankText.font; txtTrackdeco.color = 0xFFe55777; - txtTrackdeco.antialiasing = true; + txtTrackdeco.antialiasing = FlxG.save.data.antialiasing; txtTrackdeco.screenCenter(X); txtTracklist = new FlxText(0, yellowBG.x + yellowBG.height + 80, FlxG.width, '', 28); txtTracklist.alignment = CENTER; txtTracklist.font = rankText.font; txtTracklist.color = 0xFFe55777; - txtTracklist.antialiasing = true; + txtTracklist.antialiasing = FlxG.save.data.antialiasing; txtTracklist.screenCenter(X); add(txtTrackdeco); add(txtTracklist); diff --git a/source/StrumNote.hx b/source/StrumNote.hx index ef48fb0..257935e 100644 --- a/source/StrumNote.hx +++ b/source/StrumNote.hx @@ -107,7 +107,7 @@ class StrumNote extends FlxSprite } playAnim('static'); - antialiasing = type != '3D'; + antialiasing = type != '3D' ? FlxG.save.data.antialiasing : type != '3D'; setGraphicSize(Std.int(width * (type == 'gh' ? 0.7 : Note.noteSize))); updateHitbox(); diff --git a/source/Subtitle.hx b/source/Subtitle.hx index a79f6c7..5720b0d 100644 --- a/source/Subtitle.hx +++ b/source/Subtitle.hx @@ -28,7 +28,7 @@ class Subtitle extends FlxTypeText sounds = null; setFormat("Comic Sans MS Bold", properties.subtitleSize, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); - antialiasing = true; + antialiasing = FlxG.save.data.antialiasing; borderSize = 2; screenCenter(properties.screenCenter); diff --git a/source/TitleState.hx b/source/TitleState.hx index 3d14005..708ddaf 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -177,7 +177,7 @@ class TitleState extends MusicBeatState versionShit = new FlxText(1, FlxG.height - 70, 0, 'Press M to Open the Mod Menu\nPress W to go to the wiki\nPress S to turn on or off Shaders: ' + shaderThing, 20); - versionShit.antialiasing = true; + versionShit.antialiasing = FlxG.save.data.antialiasing; versionShit.scrollFactor.set(); versionShit.setFormat("Comic Sans MS Bold", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); add(versionShit); @@ -194,7 +194,7 @@ class TitleState extends MusicBeatState FlxG.save.data.modchart = false; FlxG.save.data.botplay = false; } - logoBl.antialiasing = true; + logoBl.antialiasing = FlxG.save.data.antialiasing; logoBl.animation.addByPrefix('bump', 'logo bumpin', 24); logoBl.setGraphicSize(Std.int(logoBl.width * 1.2)); logoBl.animation.play('bump'); @@ -229,7 +229,7 @@ class TitleState extends MusicBeatState gfDance.frames = Paths.getSparrowAtlas('ui/gfDanceTitle'); gfDance.animation.addByIndices('danceLeft', 'gfDance', [30, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "", 24, false); gfDance.animation.addByIndices('danceRight', 'gfDance', [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29], "", 24, false); - gfDance.antialiasing = true; + gfDance.antialiasing = FlxG.save.data.antialiasing; add(gfDance); } add(logoBl); @@ -239,7 +239,7 @@ class TitleState extends MusicBeatState titleText.animation.addByPrefix('idle', "Press Enter to Begin", 24); titleText.animation.addByPrefix('press', "ENTER PRESSED", 18, false); titleText.screenCenter(X); - titleText.antialiasing = true; + titleText.antialiasing = FlxG.save.data.antialiasing; titleText.animation.play('idle'); titleText.updateHitbox(); add(titleText); @@ -252,7 +252,7 @@ class TitleState extends MusicBeatState credGroup.add(blackScreen); credTextShit = new Alphabet(0, 0, "MoldyGH\nMissingTextureMan101\nRapparep\nZmac\nTheBuilder\nT5mpler\nErizur", true); - credTextShit.antialiasing = true; + credTextShit.antialiasing = FlxG.save.data.antialiasing; credTextShit.screenCenter(); // credTextShit.alignment = CENTER; @@ -464,7 +464,7 @@ class TitleState extends MusicBeatState { var money:FlxText = new FlxText(0, 0, FlxG.width, textArray[i], 48); money.setFormat("Comic Sans MS Bold", 48, FlxColor.WHITE, CENTER); - money.antialiasing = true; + money.antialiasing = FlxG.save.data.antialiasing; money.screenCenter(X); money.y += (i * 60) + 200; credGroup.add(money); @@ -477,7 +477,7 @@ class TitleState extends MusicBeatState var coolText:FlxText = new FlxText(0, 0, FlxG.width, text, 48); coolText.setFormat("Comic Sans MS Bold", 48, FlxColor.WHITE, CENTER); coolText.screenCenter(X); - coolText.antialiasing = true; + coolText.antialiasing = FlxG.save.data.antialiasing; coolText.y += (textGroup.length * 60) + 200; credGroup.add(coolText); textGroup.add(coolText); diff --git a/source/options/AdminOptionsMenu.hx b/source/options/AdminOptionsMenu.hx index cbda570..ec49eb7 100644 --- a/source/options/AdminOptionsMenu.hx +++ b/source/options/AdminOptionsMenu.hx @@ -40,7 +40,7 @@ class AdminOptionsMenu extends MusicBeatState menuBG.color = 0xff373737; menuBG.setGraphicSize(Std.int(menuBG.width * 1.1)); menuBG.updateHitbox(); - menuBG.antialiasing = true; + menuBG.antialiasing = FlxG.save.data.antialiasing; menuBG.loadGraphic(MainMenuState.randomizeBG()); add(menuBG); diff --git a/source/options/GamePlay.hx b/source/options/GamePlay.hx index 9502403..223a5ad 100644 --- a/source/options/GamePlay.hx +++ b/source/options/GamePlay.hx @@ -44,7 +44,7 @@ class GamePlay extends MusicBeatState menuBG.color = 0xFFea71fd; menuBG.setGraphicSize(Std.int(menuBG.width * 1.1)); menuBG.updateHitbox(); - menuBG.antialiasing = true; + menuBG.antialiasing = FlxG.save.data.antialiasing; menuBG.loadGraphic(MainMenuState.randomizeBG()); add(menuBG); diff --git a/source/options/Optimization.hx b/source/options/Optimization.hx index be5d062..a507f61 100644 --- a/source/options/Optimization.hx +++ b/source/options/Optimization.hx @@ -44,7 +44,7 @@ class Optimization extends MusicBeatState menuBG.color = 0xFFea71fd; menuBG.setGraphicSize(Std.int(menuBG.width * 1.1)); menuBG.updateHitbox(); - menuBG.antialiasing = true; + menuBG.antialiasing = FlxG.save.data.antialiasing; menuBG.loadGraphic(MainMenuState.randomizeBG()); add(menuBG); @@ -56,6 +56,7 @@ class Optimization extends MusicBeatState + "\n" + (FlxG.save.data.ratingsPopUp ? "Show Rating Pop Up ON" : "Show Rating Pop Up OFF") + "\n" + (FlxG.save.data.stage ? "Stage ON" : "Stage OFF") + "\n" + (FlxG.save.data.chars ? "Characters ON" : "Characters OFF") + + "\n" + (FlxG.save.data.antialiasing ? "Antialiasing ON" : "Antialiasing OFF") ); grpControls = new FlxTypedGroup(); @@ -116,6 +117,9 @@ class Optimization extends MusicBeatState case 6: FlxG.save.data.chars = !FlxG.save.data.chars; updateGroupControls(FlxG.save.data.chars ? 'Characters ON' : 'Characters OFF', 12, 'Vertical'); + case 7: + FlxG.save.data.antialiasing = !FlxG.save.data.antialiasing; + updateGroupControls(FlxG.save.data.antialiasing ? 'Antialiasing ON' : 'Antialiasing OFF', 12, 'Vertical'); } } } diff --git a/source/options/OptionsMenu.hx b/source/options/OptionsMenu.hx index 088f26d..ca48ce4 100644 --- a/source/options/OptionsMenu.hx +++ b/source/options/OptionsMenu.hx @@ -71,7 +71,7 @@ class OptionsMenu extends MusicBeatState menuBG.color = 0xFFea71fd; menuBG.setGraphicSize(Std.int(menuBG.width * 1.1)); menuBG.updateHitbox(); - menuBG.antialiasing = true; + menuBG.antialiasing = FlxG.save.data.antialiasing; menuBG.loadGraphic(MainMenuState.randomizeBG()); add(menuBG); } diff --git a/source/options/Visuals.hx b/source/options/Visuals.hx index 247ed79..1fb4474 100644 --- a/source/options/Visuals.hx +++ b/source/options/Visuals.hx @@ -52,7 +52,7 @@ class Visuals extends MusicBeatState menuBG.color = 0xFFea71fd; menuBG.setGraphicSize(Std.int(menuBG.width * 1.1)); menuBG.updateHitbox(); - menuBG.antialiasing = true; + menuBG.antialiasing = FlxG.save.data.antialiasing; menuBG.loadGraphic(MainMenuState.randomizeBG()); add(menuBG); curSongBarOptionSelected = songBarOptions.indexOf(FlxG.save.data.songBarOption);