aboutsummaryrefslogtreecommitdiff
path: root/teensy/teensy_renderer.c
diff options
context:
space:
mode:
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;