mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fixed zoom bug.
This commit is contained in:
parent
3aaa9ef965
commit
cd1f71708e
|
@ -1039,8 +1039,8 @@ void gfx_draw_sprite_palette_set(rct_drawpixelinfo *dpi, int image_id, int x, in
|
|||
if ( dpi->zoom_level && (g1_source->flags & (1<<4)) ){
|
||||
rct_drawpixelinfo zoomed_dpi = {
|
||||
.bits = dpi->bits,
|
||||
.x = ((uint16)dpi->x) >> 1,
|
||||
.y = ((uint16)dpi->y) >> 1,
|
||||
.x = dpi->x >> 1,
|
||||
.y = dpi->y >> 1,
|
||||
.height = dpi->height>>1,
|
||||
.width = dpi->width>>1,
|
||||
.pitch = dpi->pitch,
|
||||
|
@ -1059,7 +1059,7 @@ void gfx_draw_sprite_palette_set(rct_drawpixelinfo *dpi, int image_id, int x, in
|
|||
//This will be the height of the drawn image
|
||||
int height = g1_source->height >> zoom_level;
|
||||
//This is the start y coordinate on the destination
|
||||
sint16 dest_start_y = (y + g1_source->y_offset - (uint16)dpi->y) >> zoom_level;
|
||||
sint16 dest_start_y = ((sint16)y + g1_source->y_offset - dpi->y) >> zoom_level;
|
||||
//This is the start y coordinate on the source
|
||||
int source_start_y = 0;
|
||||
|
||||
|
@ -1094,7 +1094,7 @@ void gfx_draw_sprite_palette_set(rct_drawpixelinfo *dpi, int image_id, int x, in
|
|||
//This is the source start x coordinate
|
||||
int source_start_x = 0;
|
||||
//This is the destination start x coordinate
|
||||
sint16 dest_start_x = (x + g1_source->x_offset - (uint16)dpi->x)>>zoom_level;
|
||||
sint16 dest_start_x = ((sint16)x + g1_source->x_offset - dpi->x) >> zoom_level;
|
||||
|
||||
if (dest_start_x < 0){
|
||||
//If the destination is negative reduce the width
|
||||
|
|
|
@ -296,8 +296,8 @@ void sub_0x68615B(int ebp){
|
|||
*/
|
||||
void paint_attached_ps(paint_struct* ps, paint_struct* attached_ps, rct_drawpixelinfo* dpi){
|
||||
for (; attached_ps; attached_ps = attached_ps->next_attached_ps){
|
||||
int x = attached_ps->attached_x + ps->x;
|
||||
int y = attached_ps->attached_y + ps->y;
|
||||
sint16 x = attached_ps->attached_x + ps->x;
|
||||
sint16 y = attached_ps->attached_y + ps->y;
|
||||
|
||||
int image_id = attached_ps->image_id;
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_VIEWPORT_FLAGS, uint16) & VIEWPORT_FLAG_SEETHROUGH_RIDES){
|
||||
|
@ -335,8 +335,8 @@ void sub_688485(){
|
|||
paint_struct* previous_ps = ps->var_24;
|
||||
|
||||
for (ps = ps->var_24; ps;){
|
||||
int x = ps->x;
|
||||
int y = ps->y;
|
||||
sint16 x = ps->x;
|
||||
sint16 y = ps->y;
|
||||
if (ps->sprite_type == 2){
|
||||
if (dpi->zoom_level >= 1){
|
||||
x &= 0xFFFE;
|
||||
|
|
Loading…
Reference in New Issue