MCPcopy Create free account
hub / github.com/NetHack/NetHack / init_decoder

Function init_decoder

win/share/giftiles.c:311–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311static void
312init_decoder(struct Bitstream *gif, unsigned bit_width)
313{
314 unsigned i;
315 unsigned clear;
316
317 gif->bits = 0;
318 gif->num_bits = 0;
319 gif->initial_bit_width = bit_width;
320 gif->block_size = 0;
321
322 clear = 1 << bit_width;
323 gif->dict_size = clear + 2;
324 for (i = 0; i < clear; ++i) {
325 gif->dictionary[i].byte = i;
326 gif->dictionary[i].next = 0xFFFF;
327 }
328
329 gif->str_size = 0;
330
331 reset_decoder(gif);
332}
333
334static void
335reset_decoder(struct Bitstream *gif)

Callers 1

read_gif_tilesFunction · 0.85

Calls 1

reset_decoderFunction · 0.85

Tested by

no test coverage detected