| 186 | */ |
| 187 | #ifdef PLANAR_FILE |
| 188 | int |
| 189 | ReadPlanarTileFile(int tilenum, struct planar_cell_struct **gp) |
| 190 | { |
| 191 | long fpos; |
| 192 | |
| 193 | #ifdef TILES_IN_RAM |
| 194 | if (tiles_in_ram) { |
| 195 | *gp = ramtiles + tilenum; |
| 196 | return 0; |
| 197 | } |
| 198 | #endif |
| 199 | fpos = ((long) (tilenum) * (long) sizeof(struct planar_cell_struct)) |
| 200 | + (long) TIBHEADER_SIZE; |
| 201 | if (fseek(tilefile, fpos, SEEK_SET)) { |
| 202 | return 1; |
| 203 | } else { |
| 204 | fread(&plancell, sizeof(struct planar_cell_struct), 1, tilefile); |
| 205 | } |
| 206 | *gp = &plancell; |
| 207 | return 0; |
| 208 | } |
| 209 | int |
| 210 | ReadPlanarTileFile_O(int tilenum, struct overview_planar_cell_struct **gp) |
| 211 | { |