Handle GAM_FILE chunk

This commit is contained in:
Jarrod Doyle 2024-08-24 13:36:44 +01:00
parent acc3add512
commit db293791e0
Signed by: Jayrude
GPG Key ID: 38B57B16E7C0ADF7
2 changed files with 23 additions and 0 deletions

View File

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

View File

@ -98,6 +98,7 @@ public class DbFile
{ {
// "AI_ROOM_DB" => new AiRoomDb(), // "AI_ROOM_DB" => new AiRoomDb(),
// "AICONVERSE" => new AiConverseChunk(), // "AICONVERSE" => new AiConverseChunk(),
"GAM_FILE" => new GamFile(),
"TXLIST" => new TxList(), "TXLIST" => new TxList(),
"WREXT" => new WorldRep(), "WREXT" => new WorldRep(),
"BRLIST" => new BrList(), "BRLIST" => new BrList(),