diff options
| author | iamcheeseman <[hidden email]> | 2026-01-15 17:12:31 -0500 |
|---|---|---|
| committer | iamcheeseman <[hidden email]> | 2026-01-15 17:12:31 -0500 |
| commit | 012a78995d9e360de1d931943b34f21d4f4a85af (patch) | |
| tree | 4b577303cd1f281bd02666c91608c7a82e6c0bcd /src/main.odin | |
| parent | ef550acd2edb48b80bb9c597ad0ebd46b2432107 (diff) | |
Make minor fixes
Diffstat (limited to 'src/main.odin')
| -rw-r--r-- | src/main.odin | 18 |
1 files changed, 11 insertions, 7 deletions
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, ) |
