diff --git a/patches/64bit/Terraria.ModLoader.UI/UIDeveloperModeHelp.cs.patch b/patches/64bit/Terraria.ModLoader.UI/UIDeveloperModeHelp.cs.patch index 52e2767f19c..b7c92e8ad32 100644 --- a/patches/64bit/Terraria.ModLoader.UI/UIDeveloperModeHelp.cs.patch +++ b/patches/64bit/Terraria.ModLoader.UI/UIDeveloperModeHelp.cs.patch @@ -5,6 +5,6 @@ Main.menuMode = Interface.developerModeHelpID; }; + // Change download name from ModCompile to ModCompile64 - DownloadFileFromUrl("ModCompile64", url, file, () => { + DownloadFileFromUrl("ModCompile", url, file, () => { try { Extract(file); diff --git a/patches/64bit/Terraria.ModLoader.x64bit/Core64.cs b/patches/64bit/Terraria.ModLoader.x64bit/Core64.cs index 764a6a885ac..b38f5edc850 100644 --- a/patches/64bit/Terraria.ModLoader.x64bit/Core64.cs +++ b/patches/64bit/Terraria.ModLoader.x64bit/Core64.cs @@ -23,12 +23,12 @@ class Core64 /// /// Boolean that will allow you to switch between vanilla and 64bit mode, so you can play with vanilla friends! /// - internal static bool vanillaMode; - internal static bool liteMode = false; + // internal static bool vanillaMode; + // internal static bool liteMode = false; internal static readonly string vanillaVersion = "Terraria" + 194; - internal static bool betaMode => false && !liteMode; + // internal static bool betaMode => false && !liteMode; internal const int vanillaChestLimit = 1000; internal static readonly int maxChest = 2000; @@ -57,17 +57,12 @@ internal static void LoadModdedPath() { internal static void DrawPatreon(SpriteBatch sb, int loopNum, int offsetX, int offsetY, bool hasFocus, Color color12) { // TODO: Localization for vanilla, tml, and lite modes when they're actually used - string patreonShortURL = !vanillaMode ? Language.GetTextValue("tModLoader.VanillaMode") : Language.GetTextValue("tModLoader.tModMode"); - string tmlModeString = liteMode ? Language.GetTextValue("tModLoader.DisableLite") : Language.GetTextValue("tModLoader.EnableLite"); bool showPatreon = Main.menuMode == 0; string architecture = Language.GetTextValue("tModLoader.RunningBitMode", Environment.Is64BitProcess ? 64.ToString() : 32.ToString()); string GoG = InstallVerifier.IsGoG ? Language.GetTextValue("tModLoader.GoG") : Language.GetTextValue("tModLoader.Steam"); string drawVersion; - - if (vanillaMode) - drawVersion = Main.versionNumber; - else - drawVersion = Main.versionNumber + Environment.NewLine + ModLoader.versionedName + $" - {architecture} {GoG} {PlatformUtilities.RunningPlatform()}"; + + drawVersion = Main.versionNumber + Environment.NewLine + ModLoader.versionedName + $" - {architecture} {GoG} {PlatformUtilities.RunningPlatform()}"; Vector2 origin3 = Main.fontMouseText.MeasureString(drawVersion); origin3.X *= 0.5f; @@ -78,22 +73,22 @@ internal static void DrawPatreon(SpriteBatch sb, int loopNum, int offsetX, int o if (loopNum == 4) color12 = new Color(127, 191, 191, 76); - if (Main.menuMode == 10002 && vanillaMode) + if (Main.menuMode == 10002) Main.menuMode = 0; if (showPatreon) { - Vector2 urlSize = Main.fontMouseText.MeasureString(patreonShortURL); - Main.spriteBatch.DrawString(Main.fontMouseText, patreonShortURL, new Vector2(offsetX + 10f, Main.screenHeight - origin3.Y - 50f - offsetY + 2f), color12, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + // Vector2 urlSize = Main.fontMouseText.MeasureString(patreonShortURL); + // Main.spriteBatch.DrawString(Main.fontMouseText, patreonShortURL, new Vector2(offsetX + 10f, Main.screenHeight - origin3.Y - 50f - offsetY + 2f), color12, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); - if (loopNum == 4 && Main.mouseLeftRelease && Main.mouseLeft && new Rectangle((int)(offsetX + 10f), (int)(Main.screenHeight - origin3.Y - 50f - offsetY + 2f), (int)urlSize.X, (int)origin3.Y).Contains(new Point(Main.mouseX, Main.mouseY)) && hasFocus) { - Main.PlaySound(SoundID.MenuOpen); + // if (loopNum == 4 && Main.mouseLeftRelease && Main.mouseLeft && new Rectangle((int)(offsetX + 10f), (int)(Main.screenHeight - origin3.Y - 50f - offsetY + 2f), (int)urlSize.X, (int)origin3.Y).Contains(new Point(Main.mouseX, Main.mouseY)) && hasFocus) { + // Main.PlaySound(SoundID.MenuOpen); /*vanillaMode = !vanillaMode; Main.SaveSettings(); Interface.infoMessage.Show("You'll need to restart the game so that the necessary change can apply.", 0, null, "Restart", () => Environment.Exit(0));*/ - Interface.infoMessage.Show(Language.GetTextValue("tModLoader.UnfinishedFeature"), 0); - } + // Interface.infoMessage.Show(Language.GetTextValue("tModLoader.UnfinishedFeature"), 0); + // } - if (!vanillaMode) { + /*if (!vanillaMode) { urlSize = Main.fontMouseText.MeasureString(tmlModeString); Main.spriteBatch.DrawString(Main.fontMouseText, tmlModeString, new Vector2(offsetX + 10f, Main.screenHeight - origin3.Y - 72f - offsetY + 2f), color12, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); if (loopNum == 4 && Main.mouseLeftRelease && Main.mouseLeft && new Microsoft.Xna.Framework.Rectangle((int)(offsetX + 10f), (int)(Main.screenHeight - origin3.Y - 72f - offsetY + 2f), (int)urlSize.X, (int)origin3.Y).Contains(new Microsoft.Xna.Framework.Point(Main.mouseX, Main.mouseY)) && hasFocus) { @@ -106,7 +101,7 @@ internal static void DrawPatreon(SpriteBatch sb, int loopNum, int offsetX, int o Environment.Exit(0); }); } - } + }*/ } } diff --git a/patches/64bit/Terraria.ModLoader/ModLoader.cs.patch b/patches/64bit/Terraria.ModLoader/ModLoader.cs.patch index 8a87ea7b9ed..96df90fbf18 100644 --- a/patches/64bit/Terraria.ModLoader/ModLoader.cs.patch +++ b/patches/64bit/Terraria.ModLoader/ModLoader.cs.patch @@ -18,13 +18,10 @@ [Obsolete("Use CompressedPlatformRepresentation instead")] public static readonly string compressedPlatformRepresentation = Platform.IsWindows ? "w" : (Platform.IsLinux ? "l" : "m"); -@@ -376,7 +_,10 @@ - Main.Configuration.Get("AvoidGithub", ref UI.ModBrowser.UIModBrowser.AvoidGithub); +@@ -377,6 +_,7 @@ Main.Configuration.Get("AvoidImgur", ref UI.ModBrowser.UIModBrowser.AvoidImgur); Main.Configuration.Get(nameof(UI.ModBrowser.UIModBrowser.EarlyAutoUpdate), ref UI.ModBrowser.UIModBrowser.EarlyAutoUpdate); LastLaunchedTModLoaderVersion = new Version(Main.Configuration.Get("LastLaunchedTModLoaderVersion", "0.0")); -+ Main.Configuration.Get("VanillaMode", ref Core64.vanillaMode); -+ Main.Configuration.Get("LiteMode", ref Core64.liteMode); + Main.Configuration.Get("Last64BitLaunched", ref Core64.last64bitVersionLaunched); } diff --git a/patches/64bit/Terraria/Main.cs.patch b/patches/64bit/Terraria/Main.cs.patch index ff52360f994..6c06e66b3b0 100644 --- a/patches/64bit/Terraria/Main.cs.patch +++ b/patches/64bit/Terraria/Main.cs.patch @@ -165,7 +165,7 @@ string vanillaContentFolder = "../Terraria/Content"; // Side-by-Side Manual Install if (!Directory.Exists(vanillaContentFolder)) { vanillaContentFolder = "../Content"; // Nested Manual Install -@@ -6757,6 +_,7 @@ +@@ -6765,6 +_,7 @@ }); base.Initialize(); @@ -173,7 +173,7 @@ base.Window.AllowUserResizing = true; OpenSettings(); if (screenWidth > GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width) -@@ -7296,7 +_,7 @@ +@@ -7304,7 +_,7 @@ engine = new AudioEngine(Main.instance.Content.RootDirectory + Path.DirectorySeparatorChar + "TerrariaMusic.xgs"); soundBank = new SoundBank(engine, Main.instance.Content.RootDirectory + Path.DirectorySeparatorChar + "Sound Bank.xsb"); engine.Update(); @@ -182,7 +182,7 @@ engine.Update(); music = new Music[42]; while (!waveBank.IsPrepared) { -@@ -7479,7 +_,7 @@ +@@ -7487,7 +_,7 @@ if (waveBank == null) //supress extra exceptions from audio engine failing to load return; @@ -191,7 +191,7 @@ if (Main.engine != null) Main.engine.Update(); -@@ -10261,7 +_,7 @@ +@@ -10269,7 +_,7 @@ } hasFocus = base.IsActive; @@ -200,7 +200,7 @@ hasFocus = (Form.ActiveForm == Control.FromHandle(base.Window.Handle) as Form); #endif if (!gameMenu || netMode == 2) { -@@ -35792,9 +_,8 @@ +@@ -35800,9 +_,8 @@ SocialAPI.Shutdown(); #endif Exit(); @@ -212,7 +212,7 @@ } protected Microsoft.Xna.Framework.Color randColor() { -@@ -36426,19 +_,19 @@ +@@ -36434,19 +_,19 @@ } else if (selectedMenu == 2 || inputTextEnter || autoPass) { string str = "-autoshutdown -password \"" + Netplay.ServerPassword + "\" -lang " + Language.ActiveCulture.LegacyId; @@ -240,7 +240,7 @@ tServer.StartInfo.Arguments = str; if (libPath != "") { ProcessStartInfo startInfo = tServer.StartInfo; -@@ -37718,7 +_,7 @@ +@@ -37726,7 +_,7 @@ } bool flag7 = false; @@ -249,7 +249,7 @@ flag7 = true; System.Drawing.Rectangle bounds = Screen.FromPoint(((Form)Control.FromHandle(instance.Window.Handle)).Location).Bounds; if (bounds.Width > maxScreenW || bounds.Height > maxScreenH) -@@ -38373,36 +_,42 @@ +@@ -38381,36 +_,42 @@ array4[1] = 30; array4[2] = 30; array4[3] = 30; @@ -302,7 +302,7 @@ WorldGen.setWorldSize(); } } -@@ -39186,26 +_,11 @@ +@@ -39194,26 +_,11 @@ if (num108 == 3) num110 = 2; @@ -333,7 +333,7 @@ } DrawCursor(DrawThickCursor()); -@@ -41336,7 +_,7 @@ +@@ -41344,7 +_,7 @@ base.GraphicsDevice.SetRenderTarget(backWaterTarget); base.GraphicsDevice.Clear(Microsoft.Xna.Framework.Color.Transparent); spriteBatch.Begin(); @@ -342,7 +342,7 @@ tileBatch.Begin(); #else tileBatch.Begin(SpriteSortMode.Texture, BlendState.AlphaBlend); -@@ -50877,8 +_,9 @@ +@@ -50885,8 +_,9 @@ graphics.ToggleFullScreen(); bool flag = false; @@ -353,7 +353,7 @@ screenMaximized = (((Form)Control.FromHandle(instance.Window.Handle)).WindowState == FormWindowState.Maximized); if (screenBorderless && screenMaximized && !graphics.IsFullScreen) { screenMaximized = false; -@@ -50890,14 +_,11 @@ +@@ -50898,14 +_,11 @@ #else Main.screenMaximized = false; #endif @@ -369,7 +369,7 @@ form.MinimumSize = new Size(0, 0); if (screenBorderless && !graphics.IsFullScreen && screenBorderlessPendingResizes > 0) { screenBorderlessPendingResizes--; -@@ -50928,10 +_,11 @@ +@@ -50936,10 +_,11 @@ else { num3 = graphics.PreferredBackBufferWidth; num4 = graphics.PreferredBackBufferHeight; @@ -382,7 +382,7 @@ form.MinimumSize = new Size(minScreenW, minScreenH); if (flag) { width = displayWidth[0]; -@@ -50946,7 +_,7 @@ +@@ -50954,7 +_,7 @@ flag2 = (graphics.PreferredBackBufferWidth != graphics.GraphicsDevice.Viewport.Width || graphics.PreferredBackBufferHeight != graphics.GraphicsDevice.Viewport.Height); } @@ -391,7 +391,7 @@ // appears redundant. Just causes the window to fight the user when attempting to resize too small // with this disabled, the window will just snap back to minimum size when released /*if (!fullscreen && !flag2) { -@@ -50976,8 +_,7 @@ +@@ -50984,8 +_,7 @@ screenHeight = height; graphics.PreferredBackBufferWidth = screenWidth; graphics.PreferredBackBufferHeight = screenHeight; @@ -401,7 +401,7 @@ PlayerInput.CacheOriginalScreenDimensions(); FixUIScale(); -@@ -50987,7 +_,7 @@ +@@ -50995,7 +_,7 @@ PendingResolutionWidth = screenWidth; PendingResolutionHeight = screenHeight; PlayerInput.CacheOriginalScreenDimensions(); @@ -410,7 +410,7 @@ if (!fullscreen) { form.SendToBack(); form.BringToFront(); -@@ -51026,7 +_,6 @@ +@@ -51034,7 +_,6 @@ } public void UpdateDisplaySettings() {