formatting and license

This commit is contained in:
YamaArashi committed 2015-11-13 22:44:23 -08:00
1 parent fa863b11b6
commit 8d0d89c00c
7 files changed
+61 -20

No files matched your search

+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);