diff --git a/FEZ-Unpacker.csproj b/FEZ-Unpacker.csproj new file mode 100644 index 0000000..5c6435d --- /dev/null +++ b/FEZ-Unpacker.csproj @@ -0,0 +1,11 @@ + + + + Exe + net8.0 + FEZ_Unpacker + enable + enable + + + diff --git a/FEZ-Unpacker.sln b/FEZ-Unpacker.sln new file mode 100644 index 0000000..fc04b52 --- /dev/null +++ b/FEZ-Unpacker.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34309.116 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FEZ-Unpacker", "FEZ-Unpacker.csproj", "{1B0B5B5F-440C-4893-B1B3-72338EA14100}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {1B0B5B5F-440C-4893-B1B3-72338EA14100}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {1B0B5B5F-440C-4893-B1B3-72338EA14100}.Debug|Any CPU.Build.0 = Debug|Any CPU + {1B0B5B5F-440C-4893-B1B3-72338EA14100}.Release|Any CPU.ActiveCfg = Release|Any CPU + {1B0B5B5F-440C-4893-B1B3-72338EA14100}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {FBFDEC70-C268-41A3-8148-925F62B1D9E1} + EndGlobalSection +EndGlobal diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..70bcc8e --- /dev/null +++ b/Program.cs @@ -0,0 +1,19 @@ +//Written for FEZ. https://store.steampowered.com/app/224760/ +internal class Program +{ + private static void Main(string[] args) + { + BinaryReader br = new BinaryReader(File.OpenRead(args[0])); + + int size = br.ReadInt32(); + for (int i = 0; i < size; i++) + { + string name = br.ReadString(); + Directory.CreateDirectory(Path.GetDirectoryName(args[0]) + "//" + Path.GetFileNameWithoutExtension(args[0]) + "//" + Path.GetDirectoryName(name)); + using FileStream FS = File.Create(Path.GetDirectoryName(args[0]) + "//" + Path.GetFileNameWithoutExtension(args[0]) + "//" + name); + BinaryWriter bw = new(FS); + bw.Write(br.ReadBytes(br.ReadInt32())); + bw.Close(); + } + } +} \ No newline at end of file