mirror of
https://github.com/red031000/nitrogfx.git
synced 2025-06-18 21:25:38 -04:00
brace style
This commit is contained in:
parent
36d24cac79
commit
616bfba6f5
6
gfx.c
6
gfx.c
@ -719,11 +719,9 @@ void ReadNtrPalette(char *path, struct Palette *palette, int bitdepth, int palIn
|
||||
bitdepth = bitdepth ? bitdepth : palette->bitDepth;
|
||||
|
||||
size_t paletteSize = (paletteHeader[0x10]) | (paletteHeader[0x11] << 8) | (paletteHeader[0x12] << 16) | (paletteHeader[0x13] << 24);
|
||||
if (palIndex == 0)
|
||||
{
|
||||
if (palIndex == 0) {
|
||||
palette->numColors = paletteSize / 2;
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
palette->numColors = bitdepth == 4 ? 16 : 256; //remove header and divide by 2
|
||||
--palIndex;
|
||||
}
|
||||
|
3
main.c
3
main.c
@ -463,8 +463,7 @@ void HandlePngToNtrCommand(char *inputPath, char *outputPath, int argc, char **a
|
||||
if (options.colsPerChunk < 1)
|
||||
FATAL_ERROR("columns per chunk must be positive.\n");
|
||||
}
|
||||
else if (strcmp(option, "-mheight") == 0 || strcmp(option, "-rpc") == 0)
|
||||
{
|
||||
else if (strcmp(option, "-mheight") == 0 || strcmp(option, "-rpc") == 0) {
|
||||
if (i + 1 >= argc)
|
||||
FATAL_ERROR("No rows per chunk value following \"%s\".\n", option);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user