From a875e0155ec7757c7b487bee0b4a8fbfa8574888 Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Wed, 27 May 2026 16:34:31 -0400 Subject: build for w*ndows --- teensy/teensy_renderer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'teensy/teensy_renderer.c') diff --git a/teensy/teensy_renderer.c b/teensy/teensy_renderer.c index 564718a..863fa25 100644 --- a/teensy/teensy_renderer.c +++ b/teensy/teensy_renderer.c @@ -227,8 +227,8 @@ void ty_draw_image_rot( double s = sin(-rot); double c = cos(-rot); - int blit_width = ceil(img.width * fabs(c) + img.height * fabs(s)); - int blit_height = ceil(img.width * fabs(s) + img.height * fabs(c)); + int blit_width = (int)ceil(img.width * fabs(c) + img.height * fabs(s)); + int blit_height = (int)ceil(img.width * fabs(s) + img.height * fabs(c)); int startx = -blit_width / 2; int starty = -blit_height / 2; @@ -237,8 +237,8 @@ void ty_draw_image_rot( for (int img_y = starty; img_y < endy; img_y++) { for (int img_x = startx; img_x < endx; img_x++) { - int dx = floor(img_x * c - img_y * s - offset.x); - int dy = floor(img_x * s + img_y * c - offset.y); + int dx = (int)floor(img_x * c - img_y * s - offset.x); + int dy = (int)floor(img_x * s + img_y * c - offset.y); if (dx < 0 || dx >= img.width || dy < 0 || dy >= img.height) continue; -- cgit v1.3-2-g0d8e