From 8db3a5b94f2a5d6728c62c7e76653f413f7a786d Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Mon, 2 Feb 2015 01:47:16 +0100 Subject: Use DIM constant as PNG dimension --- src/MinedMap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/MinedMap.cpp b/src/MinedMap.cpp index 3af634d..371e009 100644 --- a/src/MinedMap.cpp +++ b/src/MinedMap.cpp @@ -75,8 +75,8 @@ static void writePNG(const char *filename, const uint32_t data[DIM][DIM]) { png_init_io(png_ptr, f); - png_set_IHDR(png_ptr, info_ptr, World::Region::SIZE*World::Chunk::SIZE, World::Region::SIZE*World::Chunk::SIZE, - 8, PNG_COLOR_TYPE_RGB_ALPHA, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); + png_set_IHDR(png_ptr, info_ptr, DIM, DIM, 8, PNG_COLOR_TYPE_RGB_ALPHA, + PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); uint8_t *row_pointers[World::Region::SIZE*World::Chunk::SIZE]; for (size_t i = 0; i < World::Region::SIZE*World::Chunk::SIZE; i++) -- cgit v1.2.3