fixed ShiinaRio YLZ decompression.

This commit is contained in:
morkt 2015-06-21 23:51:55 +04:00
parent fc411624df
commit dfc22f87bb
2 changed files with 6 additions and 4 deletions

View File

@ -310,6 +310,7 @@ namespace GameRes.Formats.ShiinaRio
bool GetCtlBit () bool GetCtlBit ()
{ {
bool bit = 0 != (m_ctl & m_mask);
m_mask >>= 1; m_mask >>= 1;
if (0 == m_mask) if (0 == m_mask)
{ {
@ -317,7 +318,6 @@ namespace GameRes.Formats.ShiinaRio
m_src += 4; m_src += 4;
m_mask = 0x80000000; m_mask = 0x80000000;
} }
bool bit = 0 != (m_ctl & m_mask);
return bit; return bit;
} }
@ -335,6 +335,7 @@ namespace GameRes.Formats.ShiinaRio
public void Unpack () public void Unpack ()
{ {
GetCtlBit();
int dst = 0; int dst = 0;
while (dst < m_output.Length) while (dst < m_output.Length)
{ {
@ -343,10 +344,11 @@ namespace GameRes.Formats.ShiinaRio
m_output[dst++] = m_input[m_src++]; m_output[dst++] = m_input[m_src++];
continue; continue;
} }
bool next_bit = GetCtlBit();
int offset = m_input[m_src++] | ~0xffff; int offset = m_input[m_src++] | ~0xffff;
int ah = 0xff; int ah = 0xff;
int count = 0; int count = 0;
if (GetCtlBit()) // 5e if (next_bit) // 5e
{ {
if (GetCtlBit()) // 10d if (GetCtlBit()) // 10d
{ {

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion ("1.0.7.66")] [assembly: AssemblyVersion ("1.0.7.67")]
[assembly: AssemblyFileVersion ("1.0.7.66")] [assembly: AssemblyFileVersion ("1.0.7.67")]