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

Function ReadTileFileHeader

sys/msdos/pctiles.c:56–67  ·  view source on GitHub ↗

* Read the header/palette information at the start of the * NetHack.tib file. * * There is 1024 bytes (1K) of header information * at the start of the file, including a palette. * */

Source from the content-addressed store, hash-verified

54 *
55 */
56int
57ReadTileFileHeader(struct tibhdr_struct *tibhdr, boolean filestyle)
58{
59 FILE *x;
60 x = filestyle ? tilefile_O : tilefile;
61 if (fseek(x, 0L, SEEK_SET)) {
62 return 1;
63 } else {
64 fread(tibhdr, sizeof(struct tibhdr_struct), 1, x);
65 }
66 return 0;
67}
68
69/*
70 * Open the requested tile file.

Callers

nothing calls this directly

Calls 2

fseekFunction · 0.85
freadFunction · 0.85

Tested by

no test coverage detected