准备开工script解析

This commit is contained in:
Chenx221 2024-10-13 22:45:24 +08:00
parent b91884b08d
commit 8965c9aacb
2 changed files with 87 additions and 52 deletions

View File

@ -198,8 +198,7 @@ namespace EscudeTools
private static bool SqliteProcess(Sheet[] db, string path)
{
//db含有多个sheet每个sheet中col存放标题对应数据库中应该是字段records存放数据对应数据库中应该是记录
using (SqliteConnection connection = new($"Data Source={path};"))
{
using SqliteConnection connection = new($"Data Source={path};");
connection.Open();
foreach (var sheet in db)
@ -260,10 +259,7 @@ namespace EscudeTools
insertDataCommand.Parameters.Clear();
}
}
}
return true;
//throw new NotImplementedException();
}
private static string GetSQLiteColumnType(ushort type)
{

View File

@ -0,0 +1,39 @@
namespace EscudeTools
{
public class ScriptMessage
{
public byte[] Data { get; set; } // MESS領域 (消息区域)
public uint Size { get; set; } // MESS領域サイズ (消息区域大小)
public uint[] Offset { get; set; } // MESSオフセット (消息偏移)
public uint Count { get; set; } // MESS数 (消息数量)
}
public class ScriptFile
{
public byte[] Code { get; set; } // CODE領域 (代码区域)
public uint CodeSize { get; set; } // CODE領域サイズ (代码区域大小)
public byte[] Text { get; set; } // TEXT領域 (文本区域)
public uint TextSize { get; set; } // TEXT領域サイズ (文本区域大小)
public uint[] TextOffset { get; set; } // TEXTオフセット (文本偏移)
public uint TextCount { get; set; } // TEXT数 (文本数量)
public uint MessCount { get; set; } // MESS数 (消息数量)
}
public class ScriptManager
{
static readonly byte[] MessHeader = [0x40, 0x6D, 0x65, 0x73, 0x73, 0x3A, 0x5F, 0x5F]; //@mess:__
static readonly byte[] FileHeader = [0x40, 0x63, 0x6F, 0x64, 0x65, 0x3A, 0x5F, 0x5F]; //@code:__
public bool LoadScriptFile(string path)
{
throw new NotImplementedException();
}
public bool LoadScriptMess(string path)
{
throw new NotImplementedException();
}
}
}