diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-02-02 01:47:16 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-02-02 01:47:16 +0100 |
commit | 8db3a5b94f2a5d6728c62c7e76653f413f7a786d (patch) | |
tree | 46874d3bcc43b4bf85843cb93c16c551403fba5f | |
parent | 8c1629af42a10ff7e23bb40100a259bf334a9c60 (diff) | |
download | MinedMap-8db3a5b94f2a5d6728c62c7e76653f413f7a786d.tar MinedMap-8db3a5b94f2a5d6728c62c7e76653f413f7a786d.zip |
Use DIM constant as PNG dimension
-rw-r--r-- | src/MinedMap.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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++) |