(BinOpener.IsHierarchic): true

This commit is contained in:
morkt 2015-08-27 03:11:32 +04:00
parent c89104a8bb
commit 29b0658460

View File

@ -37,7 +37,7 @@ namespace GameRes.Formats.FVP
public override string Tag { get { return "FVP"; } } public override string Tag { get { return "FVP"; } }
public override string Description { get { return "FVP engine resource archive"; } } public override string Description { get { return "FVP engine resource archive"; } }
public override uint Signature { get { return 0x58504341; } } // "ACPX" public override uint Signature { get { return 0x58504341; } } // "ACPX"
public override bool IsHierarchic { get { return false; } } public override bool IsHierarchic { get { return true; } }
public override bool CanCreate { get { return false; } } public override bool CanCreate { get { return false; } }
public BinOpener () public BinOpener ()
@ -133,13 +133,12 @@ namespace GameRes.Formats.FVP
throw new EndOfStreamException ("Invalid compressed stream"); throw new EndOfStreamException ("Invalid compressed stream");
bits = (bits << 1) | 1; bits = (bits << 1) | 1;
} }
bool carry = 0 != (bits & 0x100); int next_bit = (bits >> 8) & 1;
hi = 0 != (eax & 0x80000000); hi = 0 != (eax & 0x80000000);
eax = (eax << 1) | (carry ? 1u : 0u); eax = (eax << 1) | (uint)next_bit;
} }
if (0x100 == (eax & 0xff00) && 2 >= (eax & 0xff)) if (0x100 == (eax & 0xff00) && 2 >= (eax & 0xff))
{ {
uint ecx = L0;
if (2 == (eax & 0xff)) if (2 == (eax & 0xff))
{ {
L0 = 0x800000; L0 = 0x800000;
@ -148,10 +147,9 @@ namespace GameRes.Formats.FVP
} }
if (0 == (eax & 0xff)) if (0 == (eax & 0xff))
break; break;
ecx >>= 1; L0 >>= 1;
if (0 != (ecx & 0xff00)) if (0 != (L0 & 0xff00))
throw new EndOfStreamException ("Invalid compressed stream"); throw new EndOfStreamException ("Invalid compressed stream");
L0 = ecx;
continue; continue;
} }
++edx; ++edx;