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
8
gfx.c
8
gfx.c
@ -719,11 +719,9 @@ void ReadNtrPalette(char *path, struct Palette *palette, int bitdepth, int palIn
|
|||||||
bitdepth = bitdepth ? bitdepth : palette->bitDepth;
|
bitdepth = bitdepth ? bitdepth : palette->bitDepth;
|
||||||
|
|
||||||
size_t paletteSize = (paletteHeader[0x10]) | (paletteHeader[0x11] << 8) | (paletteHeader[0x12] << 16) | (paletteHeader[0x13] << 24);
|
size_t paletteSize = (paletteHeader[0x10]) | (paletteHeader[0x11] << 8) | (paletteHeader[0x12] << 16) | (paletteHeader[0x13] << 24);
|
||||||
if (palIndex == 0)
|
if (palIndex == 0) {
|
||||||
{
|
|
||||||
palette->numColors = paletteSize / 2;
|
palette->numColors = paletteSize / 2;
|
||||||
} else
|
} else {
|
||||||
{
|
|
||||||
palette->numColors = bitdepth == 4 ? 16 : 256; //remove header and divide by 2
|
palette->numColors = bitdepth == 4 ? 16 : 256; //remove header and divide by 2
|
||||||
--palIndex;
|
--palIndex;
|
||||||
}
|
}
|
||||||
@ -1361,7 +1359,7 @@ void ReadNtrAnimation(char *path, struct JsonToAnimationOptions *options)
|
|||||||
{
|
{
|
||||||
options->animationResults[i] = malloc(sizeof(struct AnimationResults));
|
options->animationResults[i] = malloc(sizeof(struct AnimationResults));
|
||||||
}
|
}
|
||||||
|
|
||||||
int resultOffset = 0;
|
int resultOffset = 0;
|
||||||
for (int i = 0; i < options->resultCount; i++)
|
for (int i = 0; i < options->resultCount; i++)
|
||||||
{
|
{
|
||||||
|
3
main.c
3
main.c
@ -463,8 +463,7 @@ void HandlePngToNtrCommand(char *inputPath, char *outputPath, int argc, char **a
|
|||||||
if (options.colsPerChunk < 1)
|
if (options.colsPerChunk < 1)
|
||||||
FATAL_ERROR("columns per chunk must be positive.\n");
|
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)
|
if (i + 1 >= argc)
|
||||||
FATAL_ERROR("No rows per chunk value following \"%s\".\n", option);
|
FATAL_ERROR("No rows per chunk value following \"%s\".\n", option);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user