Variable size region support, by RevolutionSmythe

This commit is contained in:
Siana Gearz
2011-08-03 17:40:06 +02:00
parent 393ee9d3eb
commit d255bfa6f7
24 changed files with 155 additions and 49 deletions

View File

@@ -235,7 +235,7 @@ void decode_patch_group_header(LLBitPack &bitpack, LLGroupHeader *gopp)
gPatchSize = gopp->patch_size;
}
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph)
void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph, BOOL b_large_patch)
{
U8 retvalu8;
@@ -274,15 +274,18 @@ void decode_patch_header(LLBitPack &bitpack, LLPatchHeader *ph)
#endif
ph->range = retvalu16;
retvalu16 = 0;
retvalu32 = 0;
#ifdef LL_BIG_ENDIAN
ret = (U8 *)&retvalu16;
bitpack.bitUnpack(&(ret[1]), 8);
bitpack.bitUnpack(&(ret[0]), 2);
#else
bitpack.bitUnpack((U8 *)&retvalu16, 10);
if (b_large_patch)
bitpack.bitUnpack((U8 *)&retvalu32, 32);
else
bitpack.bitUnpack((U8 *)&retvalu32, 10);
#endif
ph->patchids = retvalu16;
ph->patchids = retvalu32;
gWordBits = (ph->quant_wbits & 0xf) + 2;
}