From 53ba4ad842692c995381a71fe0e69a9de8553b63 Mon Sep 17 00:00:00 2001 From: Shadow15510 Date: Fri, 2 Jul 2021 18:01:28 +0200 Subject: [PATCH] Epidemiologic system adaptation --- src/display_engine.c | 4 ++-- src/epidemic_engine.c | 4 ++-- src/main.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/display_engine.c b/src/display_engine.c index e3ab99f..b6afbdc 100644 --- a/src/display_engine.c +++ b/src/display_engine.c @@ -43,7 +43,7 @@ void display_foreground(const int background, const struct game *current_game, c extern const bopti_image_t img_mutations; extern const bopti_image_t img_planes; extern const bopti_image_t img_dna; - extern const uint8_t world[64][128]; + extern const uint8_t world[184][396]; GUNUSED int length; @@ -63,7 +63,7 @@ void display_foreground(const int background, const struct game *current_game, c // Planes animations for (int i = 0; current_game->planes[i]; i++) { - if (current_game->planes[i]->y + 8 < 216) dsubimage(current_game->planes[i]->x - 4, current_game->planes[i]->y - 4, &img_planes, 0, 8 * (current_game->planes[i]->direction - 1), 8, 8, DIMAGE_NONE); + if (current_game->planes[i]->y + 8 < 184) dsubimage(current_game->planes[i]->x - 4, current_game->planes[i]->y - 4, &img_planes, 0, 8 * (current_game->planes[i]->direction - 1), 8, 8, DIMAGE_NONE); } // Animated DNA diff --git a/src/epidemic_engine.c b/src/epidemic_engine.c index abb77b6..4e509e2 100644 --- a/src/epidemic_engine.c +++ b/src/epidemic_engine.c @@ -13,7 +13,7 @@ int grid_get(const struct grid epidemic_grid, const int i, const int j) bool can_become_infected(const struct grid epidemic_grid, const int mutations_selected[3], const int i, const int j) { - extern const uint8_t world[64][128]; + extern const uint8_t world[184][396]; // In case of water, low or high temperature if (world[j][i] == 0 && mutations_selected[2] != 3 && mutations_selected[2] != 4 && mutations_selected[2] != 6) return false; @@ -33,7 +33,7 @@ bool bernoulli(const int p) void epidemic_simulation(struct game *current_game) { - extern const uint8_t world[64][128]; + extern const uint8_t world[184][396]; srand(current_game->total_time); diff --git a/src/main.c b/src/main.c index 65472cf..0436c5b 100644 --- a/src/main.c +++ b/src/main.c @@ -67,7 +67,7 @@ int main(void) .planes = {&plane_1, &plane_2, &plane_3, &plane_4, &plane_5, NULL}, - .grid = {224, 396, NULL}, + .grid = {184, 396, NULL}, }; // Allocate memory @@ -111,7 +111,7 @@ static void title_screen(void) dclear(C_BLACK); dsubimage(0, 0, &img_title, 0, 0, DWIDTH, DHEIGHT, DIMAGE_NONE); - dprint_opt(32, 120, C_BLACK, C_WHITE, 0, 0, "VERSION %s", VERSION, -1); + dprint_opt(32, 120, C_BLACK, C_NONE, 0, 0, "VERSION %s", VERSION, -1); dupdate(); sleep_ms(1000); @@ -125,7 +125,7 @@ static void title_screen(void) } sleep_ms(120); - for (int times = 0; times < 5; times ++) + for (int times = 0; times < 3; times ++) { dsubimage(0, 0, &img_title, 0, DHEIGHT, DWIDTH, DHEIGHT, DIMAGE_NONE); dupdate();