From 5d7fea8d66a5b9fdb29a74ee17d82ae7193134ce Mon Sep 17 00:00:00 2001 From: Tituya Date: Sat, 17 Jul 2021 19:36:45 +0200 Subject: [PATCH] update color + align text --- src/core.c | 4 ++-- src/display_engine.c | 9 +++------ src/mutation_engine.c | 6 +++--- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/core.c b/src/core.c index 3fd433d..e77469e 100644 --- a/src/core.c +++ b/src/core.c @@ -64,7 +64,7 @@ int next_frame(struct game *current_game, int *vaccine) current_game->time = 0; // Display message on research - if (!current_game->research && current_game->priority) message("LA RECHERCHE CONTRE VOTRE VIRUS COMMENCE !"); + if (!current_game->research && current_game->priority) message("LA RECHERCHE CONTRE VOTRE VIRUS COMMENCE !"); else if (!*vaccine && (current_game->research == current_game->limit)) {*vaccine = 1; message("LE VACCIN EST TERMINE."); } // Update the game @@ -80,7 +80,7 @@ int next_frame(struct game *current_game, int *vaccine) if (!current_game->humans[1]) { - if (current_game->humans[3] < 4 * (current_game->humans[0] + current_game->humans[2])) message("VOUS AVEZ PERDU."); + if (current_game->humans[3] < 4 * (current_game->humans[0] + current_game->humans[2])) message("VOUS AVEZ PERDU."); else message("VOUS AVEZ GAGNE !"); return 0; } diff --git a/src/display_engine.c b/src/display_engine.c index 50b67b3..9672bfb 100644 --- a/src/display_engine.c +++ b/src/display_engine.c @@ -53,7 +53,7 @@ void display_foreground(const int background, const struct game *current_game, c { if (current_game->grid.data[i + j * current_game->grid.width] == 1 && world[j][i] != 0) dpixel(i, j, C_RED); if (current_game->grid.data[i + j * current_game->grid.width] == 3 && world[j][i] != 0) dpixel(i, j, C_BLACK); - if (current_game->grid.data[i + j * current_game->grid.width] == 2 && world[j][i] != 0) dpixel(i, j, C_GREEN); + if (current_game->grid.data[i + j * current_game->grid.width] == 2 && world[j][i] != 0) dpixel(i, j, C_RGB(0,255,255)); } } @@ -67,10 +67,7 @@ void display_foreground(const int background, const struct game *current_game, c int length = 77 * current_game->research / current_game->limit; dprint(30, 200, C_WHITE, "%d", current_game->dna); - dline(86, 200, 86 + length, 200, C_BLACK); - dline(86, 201, 86 + length, 201, C_BLACK); - dline(86, 202, 86 + length, 202, C_BLACK); - dline(86, 203, 86 + length, 203, C_BLACK); + drect(86, 200, 86 + length, 203, C_RGB(0,255,255)); // Stats bar for (int i = 0; i < 4; i ++) @@ -85,7 +82,7 @@ void display_foreground(const int background, const struct game *current_game, c color = C_RED; break; case 2: - color = C_GREEN; + color = C_RGB(0,255,255); break; case 3: color = C_BLACK; diff --git a/src/mutation_engine.c b/src/mutation_engine.c index bd98dd1..fb8fb30 100644 --- a/src/mutation_engine.c +++ b/src/mutation_engine.c @@ -138,9 +138,9 @@ void mutation_buy(struct game *current_game, const struct cursor c, const int mu update_disease(current_game); current_game->priority += ceil((mutation_data->severity + mutation_data->lethality) / 10); current_game->limit += mutation_data->changement; - message("MUTATION ACHETEE"); + message("MUTATION ACHETEE"); } - else message("ACHAT IMPOSSIBLE"); + else message("ACHAT IMPOSSIBLE"); } // if the player has already bought this mutation @@ -148,7 +148,7 @@ void mutation_buy(struct game *current_game, const struct cursor c, const int mu { current_game->mutations_selected[mutation_menu - 1] = id; update_disease(current_game); - message("MUTATION SELECTIONNEE"); + message("MUTATION SELECTIONNEE"); } } }