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

Function ReadPlanarTileFile_O

sys/msdos/pctiles.c:209–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207 return 0;
208}
209int
210ReadPlanarTileFile_O(int tilenum, struct overview_planar_cell_struct **gp)
211{
212 long fpos;
213
214#ifdef TILES_IN_RAM
215 if (otiles_in_ram) {
216 *gp = oramtiles + tilenum;
217 return 0;
218 }
219#endif
220 fpos =
221 ((long) (tilenum) * (long) sizeof(struct overview_planar_cell_struct))
222 + (long) TIBHEADER_SIZE;
223 if (fseek(tilefile_O, fpos, SEEK_SET)) {
224 return 1;
225 } else {
226 fread(&oplancell, sizeof(struct overview_planar_cell_struct), 1,
227 tilefile_O);
228 }
229 *gp = &oplancell;
230 return 0;
231}
232#endif
233
234#ifdef PACKED_FILE

Callers

nothing calls this directly

Calls 2

fseekFunction · 0.85
freadFunction · 0.85

Tested by

no test coverage detected