diff --git a/project/code/LGS/Database/Chunks/GamFile.cs b/project/code/LGS/Database/Chunks/GamFile.cs new file mode 100644 index 0000000..07683d1 --- /dev/null +++ b/project/code/LGS/Database/Chunks/GamFile.cs @@ -0,0 +1,22 @@ +using System; +using System.IO; +using System.Text; + +namespace KeepersCompound.LGS.Database.Chunks; + +public class GamFile : IChunk +{ + public ChunkHeader Header { get; set; } + public string fileName; + + public void ReadData(BinaryReader reader, DbFile.TableOfContents.Entry entry) + { + var tmpName = Encoding.UTF8.GetString(reader.ReadBytes(256)).Replace("\0", string.Empty); + fileName = tmpName[..Math.Min(255, tmpName.Length)]; + } + + public void WriteData(BinaryWriter writer) + { + throw new System.NotImplementedException(); + } +} \ No newline at end of file diff --git a/project/code/LGS/Database/File.cs b/project/code/LGS/Database/File.cs index d18f968..072d3ab 100644 --- a/project/code/LGS/Database/File.cs +++ b/project/code/LGS/Database/File.cs @@ -98,6 +98,7 @@ public class DbFile { // "AI_ROOM_DB" => new AiRoomDb(), // "AICONVERSE" => new AiConverseChunk(), + "GAM_FILE" => new GamFile(), "TXLIST" => new TxList(), "WREXT" => new WorldRep(), "BRLIST" => new BrList(),