formatting and license

This commit is contained in:
YamaArashi
2015-11-13 22:44:23 -08:00
parent fa863b11b6
commit 8d0d89c00c
7 changed files with 61 additions and 20 deletions
+3 -6
View File
@@ -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);