mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(HuffmanReader.Unpack): code reduction.
This commit is contained in:
@@ -463,18 +463,12 @@ namespace GameRes.Formats.ShiinaRio // 椎名里緒
|
|||||||
uint idx = index;
|
uint idx = index;
|
||||||
while (idx >= 256)
|
while (idx >= 256)
|
||||||
{
|
{
|
||||||
uint is_right;
|
|
||||||
|
|
||||||
if (--m_curbits < 0)
|
if (--m_curbits < 0)
|
||||||
{
|
{
|
||||||
m_curbits = 31;
|
m_curbits = 31;
|
||||||
m_cache = ReadUInt32();
|
m_cache = ReadUInt32();
|
||||||
is_right = m_cache >> 31;
|
|
||||||
}
|
}
|
||||||
else
|
if (0 != ((m_cache >> m_curbits) & 1))
|
||||||
is_right = (m_cache >> m_curbits) & 1;
|
|
||||||
|
|
||||||
if (0 != is_right)
|
|
||||||
idx = rhs[idx];
|
idx = rhs[idx];
|
||||||
else
|
else
|
||||||
idx = lhs[idx];
|
idx = lhs[idx];
|
||||||
|
|||||||
Reference in New Issue
Block a user