| 207 | return 0; |
| 208 | } |
| 209 | int |
| 210 | ReadPlanarTileFile_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 |