update color + align text

This commit is contained in:
Tituya 2021-07-17 19:36:45 +02:00
parent 9db6780618
commit 5d7fea8d66
3 changed files with 8 additions and 11 deletions

View File

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

View File

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

View File

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