MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / bit_advance

Function bit_advance

Source/Amiga/dernc.cpp:276–284  ·  view source on GitHub ↗

* Advances the bit stream. */

Source from the content-addressed store, hash-verified

274 * Advances the bit stream.
275 */
276static void bit_advance (bit_stream *bs, int n, unsigned char **p) {
277 bs->bitbuf >>= n;
278 bs->bitcount -= n;
279 if (bs->bitcount < 16) {
280 (*p) += 2;
281 bs->bitbuf |= (lword(*p)<<bs->bitcount);
282 bs->bitcount += 16;
283 }
284}
285
286/*
287 * Reads some bits in one go (ie the above two routines combined).

Callers 3

rnc_unpackFunction · 0.85
huf_readFunction · 0.85
bit_readFunction · 0.85

Calls 1

lwordFunction · 0.85

Tested by

no test coverage detected