begin aspect ratio work
This commit is contained in:
parent
ba7769fba9
commit
4a68e0c6c7
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user