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

Function ReadTileStrip

win/share/gifread.c:495–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493}
494
495static void
496ReadTileStrip(FILE *fd, int len)
497{
498 int v;
499 int xpos = 0, ypos = 0;
500
501 while ((v = LWZReadByte(fd, FALSE /*, (int) input_code_size*/ )) >= 0) {
502 PPM_ASSIGN(image[ypos][xpos], ColorMap[CM_RED][v],
503 ColorMap[CM_GREEN][v], ColorMap[CM_BLUE][v]);
504
505 ++xpos;
506 if (xpos == len) {
507 xpos = 0;
508 ++ypos;
509 }
510 if (ypos >= TILE_Y)
511 break;
512 }
513}
514
515boolean
516fopen_gif_file(const char *filename, const char *type)

Callers 2

fopen_gif_fileFunction · 0.85
read_gif_tileFunction · 0.85

Calls 1

LWZReadByteFunction · 0.85

Tested by

no test coverage detected