diff options
author | YamaArashi <shadow962@live.com> | 2015-11-13 22:44:23 -0800 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2015-11-13 22:44:23 -0800 |
commit | 8d0d89c00c870411ff2d96cb3ff882f4410f100f (patch) | |
tree | 39b65e72b4d74d458f34976011b79370fd2e1461 /tools/gbagfx/gfx.c | |
parent | fa863b11b64c973f60207de8e3384690a510530c (diff) |
formatting and license
Diffstat (limited to 'tools/gbagfx/gfx.c')
-rw-r--r-- | tools/gbagfx/gfx.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/gbagfx/gfx.c b/tools/gbagfx/gfx.c index 71459c607..c09c4238e 100644 --- a/tools/gbagfx/gfx.c +++ b/tools/gbagfx/gfx.c @@ -253,13 +253,10 @@ void WriteImage(char *path, int numTiles, int bitDepth, struct Image *image, boo int maxNumTiles = tilesWidth * tilesHeight; - if (numTiles == 0) { + if (numTiles == 0) numTiles = maxNumTiles; - } else { - if (numTiles > maxNumTiles) { - FATAL_ERROR("The specified number of tiles (%d) is greater than the maximum possible value (%d).\n", numTiles, maxNumTiles); - } - } + else if (numTiles > maxNumTiles) + FATAL_ERROR("The specified number of tiles (%d) is greater than the maximum possible value (%d).\n", numTiles, maxNumTiles); int bufferSize = numTiles * tileSize; unsigned char *buffer = malloc(bufferSize); |