From b566cf20b57e0b427ce04bd7640b38d78eb5cf6d Mon Sep 17 00:00:00 2001 From: veclavtalica Date: Fri, 11 Oct 2024 19:27:41 +0300 Subject: [PATCH] fix bunnymark boundies --- apps/demos/bunnymark/game.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/demos/bunnymark/game.c b/apps/demos/bunnymark/game.c index 5385746..973e27c 100644 --- a/apps/demos/bunnymark/game.c +++ b/apps/demos/bunnymark/game.c @@ -81,10 +81,10 @@ void game_tick(void) state->bunnies[i].position.x += state->bunnies[i].speed.x; state->bunnies[i].position.y += state->bunnies[i].speed.y; - if (((state->bunnies[i].position.x + BUNNY_W / 2) > ctx.window_w) || + if (((state->bunnies[i].position.x + BUNNY_W / 2) > ctx.base_draw_w) || ((state->bunnies[i].position.x + BUNNY_W / 2) < 0)) state->bunnies[i].speed.x *= -1; - if (((state->bunnies[i].position.y + BUNNY_H / 2) > ctx.window_h) || + if (((state->bunnies[i].position.y + BUNNY_H / 2) > ctx.base_draw_h) || ((state->bunnies[i].position.y + BUNNY_H / 2 - 60) < 0)) state->bunnies[i].speed.y *= -1; }