commit 63f4e71b1602d23cb6136151d88a7246a210cb84
parent 24ed6c2acdb8e14e18659320e83d115631c97f39
Author: Matsuda Kenji <info@mtkn.jp>
Date: Sun, 8 Jan 2023 13:22:38 +0900
change scroll margin
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ex9/main.c b/ex9/main.c
@@ -195,7 +195,7 @@ game_play(void)
}
// scrolling
- int scroll_margin = 200;
+ int scroll_margin = WIN_WIDTH * 2 / 5;
if (player->p.x - scroll_dst > WIN_WIDTH - scroll_margin) {
scroll_dst = player->p.x - WIN_WIDTH + scroll_margin;
if (scroll_dst > WORLD_WIDTH * BLOCK_SIZE - WIN_WIDTH)