Epidemiologic system adaptation
This commit is contained in:
parent
628682b57a
commit
53ba4ad842
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue