aboutsummaryrefslogtreecommitdiff
path: root/teensy/teensy_renderer.c
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-05-27 16:34:31 -0400
committeriamcheeseman <[email protected]>2026-05-27 16:34:31 -0400
commita875e0155ec7757c7b487bee0b4a8fbfa8574888 (patch)
treee35b5384478371a8708e6adeeb4f49201b618364 /teensy/teensy_renderer.c
parent9d997b496f9d475c6e08e33f9aa2555612c8f87b (diff)
build for w*ndows
Diffstat (limited to 'teensy/teensy_renderer.c')
-rw-r--r--teensy/teensy_renderer.c8
1 files changed, 4 insertions, 4 deletions
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;