From f051066bc451479a0c2ff44e2554941628a62f6a Mon Sep 17 00:00:00 2001 From: smatz Date: Wed, 24 Feb 2010 14:46:15 +0000 Subject: (svn r19224) -Codechange: change parameters passed to ShowErrorMessage() a bit --- src/heightmap.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/heightmap.cpp') diff --git a/src/heightmap.cpp b/src/heightmap.cpp index 68a1ecffb..9b72a873f 100644 --- a/src/heightmap.cpp +++ b/src/heightmap.cpp @@ -107,20 +107,20 @@ static bool ReadHeightmapPNG(char *filename, uint *x, uint *y, byte **map) fp = FioFOpenFile(filename, "rb"); if (fp == NULL) { - ShowErrorMessage(STR_ERROR_PNGMAP, STR_ERROR_PNGMAP_FILE_NOT_FOUND, 0, 0); + ShowErrorMessage(STR_ERROR_PNGMAP, STR_ERROR_PNGMAP_FILE_NOT_FOUND, WL_ERROR); return false; } png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (png_ptr == NULL) { - ShowErrorMessage(STR_ERROR_PNGMAP, STR_ERROR_PNGMAP_MISC, 0, 0); + ShowErrorMessage(STR_ERROR_PNGMAP, STR_ERROR_PNGMAP_MISC, WL_ERROR); fclose(fp); return false; } info_ptr = png_create_info_struct(png_ptr); if (info_ptr == NULL || setjmp(png_jmpbuf(png_ptr))) { - ShowErrorMessage(STR_ERROR_PNGMAP, STR_ERROR_PNGMAP_MISC, 0, 0); + ShowErrorMessage(STR_ERROR_PNGMAP, STR_ERROR_PNGMAP_MISC, WL_ERROR); fclose(fp); png_destroy_read_struct(&png_ptr, &info_ptr, NULL); return false; @@ -136,7 +136,7 @@ static bool ReadHeightmapPNG(char *filename, uint *x, uint *y, byte **map) /* Maps of wrong colour-depth are not used. * (this should have been taken care of by stripping alpha and 16-bit samples on load) */ if ((png_get_channels(png_ptr, info_ptr) != 1) && (png_get_channels(png_ptr, info_ptr) != 3) && (png_get_bit_depth(png_ptr, info_ptr) != 8)) { - ShowErrorMessage(STR_ERROR_PNGMAP, STR_ERROR_PNGMAP_IMAGE_TYPE, 0, 0); + ShowErrorMessage(STR_ERROR_PNGMAP, STR_ERROR_PNGMAP_IMAGE_TYPE, WL_ERROR); fclose(fp); png_destroy_read_struct(&png_ptr, &info_ptr, NULL); return false; @@ -230,14 +230,14 @@ static bool ReadHeightmapBMP(char *filename, uint *x, uint *y, byte **map) f = FioFOpenFile(filename, "rb"); if (f == NULL) { - ShowErrorMessage(STR_ERROR_BMPMAP, STR_ERROR_PNGMAP_FILE_NOT_FOUND, 0, 0); + ShowErrorMessage(STR_ERROR_BMPMAP, STR_ERROR_PNGMAP_FILE_NOT_FOUND, WL_ERROR); return false; } BmpInitializeBuffer(&buffer, f); if (!BmpReadHeader(&buffer, &info, &data)) { - ShowErrorMessage(STR_ERROR_BMPMAP, STR_ERROR_BMPMAP_IMAGE_TYPE, 0, 0); + ShowErrorMessage(STR_ERROR_BMPMAP, STR_ERROR_BMPMAP_IMAGE_TYPE, WL_ERROR); fclose(f); BmpDestroyData(&data); return false; @@ -245,7 +245,7 @@ static bool ReadHeightmapBMP(char *filename, uint *x, uint *y, byte **map) if (map != NULL) { if (!BmpReadBitmap(&buffer, &info, &data)) { - ShowErrorMessage(STR_ERROR_BMPMAP, STR_ERROR_BMPMAP_IMAGE_TYPE, 0, 0); + ShowErrorMessage(STR_ERROR_BMPMAP, STR_ERROR_BMPMAP_IMAGE_TYPE, WL_ERROR); fclose(f); BmpDestroyData(&data); return false; -- cgit v1.2.3-54-g00ecf