Add files via upload

This commit is contained in:
NintenHero 2024-03-05 04:53:49 -06:00 committed by GitHub
parent 2d0f345a1f
commit 92f6a24432
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 55 additions and 0 deletions

11
FEZ-Unpacker.csproj Normal file
View file

@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>FEZ_Unpacker</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

25
FEZ-Unpacker.sln Normal file
View file

@ -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

19
Program.cs Normal file
View file

@ -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();
}
}
}