mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-26 23:24:00 +08:00
Revert "Add ToUint64 for big endian numbers"
This reverts commit 681e82dd3f
.
This commit is contained in:
parent
681e82dd3f
commit
e3236c0fbd
@ -45,7 +45,7 @@ namespace GameRes.Formats.DxLib
|
||||
public int ParentNode; // index of parent node.
|
||||
public int[] ChildNode; //two children nodes, -1 if not existent.
|
||||
|
||||
internal DXA8HuffmanNode()
|
||||
DXA8HuffmanNode()
|
||||
{
|
||||
bitArray = new byte[32];
|
||||
ChildNode = new int[2];
|
||||
@ -96,7 +96,6 @@ namespace GameRes.Formats.DxLib
|
||||
|
||||
for (int i=0; i<nodes.Length; i++)
|
||||
{
|
||||
nodes[i] = new DXA8HuffmanNode();
|
||||
nodes[i].ParentNode = -1;
|
||||
nodes[i].ChildNode[0] = -1;
|
||||
nodes[i].ChildNode[1] = -1;
|
||||
@ -339,7 +338,7 @@ namespace GameRes.Formats.DxLib
|
||||
{
|
||||
if (0 == m_bit_count)
|
||||
{
|
||||
m_bits = BigEndian.ToUInt64 (m_input, m_src);
|
||||
m_bits = LittleEndian.ToUInt64 (m_input, m_src);
|
||||
m_src += 8;
|
||||
m_bit_count = 64;
|
||||
}
|
||||
|
@ -176,15 +176,6 @@ namespace GameRes.Utility
|
||||
{
|
||||
return (int)ToUInt32 (value, index);
|
||||
}
|
||||
public static ulong ToUInt64<TArray>(TArray value, int index) where TArray : IList<byte>
|
||||
{
|
||||
return (ulong)(value[index]<<56|value[index+1]<<48|value[index+2]<<40|value[index+3]<<32|value[index+4] << 24 | value[index + 5] << 16 | value[index + 6] << 8 | value[index + 7]);
|
||||
}
|
||||
|
||||
public static long ToInt64<TArray>(TArray value, int index) where TArray : IList<byte>
|
||||
{
|
||||
return (long)ToUInt64(value, index);
|
||||
}
|
||||
|
||||
public static void Pack (ushort value, byte[] buf, int index)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user