diff --git a/src/drawing/sprite.c b/src/drawing/sprite.c index b9e0c2f391..28529b1038 100644 --- a/src/drawing/sprite.c +++ b/src/drawing/sprite.c @@ -265,7 +265,7 @@ void gfx_rle_sprite_to_buffer(uint8* source_bits_pointer, uint8* dest_bits_point uint8* next_source_pointer; uint8* next_dest_pointer = dest_bits_pointer; - int line_width = (dpi->width / zoom_amount) + dpi->pitch; + int line_width = (dpi->width >> zoom_level) + dpi->pitch; if (source_y_start < 0){ source_y_start += zoom_amount; @@ -311,7 +311,7 @@ void gfx_rle_sprite_to_buffer(uint8* source_bits_pointer, uint8* dest_bits_point if (x_start > 0){ //Since the start is positive //We need to move the drawing surface to the correct position - dest_pointer += x_start / zoom_amount; + dest_pointer += x_start >> zoom_level; } else{ //If the start is negative we require to remove part of the image.