* 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. * */
| 54 | * |
| 55 | */ |
| 56 | int |
| 57 | ReadTileFileHeader(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. |