From 709d4f2b56297865f7030b67a0d1be07526820ad Mon Sep 17 00:00:00 2001 From: Chenx221 Date: Sat, 12 Oct 2024 00:09:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E4=BB=A3=E7=A0=812?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EscudeLSF/EscudeLSF.csproj | 2 ++ EscudeLSF/Program.cs | 58 +++++++------------------------------- 2 files changed, 12 insertions(+), 48 deletions(-) diff --git a/EscudeLSF/EscudeLSF.csproj b/EscudeLSF/EscudeLSF.csproj index 10c16d4..a8c23d3 100644 --- a/EscudeLSF/EscudeLSF.csproj +++ b/EscudeLSF/EscudeLSF.csproj @@ -9,6 +9,8 @@ + + diff --git a/EscudeLSF/Program.cs b/EscudeLSF/Program.cs index f31f0e7..6265cd0 100644 --- a/EscudeLSF/Program.cs +++ b/EscudeLSF/Program.cs @@ -3,42 +3,8 @@ using System.Runtime.InteropServices; namespace EscudeLSF { - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct LSFHDR - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public byte[] signature; // 4 bytes - public uint unknown1; // 4 bytes - public uint unknown2; // 4 bytes - public uint width; // 4 bytes - public uint height; // 4 bytes - public uint unknown_width; // 4 bytes - public uint unknown_height; // 4 bytes - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct LSFENTRY - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] - public char[] name; // 128 bytes - public uint x; // 4 bytes - public uint y; // 4 bytes - public uint baseWidth; // 4 bytes - public uint baseHeight; // 4 bytes - public uint unknown3; // 4 bytes - public uint unknown4; // 4 bytes - public byte type; // 1 byte - public byte id; // 1 byte - public byte unknown5; // 1 byte - public byte unknown6; // 1 byte - public uint unknown7; // 4 bytes - public uint unknown8; // 4 bytes - } - internal class Program { - private static readonly byte[] Signature = [0x4C, 0x53, 0x46, 0x00]; - static void Main(string[] args) { if (args.Length == 0 || args.Length > 2) @@ -51,27 +17,23 @@ namespace EscudeLSF switch (args[0]) { case "-h": - return; - case "-r": case "-d": case "-s": - break; - default: break; } } - static void DisplayHelp() - { - Console.WriteLine("Usage: EscudeLSF.exe [-r ] [-d ] [-s ] [-h]"); - Console.WriteLine("Options:"); - Console.WriteLine(" Single lsf process"); - Console.WriteLine(" -r Read single lsf file"); - Console.WriteLine(" -d Process all lsf files in directory"); - Console.WriteLine(" -s Same as "); - Console.WriteLine(" -h Display help info"); - } + //static void DisplayHelp() + //{ + // Console.WriteLine("Usage: EscudeLSF.exe [-r ] [-d ] [-s ] [-h]"); + // Console.WriteLine("Options:"); + // Console.WriteLine(" Single lsf process"); + // Console.WriteLine(" -r Read single lsf file"); + // Console.WriteLine(" -d Process all lsf files in directory"); + // Console.WriteLine(" -s Same as "); + // Console.WriteLine(" -h Display help info"); + //} } }