From 4a68e0c6c7606498b2d5d034f95b3a706ea31d10 Mon Sep 17 00:00:00 2001 From: jacob Date: Fri, 15 Mar 2024 23:16:54 -0500 Subject: [PATCH] begin aspect ratio work --- src/config.h | 2 +- src/game.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.h b/src/config.h index bf6d41e7..f84f8db1 100644 --- a/src/config.h +++ b/src/config.h @@ -8,7 +8,7 @@ #define ASPECT_RATIO (16.0 / 9.0) #define PIXELS_PER_UNIT 256 -#define GAME_FPS 30 +#define GAME_FPS 50 #define GAME_TIMESCALE 1 #define USER_FRAME_LIMIT 300 diff --git a/src/game.c b/src/game.c index 9b970ccb..7d13a81f 100644 --- a/src/game.c +++ b/src/game.c @@ -474,7 +474,7 @@ INTERNAL void game_update(void) #else /* "Look" style camera */ f32 ratio_y = 0.33f; - f32 ratio_x = 0.33f; + f32 ratio_x = ratio_y / (f32)ASPECT_RATIO; struct v2 camera_focus_dir = v2_mul_v2(follow->player_aim, V2(ratio_x, ratio_y)); struct v2 camera_focus_pos = v2_add(follow->world_xform.og, camera_focus_dir); ent->camera_target_xform.og = camera_focus_pos;