mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Bit shifting
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user