SonicAudioTools/Source/SonicAudioLib/CriMw/CriTable.Internal.cs

56 lines
1.2 KiB
C#
Raw Normal View History

2016-11-12 17:02:48 +01:00
using System;
namespace SonicAudioLib.CriMw
{
struct CriTableHeader
{
2017-01-30 11:47:50 +01:00
public const string Signature = "@UTF";
public const byte EncodingTypeShiftJis = 0;
public const byte EncodingTypeUtf8 = 1;
public uint Length;
public byte UnknownByte;
public byte EncodingType;
public ushort RowsPosition;
public uint StringPoolPosition;
public uint DataPoolPosition;
public string TableName;
public ushort NumberOfFields;
public ushort RowLength;
public uint NumberOfRows;
2016-11-12 17:02:48 +01:00
}
[Flags]
2017-01-30 11:47:50 +01:00
enum CriFieldFlag : byte
2016-11-12 17:02:48 +01:00
{
Name = 16,
DefaultValue = 32,
RowStorage = 64,
Byte = 0,
SByte = 1,
UInt16 = 2,
Int16 = 3,
UInt32 = 4,
Int32 = 5,
UInt64 = 6,
Int64 = 7,
Single = 8,
2016-11-12 17:02:48 +01:00
Double = 9,
String = 10,
Data = 11,
Guid = 12,
TypeMask = 15,
};
struct CriTableField
{
public CriFieldFlag Flag;
public string Name;
public uint Position;
public uint Length;
public object Value;
2016-11-12 17:02:48 +01:00
}
}