From 87a1da38535532988b8ed43b66184885c5471a06 Mon Sep 17 00:00:00 2001 From: Denis Date: Fri, 3 Dec 2021 20:33:55 +0100 Subject: [PATCH] Organization Code cleanup File organization Getting ready for the 1.0 release --- BMGEditor/{ => FS}/BigEndian.cs | 0 BMGEditor/{ => FS}/Compression.cs | 0 BMGEditor/{ => FS}/ExternalFilesystem.cs | 0 BMGEditor/{ => FS}/FilesystemBase.cs | 0 BMGEditor/{ => FS}/Yaz0Stream.cs | 0 BMGEditor/{ => IO}/BMG.cs | 4 ++-- BMGEditor/{ => IO}/Bcsv.cs | 0 BMGEditor/{ => IO}/RarcFilesystem.cs | 0 BMGEditor/Program.cs | 21 +++++++++++++++++---- BMGEditor/UI/NewEntryForm.cs | 10 +--------- 10 files changed, 20 insertions(+), 15 deletions(-) rename BMGEditor/{ => FS}/BigEndian.cs (100%) rename BMGEditor/{ => FS}/Compression.cs (100%) rename BMGEditor/{ => FS}/ExternalFilesystem.cs (100%) rename BMGEditor/{ => FS}/FilesystemBase.cs (100%) rename BMGEditor/{ => FS}/Yaz0Stream.cs (100%) rename BMGEditor/{ => IO}/BMG.cs (99%) rename BMGEditor/{ => IO}/Bcsv.cs (100%) rename BMGEditor/{ => IO}/RarcFilesystem.cs (100%) diff --git a/BMGEditor/BigEndian.cs b/BMGEditor/FS/BigEndian.cs similarity index 100% rename from BMGEditor/BigEndian.cs rename to BMGEditor/FS/BigEndian.cs diff --git a/BMGEditor/Compression.cs b/BMGEditor/FS/Compression.cs similarity index 100% rename from BMGEditor/Compression.cs rename to BMGEditor/FS/Compression.cs diff --git a/BMGEditor/ExternalFilesystem.cs b/BMGEditor/FS/ExternalFilesystem.cs similarity index 100% rename from BMGEditor/ExternalFilesystem.cs rename to BMGEditor/FS/ExternalFilesystem.cs diff --git a/BMGEditor/FilesystemBase.cs b/BMGEditor/FS/FilesystemBase.cs similarity index 100% rename from BMGEditor/FilesystemBase.cs rename to BMGEditor/FS/FilesystemBase.cs diff --git a/BMGEditor/Yaz0Stream.cs b/BMGEditor/FS/Yaz0Stream.cs similarity index 100% rename from BMGEditor/Yaz0Stream.cs rename to BMGEditor/FS/Yaz0Stream.cs diff --git a/BMGEditor/BMG.cs b/BMGEditor/IO/BMG.cs similarity index 99% rename from BMGEditor/BMG.cs rename to BMGEditor/IO/BMG.cs index 818a082..7325761 100644 --- a/BMGEditor/BMG.cs +++ b/BMGEditor/IO/BMG.cs @@ -170,9 +170,9 @@ namespace BMGEditor public class TextEntry { public int entryNo; - public string text; + public string text = ""; public UInt32 offset; - public string entryName; + public string entryName = ""; //Properties public byte unk1; diff --git a/BMGEditor/Bcsv.cs b/BMGEditor/IO/Bcsv.cs similarity index 100% rename from BMGEditor/Bcsv.cs rename to BMGEditor/IO/Bcsv.cs diff --git a/BMGEditor/RarcFilesystem.cs b/BMGEditor/IO/RarcFilesystem.cs similarity index 100% rename from BMGEditor/RarcFilesystem.cs rename to BMGEditor/IO/RarcFilesystem.cs diff --git a/BMGEditor/Program.cs b/BMGEditor/Program.cs index 8c74baf..8e0de93 100644 --- a/BMGEditor/Program.cs +++ b/BMGEditor/Program.cs @@ -15,8 +15,8 @@ namespace BMGEditor public const string softwareName = "Luma"; public const string softwareVersion = "v0.4.5"; public const UInt64 softwareInternalVersion = 45; + public const UInt64 build = 1; //Getting ready for 1.0 public const bool isBeta = true; - public const bool isPrivateBeta = false; } internal static class Program { @@ -25,8 +25,6 @@ namespace BMGEditor { ApplicationConfiguration.Initialize(); Bcsv.PopulateHashtable(); - if (Variables.isBeta && Variables.isPrivateBeta) - MessageBox.Show("This is a private beta, please don\'t leak it.", "Private", MessageBoxButtons.OK, MessageBoxIcon.Warning); Application.Run(new MainForm()); } @@ -34,6 +32,11 @@ namespace BMGEditor public static async void CheckUpdates() { const string verCheckURL = "https://bussun.github.io/res/checks/luma/upre1"; + /*if (Variables.isBeta) + * const string verCheckURL = "https://bussun.github.io/res/checks/luma/ub"; + *else + * const string verCheckURL = "https://bussun.github.io/res/chacks/luma/u"; + */ //Getting ready for 1.0 Stream wrAnswer; try @@ -46,12 +49,22 @@ namespace BMGEditor { UInt64 wrAnswerVersion = UInt64.Parse(wrAnswerContent); - if (wrAnswerVersion > Variables.softwareInternalVersion) + if (wrAnswerVersion == 100) + MessageBox.Show("The 1.0 release is available !!", "1.0 Available, upgrade now !"); + else if (wrAnswerVersion > Variables.softwareInternalVersion) MessageBox.Show("New version available", "Update available", MessageBoxButtons.OK, MessageBoxIcon.Information); else if (wrAnswerVersion == Variables.softwareInternalVersion) MessageBox.Show("Luma is up to date.", "No update available", MessageBoxButtons.OK, MessageBoxIcon.Information); else MessageBox.Show("Woah, you got a developpement version !", "The most up to date ever (for now)", MessageBoxButtons.OK, MessageBoxIcon.Information); + + /* if (wrAnswerVersion > Variables.build) + MessageBox.Show("New version available", "Update available", MessageBoxButtons.OK, MessageBoxIcon.Information); + else if (wrAnswerVersion == Variables.build) + MessageBox.Show("Luma is up to date.", "No update available", MessageBoxButtons.OK, MessageBoxIcon.Information); + else + MessageBox.Show("Woah, you got a developpement version !", "The most up to date ever (for now)", MessageBoxButtons.OK, MessageBoxIcon.Information); + */ //Getting ready for 1.0 } else { diff --git a/BMGEditor/UI/NewEntryForm.cs b/BMGEditor/UI/NewEntryForm.cs index 54416ef..8ba06f8 100644 --- a/BMGEditor/UI/NewEntryForm.cs +++ b/BMGEditor/UI/NewEntryForm.cs @@ -1,11 +1,4 @@ using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows.Forms; namespace BMGEditor.UI @@ -16,8 +9,7 @@ namespace BMGEditor.UI public NewEntryForm(BMG file) { InitializeComponent(); - Text = $"New Entry - {Variables.softwareName} {Variables.softwareVersion}"; - if (Variables.isBeta) Text += " [BETA]"; + Text = "New Entry"; m_File = file; }