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

Function ReadPackedTileFile

sys/msdos/pctiles.c:235–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233
234#ifdef PACKED_FILE
235int
236ReadPackedTileFile(int tilenum, char (*pta)[TILE_X])
237{
238 long fpos;
239
240 fpos =
241 ((long) (tilenum) * (long) (TILE_Y * TILE_X) + (long) TIBHEADER_SIZE);
242 if (fseek(tilefile, fpos, SEEK_SET)) {
243 return 1;
244 } else {
245 fread(pta, (TILE_Y * TILE_X), 1, tilefile);
246 }
247 return 0;
248}
249#endif
250#endif /* TILES_IN_GLYPHMAP */
251

Callers

nothing calls this directly

Calls 2

fseekFunction · 0.85
freadFunction · 0.85

Tested by

no test coverage detected