From e28fe04c2208d9f3e2f3567239630c09893eb7de Mon Sep 17 00:00:00 2001 From: Lukas Nejezchleb Date: Wed, 5 May 2021 09:13:39 +0200 Subject: [PATCH] changed key maping and showed key to quit in main menu --- final_score.c | 4 ++-- menu_utilities.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/final_score.c b/final_score.c index 1db5e23..6a8a90b 100644 --- a/final_score.c +++ b/final_score.c @@ -20,14 +20,14 @@ bool draw_final_score(int score, fb_data *frame_buff, unsigned char *lcd_mem_base, font_descriptor_t *font) { char c = ' '; - while (c != 's' && c != 'q') + while (c != 's' && c != 't') { set_background(frame_buff, 0); draw_text_center(frame_buff, "SKORE", frame_buff->width / 2, frame_buff->height / 10, 3, font, 0xffff); char string_tmp[20]; snprintf(string_tmp, 20, "%d", score); draw_text_center(frame_buff, string_tmp, frame_buff->width / 2, frame_buff->height / 2, 4, font, 0xffff); - draw_text_center(frame_buff, "ZNOVU [s] KONEC [q]", frame_buff->width / 2, frame_buff->height - frame_buff->height / 10, 2, font, 0xffff); + draw_text_center(frame_buff, "ZNOVU [s] KONEC [t]", frame_buff->width / 2, frame_buff->height - frame_buff->height / 10, 2, font, 0xffff); // update display lcd_from_fb(frame_buff, lcd_mem_base); // scan input diff --git a/menu_utilities.c b/menu_utilities.c index 1908fd1..a81a14b 100644 --- a/menu_utilities.c +++ b/menu_utilities.c @@ -40,7 +40,7 @@ void run_init_game_menu(fb_data *frame_buff, unsigned char *lcd_mem_base, lcd_from_fb(frame_buff, lcd_mem_base); // listen symbol char read = ' '; - while (read != 's' && read != 'q') + while (read != 's' && read != 't') { // scan input pthread_mutex_lock(&mtx); @@ -63,7 +63,7 @@ void run_init_game_menu(fb_data *frame_buff, unsigned char *lcd_mem_base, draw_menu(frame_buff, font, game); lcd_from_fb(frame_buff, lcd_mem_base); } - if (read != 'q') + if (read != 't') { // run game int game_score = run_game(&game, &peripherals); @@ -89,7 +89,7 @@ void draw_menu(fb_data *frame_buff, font_descriptor_t *font, game_init_data_t ga draw_text_center(frame_buff, string_tmp, frame_buff->width / 2, HEIGHT_M / 2, 2, font, 0xffff); snprintf(string_tmp, 40, "pocet duchu: %d [g]", game_data.ghost_nr); draw_text_center(frame_buff, string_tmp, frame_buff->width / 2, HEIGHT_M / 2 + HEIGHT_M / 7, 2, font, 0xffff); - draw_text_center(frame_buff, "SPUSIT HRU: [s]", frame_buff->width / 2, HEIGHT_M - HEIGHT_M / 10, 2, font, 0xffff); + draw_text_center(frame_buff, "SPUSIT HRU: [s] KONEC HRY: [t]", frame_buff->width / 2, HEIGHT_M - HEIGHT_M / 10, 2, font, 0xffff); } game_init_data_t sub_menu_lives(fb_data *frame_buff, unsigned char *lcd_mem_base, font_descriptor_t *font, game_init_data_t game_data)