From a7cd45efbe1c69f4ac9e1993fe444efbaea8210d Mon Sep 17 00:00:00 2001 From: Massena Date: Thu, 7 Jan 2021 22:03:47 +0100 Subject: [PATCH 1/3] dust reset fix --- src/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.c b/src/main.c index aeee2b7..12708bb 100644 --- a/src/main.c +++ b/src/main.c @@ -311,6 +311,8 @@ int main(void) //spike collision and death if (collide_spike(player_x, player_y, level)) { + set_level(level_id, level); + DRAW_LEVEL(); player_x = start_x; player_y = start_y; polarity = 0; From f601494508a96dde473765614eeefaed552ca59c Mon Sep 17 00:00:00 2001 From: Massena Date: Mon, 11 Jan 2021 17:07:23 +0100 Subject: [PATCH 2/3] fixed timer cuz the dev didn't want to do his job --- src/draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/draw.c b/src/draw.c index bf4586f..a57ffc4 100644 --- a/src/draw.c +++ b/src/draw.c @@ -138,7 +138,7 @@ void erase_tile(int x, int y, char level[]) void draw_timer(unsigned int step) { - dprint(0, 0, C_WHITE, C_BLACK, "%u.%02u", (step*2)/FPS, (step*2)%FPS); + dprint_opt(0, 0, C_WHITE, C_BLACK, DTEXT_LEFT, DTEXT_TOP, "%u.%02u", (step*2)/FPS, (step*2)%FPS); } void just_breathe(unsigned int step) From 496b0597157b847b77444f7b09d2963cd3f0d8b3 Mon Sep 17 00:00:00 2001 From: Massena Date: Mon, 11 Jan 2021 17:42:47 +0100 Subject: [PATCH 3/3] fix of the fix (thanks to toutouille --- src/draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/draw.c b/src/draw.c index a57ffc4..807fe88 100644 --- a/src/draw.c +++ b/src/draw.c @@ -138,7 +138,8 @@ void erase_tile(int x, int y, char level[]) void draw_timer(unsigned int step) { - dprint_opt(0, 0, C_WHITE, C_BLACK, DTEXT_LEFT, DTEXT_TOP, "%u.%02u", (step*2)/FPS, (step*2)%FPS); + float stepfloat = step; + dprint_opt(0, 0, C_WHITE, C_BLACK, DTEXT_LEFT, DTEXT_TOP, "%.2j", (int)(stepfloat*2/FPS*100)); } void just_breathe(unsigned int step)