aboutsummaryrefslogtreecommitdiff
path: root/analyzer/render.c
diff options
context:
space:
mode:
Diffstat (limited to 'analyzer/render.c')
-rw-r--r--analyzer/render.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/analyzer/render.c b/analyzer/render.c
index cd4835d..e888b49 100644
--- a/analyzer/render.c
+++ b/analyzer/render.c
@@ -46,7 +46,13 @@ void print_enemy_list(DynArray enemies) {
EnemyResults *enemy = NULL;
while ((enemy = array_next(enemies, enemy))) {
char enemy_buffer[TABLE_LINE_WIDTH + 1];
- sprintf(enemy_buffer, "%s (%d)%s", enemy->name, enemy->level, array_next(enemies, enemy) ? ", " : "");
+ sprintf(
+ enemy_buffer,
+ "%s (%d)%s",
+ enemy->name,
+ enemy->level,
+ array_next(enemies, enemy) ? ", " : ""
+ );
// break line if length would be too big
if (line_length + utf8_strlen(enemy_buffer) > TABLE_LINE_WIDTH - TABLE_LINE_END_WIDTH) {
@@ -134,7 +140,11 @@ void print_player_rewards(FriendlyResults results) {
char *sep = array_next(results.items, item) ? ", " : "";
size_t item_len = utf8_strlen(item->data) + strlen(sep);
if (line_len + item_len > TABLE_ITEMS_WIDTH) {
- printf("%*s" TABLE_LINE_END "\n" TABLE_LINE_START, (int)(TABLE_ITEMS_WIDTH - line_len), "");
+ printf(
+ "%*s" TABLE_LINE_END "\n" TABLE_LINE_START,
+ (int)(TABLE_ITEMS_WIDTH - line_len),
+ ""
+ );
line_len = 0;
}
print_color(item->data, item_type_to_color(item->type));
@@ -203,7 +213,11 @@ void render_total_rewards(TotalRewards rewards) {
char *sep = array_next(rewards.items[i], item) ? ", " : "";
size_t item_len = utf8_strlen(*item) + strlen(sep);
if (line_len + item_len > TABLE_ITEMS_WIDTH) {
- printf("%*s" TABLE_LINE_END "\n" TABLE_LINE_START, (int)(TABLE_ITEMS_WIDTH - line_len), "");
+ printf(
+ "%*s" TABLE_LINE_END "\n" TABLE_LINE_START,
+ (int)(TABLE_ITEMS_WIDTH - line_len),
+ ""
+ );
line_len = 0;
}
print_color(*item, item_type_to_color(i));