mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-23 19:34:15 +08:00
Update HuffmanDecoder.cs
Fix obvious bugs.
This commit is contained in:
parent
4773ff148f
commit
57749e5cac
@ -201,7 +201,7 @@ namespace GameRes.Formats.DxLib
|
||||
}
|
||||
Index = PressBitData & 1;
|
||||
PressBitData >>= 1;
|
||||
PressSizeCounter++;
|
||||
PressBitCounter++;
|
||||
NodeIndex = nodes[NodeIndex].ChildNode[Index];
|
||||
}
|
||||
}
|
||||
@ -237,7 +237,7 @@ namespace GameRes.Formats.DxLib
|
||||
nodes[i].bitNumber++;
|
||||
|
||||
}
|
||||
//path is now backwards (target to root). Pupulate BitPath from root to target.
|
||||
//path is now backwards (target to root). Populate BitPath from root to target.
|
||||
int BitIndex=0, BitCount=0;
|
||||
nodes[i].bitArray[BitIndex] = 0;
|
||||
while (TempBitIndex >= 0)
|
||||
@ -278,7 +278,7 @@ namespace GameRes.Formats.DxLib
|
||||
BitNum = (byte)(((int)GetBits(3) + 1) * 2);
|
||||
Minus = (byte)GetBits(1);
|
||||
SaveData = (ushort)GetBits(BitNum);
|
||||
nodes[0].Weight = SaveData;
|
||||
weights[0] = SaveData;
|
||||
for (int i = 1; i < 256; i++)
|
||||
{
|
||||
BitNum = (byte)(((int)GetBits(3) + 1) * 2);
|
||||
|
Loading…
x
Reference in New Issue
Block a user