brace style

This commit is contained in:
red031000 2024-03-11 02:08:22 +00:00
parent 36d24cac79
commit 616bfba6f5
No known key found for this signature in database
GPG Key ID: D27E50C050AE0CE1
2 changed files with 4 additions and 7 deletions

8
gfx.c
View File

@ -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;
}
@ -1361,7 +1359,7 @@ void ReadNtrAnimation(char *path, struct JsonToAnimationOptions *options)
{
options->animationResults[i] = malloc(sizeof(struct AnimationResults));
}
int resultOffset = 0;
for (int i = 0; i < options->resultCount; i++)
{

3
main.c
View File

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