Add mesh reading and conversion support

This commit is contained in:
Yukai Li 2021-03-17 03:18:15 -06:00
parent 65dc96c4d6
commit aa1277a4e1
25 changed files with 2212 additions and 9 deletions

View file

@ -11,12 +11,12 @@ namespace LibDgf.Txm
public TxmPixelFormat ImageVideoPixelFormat { get; set; }
public short ImageWidth { get; set; }
public short ImageHeight { get; set; }
public short ImageBufferBase { get; set; }
public ushort ImageBufferBase { get; set; }
public TxmPixelFormat ClutPixelFormat { get; set; }
public byte Misc { get; set; } // 0x0f = level, 0x70 = count, 0x80 = fast count
public short ClutWidth { get; set; }
public short ClutHeight { get; set; }
public short ClutBufferBase { get; set; }
public ushort ClutBufferBase { get; set; }
public void Read(BinaryReader br)
{
@ -24,12 +24,12 @@ namespace LibDgf.Txm
ImageVideoPixelFormat = (TxmPixelFormat)br.ReadByte();
ImageWidth = br.ReadInt16();
ImageHeight = br.ReadInt16();
ImageBufferBase = br.ReadInt16();
ImageBufferBase = br.ReadUInt16();
ClutPixelFormat = (TxmPixelFormat)br.ReadByte();
Misc = br.ReadByte();
ClutWidth = br.ReadInt16();
ClutHeight = br.ReadInt16();
ClutBufferBase = br.ReadInt16();
ClutBufferBase = br.ReadUInt16();
}
public void Write(BinaryWriter bw)