mirror of
https://mirror.ghproxy.com/https://github.com/dexyfex/CodeWalker
synced 2024-08-20 00:49:25 +08:00
feat(structs): Add constructors
Add construtors for Array_byte and Array_float
This commit is contained in:
parent
de582fee02
commit
392c5c48db
@ -730,7 +730,6 @@ namespace CodeWalker.GameFiles
|
|||||||
Unk1 = 0;
|
Unk1 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void SwapEnd()
|
public void SwapEnd()
|
||||||
{
|
{
|
||||||
Pointer = MetaTypes.SwapBytes(Pointer);
|
Pointer = MetaTypes.SwapBytes(Pointer);
|
||||||
@ -756,6 +755,23 @@ namespace CodeWalker.GameFiles
|
|||||||
public uint PointerDataIndex { get { return (Pointer & 0xFFF) - 1; } }
|
public uint PointerDataIndex { get { return (Pointer & 0xFFF) - 1; } }
|
||||||
public uint PointerDataOffset { get { return ((Pointer >> 12) & 0xFFFFF); } }
|
public uint PointerDataOffset { get { return ((Pointer >> 12) & 0xFFFFF); } }
|
||||||
|
|
||||||
|
public Array_byte(uint ptr, int cnt)
|
||||||
|
{
|
||||||
|
Pointer = ptr;
|
||||||
|
Unk0 = 0;
|
||||||
|
Count1 = (ushort)cnt;
|
||||||
|
Count2 = Count1;
|
||||||
|
Unk1 = 0;
|
||||||
|
}
|
||||||
|
public Array_byte(MetaBuilderPointer ptr)
|
||||||
|
{
|
||||||
|
Pointer = ptr.Pointer;
|
||||||
|
Unk0 = 0;
|
||||||
|
Count1 = (ushort)ptr.Length;
|
||||||
|
Count2 = Count1;
|
||||||
|
Unk1 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
public void SwapEnd()
|
public void SwapEnd()
|
||||||
{
|
{
|
||||||
Pointer = MetaTypes.SwapBytes(Pointer);
|
Pointer = MetaTypes.SwapBytes(Pointer);
|
||||||
@ -781,6 +797,23 @@ namespace CodeWalker.GameFiles
|
|||||||
public uint PointerDataIndex { get { return (Pointer & 0xFFF) - 1; } }
|
public uint PointerDataIndex { get { return (Pointer & 0xFFF) - 1; } }
|
||||||
public uint PointerDataOffset { get { return ((Pointer >> 12) & 0xFFFFF); } }
|
public uint PointerDataOffset { get { return ((Pointer >> 12) & 0xFFFFF); } }
|
||||||
|
|
||||||
|
public Array_float(uint ptr, int cnt)
|
||||||
|
{
|
||||||
|
Pointer = ptr;
|
||||||
|
Unk0 = 0;
|
||||||
|
Count1 = (ushort)cnt;
|
||||||
|
Count2 = Count1;
|
||||||
|
Unk1 = 0;
|
||||||
|
}
|
||||||
|
public Array_float(MetaBuilderPointer ptr)
|
||||||
|
{
|
||||||
|
Pointer = ptr.Pointer;
|
||||||
|
Unk0 = 0;
|
||||||
|
Count1 = (ushort)ptr.Length;
|
||||||
|
Count2 = Count1;
|
||||||
|
Unk1 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
public void SwapEnd()
|
public void SwapEnd()
|
||||||
{
|
{
|
||||||
Pointer = MetaTypes.SwapBytes(Pointer);
|
Pointer = MetaTypes.SwapBytes(Pointer);
|
||||||
|
Loading…
Reference in New Issue
Block a user