From 012a78995d9e360de1d931943b34f21d4f4a85af Mon Sep 17 00:00:00 2001 From: iamcheeseman <[hidden email]> Date: Thu, 15 Jan 2026 17:12:31 -0500 Subject: Make minor fixes --- src/main.odin | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/main.odin') diff --git a/src/main.odin b/src/main.odin index 8703a64..8bd1a77 100644 --- a/src/main.odin +++ b/src/main.odin @@ -20,6 +20,8 @@ Rect :: struct { size: Vec2, } +ROOM_FADE_SIZE :: 16 + state: struct { debug_mode: bool, camera_target: Vec2, @@ -79,7 +81,9 @@ frame :: proc() { draw_new_frame() - rl.BeginMode2D(state.camera) + cam := state.camera + cam.target = linalg.round(cam.target) + rl.BeginMode2D(cam) renderer.tint = {0.2, 0.2, 0.2, 1} draw_rect({ @@ -95,15 +99,15 @@ frame :: proc() { rl.DrawRectangleGradientH( 0, 0, - 8, + ROOM_FADE_SIZE, current_room.height, rl.BLACK, rl.BLANK, ) rl.DrawRectangleGradientH( - current_room.width - 8, + current_room.width - ROOM_FADE_SIZE, 0, - 8, + ROOM_FADE_SIZE, current_room.height, rl.BLANK, rl.BLACK, @@ -112,15 +116,15 @@ frame :: proc() { 0, 0, current_room.width, - 8, + ROOM_FADE_SIZE, rl.BLACK, rl.BLANK, ) rl.DrawRectangleGradientV( 0, - current_room.height - 8, + current_room.height - ROOM_FADE_SIZE, current_room.width, - 8, + ROOM_FADE_SIZE, rl.BLANK, rl.BLACK, ) -- cgit v1.3-2-g0d8e