From cfde830b98e235cd2b5a72dca68160c2c1ff3b68 Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Thu, 14 May 2026 21:19:36 -0400 Subject: fix image clipping on the left and top of screen Previously, texture coordinates would not be correctly calculated because the clamped draw positions were used to decide texture coordinates, instead of the intended draw position. --- dc/dc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'dc') diff --git a/dc/dc.c b/dc/dc.c index a654fbe..a532f0a 100644 --- a/dc/dc.c +++ b/dc/dc.c @@ -33,6 +33,18 @@ void tick(void) ) ); + ty_draw_image_ex( + img, + ty_recti( + 0, 0, + img.width, img.height + ), + ty_recti( + sin(-ty_get_time()) * 50, SCREEN_HEIGHT / 2, + 32, 64 + ) + ); + ty_draw_image_rot( img, ty_vec2i(SCREEN_WIDTH/2, SCREEN_HEIGHT/2), -- cgit v1.3-2-g0d8e