Skip to content

Commit

Permalink
Change SonicWorldAdventureWii to SonicWorldAdventure_SD
Browse files Browse the repository at this point in the history
Calling it Wii then supporting PS2 stuff alongside it feels silly.
  • Loading branch information
Knuxfan24 committed Aug 31, 2024
1 parent f113695 commit 45c228d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using AuroraLib.Compression.Algorithms;

namespace KnuxLib.Engines.SonicWorldAdventureWii
namespace KnuxLib.Engines.SonicWorldAdventure_SD
{
// TODO: Test the saved ONZ files, as the Storybook ONEs were broken for ages before I noticed.
public class ONE : FileBase
{
// Generic VS stuff to allow creating an object that instantly loads a file.
Expand Down Expand Up @@ -212,9 +213,9 @@ public void Extract(string directory)

// Write the archive type identifier based on the compression flag.
if (!wasCompressed)
File.WriteAllText($@"{directory}\knuxtools_archivetype.txt", "swawii");
File.WriteAllText($@"{directory}\knuxtools_archivetype.txt", "swa_sd");
else
File.WriteAllText($@"{directory}\knuxtools_archivetype.txt", "swawii_compressed");
File.WriteAllText($@"{directory}\knuxtools_archivetype.txt", "swa_sd_compressed");

// Finish the order log.
log.Close();
Expand Down
4 changes: 2 additions & 2 deletions KnuxTools/FormatPrints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ public static void SonicWorldAdventureWii()
Console.WriteLine("===");
Console.WriteLine("Sonic World Adventure Wii Engine:");
Console.WriteLine("ONE Archive (.one/.onz) - Extracts to a directory of the same name as the input archive and creates an archive from an\r\ninput directory.");
Helpers.ColourConsole(" Version Flag - swawii", true, ConsoleColor.Yellow);
Helpers.ColourConsole(" Version Flag (Importing as .onz) - swawii_compressed", true, ConsoleColor.Yellow);
Helpers.ColourConsole(" Version Flag - swa_sd", true, ConsoleColor.Yellow);
Helpers.ColourConsole(" Version Flag (Importing as .onz) - swa_sd_compressed", true, ConsoleColor.Yellow);
}

public static void SpaceChannel()
Expand Down
14 changes: 7 additions & 7 deletions KnuxTools/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ private static void HandleDirectory(string arg)
{ "nintendo_u8_marathon\t(Nintendo U8 Archive File (Sonic '06))", false },
{ "openspace_big\t\t(OpenSpace Engine Big File Archive)", true },
{ "storybook\t\t\t(Sonic Storybook Engine ONE File)", false },
{ "swawii\t\t\t(Sonic World Adventure Wii Engine ONE File)", false },
{ "swawii_compressed\t\t(Sonic World Adventure Wii Engine Compressed ONZ File)", false },
{ "swa_sd\t\t\t(Sonic World Adventure Wii Engine ONE File)", false },
{ "swa_sd_compressed\t\t(Sonic World Adventure Wii Engine Compressed ONZ File)", false },
{ "twinsanity\t\t\t(Twinsanity Engine Data Header Pair)", false },
{ "wayforward\t\t\t(Wayforward Engine Package File)", false },
{ "wayforward_bigendian\t(Wayforward Engine Package File)", false },
Expand Down Expand Up @@ -149,8 +149,8 @@ private static void HandleDirectory(string arg)
case "storybook": _ = new KnuxLib.Engines.SonicStorybook.ONE(arg, true); break;

// Sonic World Adventure Wii ONE Archive.
case "swawii": _ = new KnuxLib.Engines.SonicWorldAdventureWii.ONE(arg, false, true); break;
case "swawii_compressed": _ = new KnuxLib.Engines.SonicWorldAdventureWii.ONE(arg, true, true); break;
case "swa_sd": _ = new KnuxLib.Engines.SonicWorldAdventure_SD.ONE(arg, false, true); break;
case "swa_sd_compressed": _ = new KnuxLib.Engines.SonicWorldAdventure_SD.ONE(arg, true, true); break;

// Twinsanity Engine Data Header Pair.
case "twinsanity": _ = new KnuxLib.Engines.Twinsanity.DataHeaderPair(arg, true); break;
Expand Down Expand Up @@ -386,7 +386,7 @@ private static void HandleFile(string arg)
new()
{
{ "storybook\t\t(Sonic Storybook Engine ONE File)", false },
{ "swawii\t\t(Sonic World Adventure Wii Engine ONE File)", false },
{ "swa_sd\t\t(Sonic World Adventure Wii Engine ONE File)", false },
});

// If the version is still null or empty, then abort.
Expand All @@ -396,13 +396,13 @@ private static void HandleFile(string arg)
switch (Version.ToLower())
{
case "storybook": _ = new KnuxLib.Engines.SonicStorybook.ONE(arg, true); break;
case "swawii": _ = new KnuxLib.Engines.SonicWorldAdventureWii.ONE(arg, false, true); break;
case "swa_sd": _ = new KnuxLib.Engines.SonicWorldAdventure_SD.ONE(arg, false, true); break;
default: Helpers.InvalidFormatVersion("Generic .one Archive"); return;
}

break;

case ".onz": _ = new KnuxLib.Engines.SonicWorldAdventureWii.ONE(arg, true, true); break;
case ".onz": _ = new KnuxLib.Engines.SonicWorldAdventure_SD.ONE(arg, true, true); break;

case ".pak":
// Check for a format version.
Expand Down

0 comments on commit 45c228d

Please sign in to comment.