diff options
author | rubidium <rubidium@openttd.org> | 2009-03-04 09:53:31 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-03-04 09:53:31 +0000 |
commit | 0d8da02ec1ec610931c2fdbe05a29e7ee3a49144 (patch) | |
tree | 9a2c02d0b0de1ad7374ee64afe0beadcb8f2b21f /src/heightmap.cpp | |
parent | f0de54bc10d158bbb1ae58b628c0896a56880540 (diff) | |
download | openttd-0d8da02ec1ec610931c2fdbe05a29e7ee3a49144.tar.xz |
(svn r15610) -Change: allow loading of heightmaps and savegames (any form) that are in .tar files
Diffstat (limited to 'src/heightmap.cpp')
-rw-r--r-- | src/heightmap.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/heightmap.cpp b/src/heightmap.cpp index b690438d4..36e962dde 100644 --- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -12,6 +12,7 @@ #include "gfx_func.h" #include "fios.h" #include "settings_type.h" +#include "fileio_func.h" #include "table/strings.h" @@ -98,7 +99,7 @@ static bool ReadHeightmapPNG(char *filename, uint *x, uint *y, byte **map) png_structp png_ptr = NULL; png_infop info_ptr = NULL; - fp = fopen(filename, "rb"); + fp = FioFOpenFile(filename, "rb"); if (fp == NULL) { ShowErrorMessage(STR_PNGMAP_ERR_FILE_NOT_FOUND, STR_PNGMAP_ERROR, 0, 0); return false; @@ -221,7 +222,7 @@ static bool ReadHeightmapBMP(char *filename, uint *x, uint *y, byte **map) /* Init BmpData */ memset(&data, 0, sizeof(data)); - f = fopen(filename, "rb"); + f = FioFOpenFile(filename, "rb"); if (f == NULL) { ShowErrorMessage(STR_PNGMAP_ERR_FILE_NOT_FOUND, STR_BMPMAP_ERROR, 0, 0); return false; |