From 8340c45a952b339b64d2b94fea27e4f5ddd11180 Mon Sep 17 00:00:00 2001 From: KadeDev Date: Sat, 10 Apr 2021 21:15:14 -0700 Subject: [PATCH 1/3] cuck --- source/Main.hx | 2 ++ source/Options.hx | 21 +++++++++++++++++++++ source/PlayState.hx | 2 +- source/TitleState.hx | 13 +++++++++++-- 4 files changed, 35 insertions(+), 3 deletions(-) diff --git a/source/Main.hx b/source/Main.hx index 9ad6652..97d4320 100644 --- a/source/Main.hx +++ b/source/Main.hx @@ -23,6 +23,8 @@ class Main extends Sprite var skipSplash:Bool = true; // Whether to skip the flixel splash screen that appears in release mode. var startFullscreen:Bool = false; // Whether to start the game in fullscreen on desktop targets + public static var watermarks = true; // Whether to put Kade Engine liteartly anywhere + // You can pretty much ignore everything from here on - your code should go in your states. public static function main():Void diff --git a/source/Options.hx b/source/Options.hx index 0ce8df0..b09ff7b 100644 --- a/source/Options.hx +++ b/source/Options.hx @@ -438,6 +438,27 @@ class CustomizeGameplay extends Option } } +class WatermarkOption extends Option +{ + public function new(desc:String) + { + super(); + description = desc; + } + + public override function press():Bool + { + Main.watermarks = !Main.watermarks; + display = updateDisplay(); + return false; + } + + private override function updateDisplay():String + { + return "Watermarks " + (Main.watermarks ? "on" : "off"); + } +} + class OffsetMenu extends Option { public function new(desc:String) diff --git a/source/PlayState.hx b/source/PlayState.hx index 7bd4879..baf899b 100644 --- a/source/PlayState.hx +++ b/source/PlayState.hx @@ -820,7 +820,7 @@ class PlayState extends MusicBeatState add(healthBar); // Add Kade Engine watermark - var kadeEngineWatermark = new FlxText(4,healthBarBG.y + 50,0,SONG.song + " " + (storyDifficulty == 2 ? "Hard" : storyDifficulty == 1 ? "Normal" : "Easy") + " - KE " + MainMenuState.kadeEngineVer + " - " + (FlxG.save.data.etternaMode ? "E.Mode" : "FNF"), 16); + var kadeEngineWatermark = new FlxText(4,healthBarBG.y + 50,0,SONG.song + " " + (storyDifficulty == 2 ? "Hard" : storyDifficulty == 1 ? "Normal" : "Easy") + (Main.watermarks ? " - KE " + MainMenuState.kadeEngineVer : ""), 16); kadeEngineWatermark.setFormat(Paths.font("vcr.ttf"), 16, FlxColor.WHITE, RIGHT, FlxTextBorderStyle.OUTLINE,FlxColor.BLACK); kadeEngineWatermark.scrollFactor.set(); add(kadeEngineWatermark); diff --git a/source/TitleState.hx b/source/TitleState.hx index e38e58e..def04db 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -398,9 +398,18 @@ class TitleState extends MusicBeatState // credTextShit.text = 'In association \nwith'; // credTextShit.screenCenter(); case 5: - createCoolText(['Kade Engine', 'by']); + if (Main.watermarks) + createCoolText(['Kade Engine', 'by']); + else + createCoolText(['In Partnership', 'with']); case 7: - addMoreText('KadeDeveloper'); + if (Main.watermarks) + addMoreText('KadeDeveloper'); + else + { + addMoreText('Newgrounds'); + ngSpr.visible = true; + } // credTextShit.text += '\nNewgrounds'; case 8: deleteCoolText(); From 7f64d2b2f7be764ef851e93b23271639eb359933 Mon Sep 17 00:00:00 2001 From: KadeDev Date: Sat, 10 Apr 2021 21:21:01 -0700 Subject: [PATCH 2/3] dababy: less gooo --- source/KadeEngineData.hx | 5 +++++ source/Options.hx | 3 ++- source/OptionsMenu.hx | 11 +++++++---- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/source/KadeEngineData.hx b/source/KadeEngineData.hx index c29c866..71728c6 100644 --- a/source/KadeEngineData.hx +++ b/source/KadeEngineData.hx @@ -57,8 +57,13 @@ class KadeEngineData if (FlxG.save.data.accuracyMod == null) FlxG.save.data.accuracyMod = 1; + if (FlxG.save.data.watermark == null) + FlxG.save.data.watermark = true; + Conductor.recalculateTimings(); + Main.watermarks = FlxG.save.data.watermark; + (cast (Lib.current.getChildAt(0), Main)).setFPSCap(FlxG.save.data.fpsCap); } } diff --git a/source/Options.hx b/source/Options.hx index b09ff7b..9483d39 100644 --- a/source/Options.hx +++ b/source/Options.hx @@ -449,8 +449,9 @@ class WatermarkOption extends Option public override function press():Bool { Main.watermarks = !Main.watermarks; + FlxG.save.data.watermark = Main.watermarks; display = updateDisplay(); - return false; + return true; } private override function updateDisplay():String diff --git a/source/OptionsMenu.hx b/source/OptionsMenu.hx index 59f9365..c0e71c7 100644 --- a/source/OptionsMenu.hx +++ b/source/OptionsMenu.hx @@ -40,13 +40,16 @@ class OptionsMenu extends MusicBeatState new AccuracyOption("Display accuracy information."), new NPSDisplayOption("Shows your current Notes Per Second.") ]), - #if desktop + new OptionCatagory("Misc", [ - + #if desktop new FPSOption("Toggle the FPS Counter"), - new ReplayOption("View replays") + new ReplayOption("View replays"), + #end + new WatermarkOption("Turn off all watermarks from the engine.") + ]) - #end + ]; private var currentDescription:String = ""; From 791a3c416b5ce82611a1019bba54a7670c1f341f Mon Sep 17 00:00:00 2001 From: KadeDev Date: Sat, 10 Apr 2021 21:37:00 -0700 Subject: [PATCH 3/3] W --- source/MainMenuState.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/MainMenuState.hx b/source/MainMenuState.hx index c6c5be0..55375d3 100644 --- a/source/MainMenuState.hx +++ b/source/MainMenuState.hx @@ -103,7 +103,7 @@ class MainMenuState extends MusicBeatState FlxG.camera.follow(camFollow, null, 0.60 * (60 / FlxG.save.data.fpsCap)); - var versionShit:FlxText = new FlxText(5, FlxG.height - 18, 0, gameVer + " FNF - " + kadeEngineVer + " Kade Engine", 12); + var versionShit:FlxText = new FlxText(5, FlxG.height - 18, 0, gameVer + (Main.watermarks ? " FNF - " + kadeEngineVer + " Kade Engine" : ""), 12); versionShit.scrollFactor.set(); versionShit.setFormat("VCR OSD Mono", 16, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK); add(versionShit);