summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2016-06-18 21:44:41 -0400
committeryenatch <yenatch@gmail.com>2016-06-18 21:44:41 -0400
commit9d069cf3d6826582df588841231c9f27db54e669 (patch)
tree1f71d1898be0e61a5eea61ec90836e06a5071b1a /tools
parent5ce142208ec376c237753473b59ec0d35272e8fd (diff)
parent32906c6d209005c7fe912d743a5bb8b8847d0c75 (diff)
Merge remote-tracking branch 'origin/master'
Conflicts: Makefile
Diffstat (limited to 'tools')
-rw-r--r--tools/gbagfx/Makefile2
-rw-r--r--tools/gbagfx/jasc_pal.c6
-rw-r--r--tools/preproc/Makefile2
-rw-r--r--tools/rsfont/Makefile2
4 files changed, 6 insertions, 6 deletions
diff --git a/tools/gbagfx/Makefile b/tools/gbagfx/Makefile
index e7f089445..3eb7f0b22 100644
--- a/tools/gbagfx/Makefile
+++ b/tools/gbagfx/Makefile
@@ -1,6 +1,6 @@
CC = gcc
-CFLAGS = -Wall -Wextra -std=c11 -O2
+CFLAGS = -Wall -Wextra -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK
LIBS = -lz -lpng
diff --git a/tools/gbagfx/jasc_pal.c b/tools/gbagfx/jasc_pal.c
index 02b6ed915..d003b7649 100644
--- a/tools/gbagfx/jasc_pal.c
+++ b/tools/gbagfx/jasc_pal.c
@@ -13,7 +13,7 @@
// "0100\r\n" (version; seems to always be "0100")
// "<NUMBER_OF_COLORS>\r\n" (number of colors in decimal)
//
-// 16 or 256 times (depending on above line):
+// <NUMBER_OF_COLORS> times:
// "<RED> <GREEN> <BLUE>\r\n" (color entry)
//
// Each color component is a decimal number from 0 to 255.
@@ -82,8 +82,8 @@ void ReadJascPalette(char *path, struct Palette *palette)
if (!ParseNumber(line, NULL, 10, &palette->numColors))
FATAL_ERROR("Failed to parse number of colors.\n");
- if (palette->numColors != 16 && palette->numColors != 256)
- FATAL_ERROR("%d is an invalid number of colors. The number of colors must be 16 or 256.\n", palette->numColors);
+ if (palette->numColors < 1 || palette->numColors > 256)
+ FATAL_ERROR("%d is an invalid number of colors. The number of colors must be in the range [1, 256].\n", palette->numColors);
for (int i = 0; i < palette->numColors; i++) {
ReadJascPaletteLine(fp, line);
diff --git a/tools/preproc/Makefile b/tools/preproc/Makefile
index 24f60e3f6..2d577c79f 100644
--- a/tools/preproc/Makefile
+++ b/tools/preproc/Makefile
@@ -1,6 +1,6 @@
CXX := g++
-CXXFLAGS := -std=c++14 -O2 -Wall -Wno-switch
+CXXFLAGS := -std=c++11 -O2 -Wall -Wno-switch
SRCS := asm_file.cpp c_file.cpp charmap.cpp preproc.cpp string_parser.cpp \
utf8.cpp
diff --git a/tools/rsfont/Makefile b/tools/rsfont/Makefile
index 78e0cab3a..9ad47cfcf 100644
--- a/tools/rsfont/Makefile
+++ b/tools/rsfont/Makefile
@@ -1,6 +1,6 @@
CC = gcc
-CFLAGS = -Wall -Wextra -std=c11 -O2
+CFLAGS = -Wall -Wextra -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK
LIBS = -lz -lpng