diff options
Diffstat (limited to 'src/util')
| -rw-r--r-- | src/util/color_palette.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/util/color_palette.c b/src/util/color_palette.c index d386858..fc26a10 100644 --- a/src/util/color_palette.c +++ b/src/util/color_palette.c @@ -49,7 +49,7 @@ bool camu_color_palette_init(str *path) json_t *root = json_loadb(buffer.data, buffer.length, 0, &error); al_str_free(&buffer); if (!root) { - error("Failed to load %.*s as a json (%s).", al_str_x(path), error.text); + log_error("Failed to load %.*s as a json (%s).", al_str_x(path), error.text); return false; } @@ -57,14 +57,14 @@ bool camu_color_palette_init(str *path) json_t *special = json_object_get(root, "special"); if (!special) { - error("\"special\" field missing from the color palette."); + log_error("\"special\" field missing from the color palette."); parsed = false; goto out; } json_t *colors = json_object_get(root, "colors"); if (!colors) { - error("\"colors\" field missing from the color palette."); + log_error("\"colors\" field missing from the color palette."); parsed = false; goto out; } @@ -78,7 +78,7 @@ bool camu_color_palette_init(str *path) for (u32 i = 0; i < ARRAY_SIZE(special_colors); i++) { object = json_object_get(special, special_colors[i]); if (!object) { - error("Couldn't find special color: %s.", special_colors[i]); + log_error("Couldn't find special color: %s.", special_colors[i]); return false; } color = json_string_value(object); @@ -87,14 +87,14 @@ bool camu_color_palette_init(str *path) if (!to_long_error) { global_color_palette.colors[i] = value; } else { - warn("%s is not a valid hex color.", normal_colors[i]); + log_warn("%s is not a valid hex color.", normal_colors[i]); } } for (u32 i = 0; i < ARRAY_SIZE(normal_colors); i++) { object = json_object_get(colors, normal_colors[i]); if (!object) { - error("Couldn't find color: %s.", normal_colors[i]); + log_error("Couldn't find color: %s.", normal_colors[i]); return false; } color = json_string_value(object); @@ -103,7 +103,7 @@ bool camu_color_palette_init(str *path) if (!to_long_error) { global_color_palette.colors[i + 2] = value; } else { - warn("%s is not a valid hex color.", normal_colors[i]); + log_warn("%s is not a valid hex color.", normal_colors[i]); } } |