From a5f72136b27ed6f9fa827c49da7e5e2e9bede67a Mon Sep 17 00:00:00 2001 From: awesomeangotti Date: Fri, 26 Jun 2026 02:42:41 +0000 Subject: [PATCH] UI: Add random splashes to loading screen (#128) This PR introduces splash text messages that change per startup on the loading screen after selecting a game. It also moves the "RYUBING" logo splash in logs to be inside its own class, which also handles loading screen splashes and titlebar splashes. Credits to VewDev, Lotp, Sh0inx, yell0wsuit, and Greemdev for pointers and assistance throughout this PR. Co-authored-by: Awesomeangotti Co-authored-by: Awesomeangotti <143439211+Awesomeangotti@users.noreply.github.com> Reviewed-on: https://git.ryujinx.app/projects/Ryubing/pulls/128 --- src/Ryujinx/Assets/Splashes.json | 98 +++++++++++++++++++ src/Ryujinx/Common/SplashTextHelper.cs | 64 ++++++++++++ src/Ryujinx/Program.cs | 10 +- src/Ryujinx/Ryujinx.csproj | 1 + .../UI/ViewModels/MainWindowViewModel.cs | 3 + src/Ryujinx/UI/Windows/MainWindow.axaml | 12 ++- 6 files changed, 180 insertions(+), 8 deletions(-) create mode 100644 src/Ryujinx/Assets/Splashes.json create mode 100644 src/Ryujinx/Common/SplashTextHelper.cs diff --git a/src/Ryujinx/Assets/Splashes.json b/src/Ryujinx/Assets/Splashes.json new file mode 100644 index 000000000..0f81f15af --- /dev/null +++ b/src/Ryujinx/Assets/Splashes.json @@ -0,0 +1,98 @@ +{ + "Locales": { + "ar_SA": [], + "de_DE": [], + "el_GR": [], + "en_US": [ + "Ryubing is my middle name.", + "Giving it 110 percent!", + "I don't think therefore I don't am!", + "All hail Egg.", + "Insert cringy joke here.", + "ITS RYUBINGING TIME!", + "I hate Mondays...", + "Fantastical!", + "Now with 100% more humor!", + "'Not S&P approved' has been approved by S&P.", + "ARE YOU NOT ENTERTAINED?", + "It's an emulator!", + "Now the real game begins...", + "Cooked fresh since 2018!", + "Must've been the wind...", + "I used to be an adventurer like you before I took an arrow to the knee.", + "Ryubing!", + "May contain nuts!", + "May include occasional pop culture references!", + "100% organically grown!", + "Have a nice day : )", + "Spoats car!", + "Bottom text", + "Im sorry Dave. I'm afraid I can't do that.", + "That's no moon...", + "Sir, finishing this fight.", + "I see how it is...", + "Space! The final frontier!", + "If you could not tell already, I love making bad jokes : )", + "this.", + "Probably contains no baked beans.", + "Y'all ready for this?", + "Removed Herobrine.", + "Right to repair!", + "Programmed in C#!", + "Forgejo has dethroned Gitlab!", + "Any ideas what to put here?", + "Good morning!", + "Good afternoon!", + "Good evening!", + "I hope you are having a great day!", + "Please insert disc two!", + "I... AM RYUBING!", + "Ryubingin' it up", + "bing bing wahoo.", + "egg", + "No, lossless scaling is NOT supported.", + "How do you people do anything?", + "One dollar.", + "Somebody once told me!", + "Its that time of the year again!", + "Brewed from only the finest memes.", + "Async shader compilation would destroy my soul : (", + "Trans rights are human rights!", + ":3", + "Patched ':3' splash replication glitch.", + "Please connect a controller!", + "Never gonna give you up!", + "The game was rigged from the start.", + "Ganon is watching you!", + "Now with 100% more JSON in the splash code!", + "Countless hours of fun!", + "Sorry, Link. I can't give credit. Come back when you're a little... mmmmmm... richer!", + "Do a barrel roll!", + "You've met with a terrible fate, haven't you?", + "Yahaha! You found me!", + "I would've been in real trouble if you hadn't shown up when you did, goro.", + "Stay fresh!", + "Yellow, black. Yellow, black. Yellow, black. Yellow, black. Ooh, black and yellow! Let's shake it up a little.", + "Whaaa? You came to see me again? That makes Beedle SO HAPPY!", + "Don't get cooked, stay off the hook!", + "Now with 100% more good vibes in the splash code!", + "It is Wednesday my dudes!" + ], + "es_ES": [], + "fr_FR": [], + "he_IL": [], + "it_IT": [], + "ja_JP": [], + "ko_KR": [], + "no_NO": [], + "pl_PL": [], + "pt_BR": [], + "ru_RU": [], + "sv_SE": [], + "th_TH": [], + "tr_TR": [], + "uk_UA": [], + "zh_CN": [], + "zh_TW": [] + } +} diff --git a/src/Ryujinx/Common/SplashTextHelper.cs b/src/Ryujinx/Common/SplashTextHelper.cs new file mode 100644 index 000000000..9889a225d --- /dev/null +++ b/src/Ryujinx/Common/SplashTextHelper.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using Ryujinx.Common.Logging; +using Gommon; +using Ryujinx.Ava.Systems.Configuration; +using System; +using System.Text.Json; + +namespace Ryujinx.Common +{ + public class SplashTextHelper + { + public static void PrintSplash() + { + Logger.Notice.Print(LogClass.Application, " ___ __ _ "); + Logger.Notice.Print(LogClass.Application, @" / _ \ __ __ __ __ / / (_) ___ ___ _"); + Logger.Notice.Print(LogClass.Application, @" / , _/ / // // // / / _ \ / / / _ \ / _ `/"); + Logger.Notice.Print(LogClass.Application, @"/_/|_| \_, / \_,_/ /_.__//_/ /_//_/ \_, / "); + Logger.Notice.Print(LogClass.Application, " /___/ /___/ "); + Logger.Notice.Print(LogClass.Application, ""); + Logger.Notice.Print(LogClass.Application, GetSplash()); + Logger.Notice.Print(LogClass.Application, ""); + } + + private static string s_finalSplash = ""; + + public static string GetSplash() + { + if (string.IsNullOrEmpty(s_finalSplash)) + { + s_finalSplash = GetLangJson(); + if (string.IsNullOrEmpty(s_finalSplash)) + { + s_finalSplash = "Splash Text"; + } + } + + return $"{s_finalSplash}"; + } + + private static SplashLocales s_splashJson; + + private static string GetLangJson() + { + try + { + string data; + data = EmbeddedResources.ReadAllText("Ryujinx/Assets/Splashes.json"); + s_splashJson = JsonSerializer.Deserialize(data); + return s_splashJson.Locales[ConfigurationState.Instance.UI.LanguageCode.Value].GetRandomElement(); + } + catch + { + return ""; + } + } + + private struct SplashLocales + { + public Dictionary> Locales { get; set; } + } + + } + +} diff --git a/src/Ryujinx/Program.cs b/src/Ryujinx/Program.cs index 35abab811..5011cd664 100644 --- a/src/Ryujinx/Program.cs +++ b/src/Ryujinx/Program.cs @@ -437,13 +437,9 @@ namespace Ryujinx.Ava internal static void PrintSystemInfo() { - Logger.Notice.Print(LogClass.Application, " ___ __ _ "); - Logger.Notice.Print(LogClass.Application, @" / _ \ __ __ __ __ / / (_) ___ ___ _"); - Logger.Notice.Print(LogClass.Application, @" / , _/ / // // // / / _ \ / / / _ \ / _ `/"); - Logger.Notice.Print(LogClass.Application, @"/_/|_| \_, / \_,_/ /_.__//_/ /_//_/ \_, / "); - Logger.Notice.Print(LogClass.Application, " /___/ /___/ "); - - + // Print the ryubing logo + joke splash + SplashTextHelper.PrintSplash(); + Logger.Notice.Print(LogClass.Application, $"{RyujinxApp.FullAppName} Version: {Version}"); Logger.Notice.Print(LogClass.Application, $".NET Runtime: {RuntimeInformation.FrameworkDescription}"); SystemInfo.Gather().Print(); diff --git a/src/Ryujinx/Ryujinx.csproj b/src/Ryujinx/Ryujinx.csproj index e9af04e4f..6503d57f5 100644 --- a/src/Ryujinx/Ryujinx.csproj +++ b/src/Ryujinx/Ryujinx.csproj @@ -176,6 +176,7 @@ + diff --git a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs index 51c05a692..8d3824e86 100644 --- a/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs +++ b/src/Ryujinx/UI/ViewModels/MainWindowViewModel.cs @@ -76,6 +76,8 @@ namespace Ryujinx.Ava.UI.ViewModels [ObservableProperty] public partial string LoadHeading { get; set; } [ObservableProperty] public partial string CacheLoadStatus { get; set; } + + [ObservableProperty] public partial string Splash { get; set; } [ObservableProperty] public partial string DockedStatusText { get; set; } @@ -1256,6 +1258,7 @@ namespace Ryujinx.Ava.UI.ViewModels break; case ShaderCacheLoadingState shaderCacheState: CacheLoadStatus = $"{current} / {total}"; + Splash = $"\"{SplashTextHelper.GetSplash()}\""; switch (shaderCacheState) { case ShaderCacheLoadingState.Start: diff --git a/src/Ryujinx/UI/Windows/MainWindow.axaml b/src/Ryujinx/UI/Windows/MainWindow.axaml index 2ed915a37..d5c717dee 100644 --- a/src/Ryujinx/UI/Windows/MainWindow.axaml +++ b/src/Ryujinx/UI/Windows/MainWindow.axaml @@ -135,7 +135,7 @@ Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" - IsVisible="{Binding ShowLoadProgress}" RowDefinitions="Auto,Auto,Auto"> + IsVisible="{Binding ShowLoadProgress}" RowDefinitions="Auto,Auto,Auto,Auto"> +