mirror of https://github.com/OpenRCT2/OpenRCT2.git
Revert uint assignment from 7eb3a90
.
For solve the another problem (the reason of that this code has been modified at 7eb3a90
), I replaced the left shift operator with a multiply (suggested by zsilencer) to prevent a 'undefined behaviour', Fixes #3367.
This commit is contained in:
parent
b2566a7223
commit
1112112157
|
@ -3370,16 +3370,16 @@ int ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint
|
|||
view_y2 < rotatedCoords.y) {
|
||||
goto label58;
|
||||
}
|
||||
uint32 x2 = RCT2_GLOBAL(0x00F438A4, rct_viewport*)->x + ((rotatedCoords.x - RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_x) >> RCT2_GLOBAL(0x00F438A4, rct_viewport*)->zoom);
|
||||
x2 <<= 16;
|
||||
int x2 = RCT2_GLOBAL(0x00F438A4, rct_viewport*)->x + ((rotatedCoords.x - RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_x) >> RCT2_GLOBAL(0x00F438A4, rct_viewport*)->zoom);
|
||||
x2 *= 0x10000;
|
||||
uint16 screenwidth = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16);
|
||||
if (screenwidth < 64) {
|
||||
screenwidth = 64;
|
||||
}
|
||||
int pan_x = ((x2 / screenwidth) - 0x8000) >> 4;
|
||||
|
||||
uint32 y2 = RCT2_GLOBAL(0x00F438A4, rct_viewport*)->y + ((rotatedCoords.y - RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_y) >> RCT2_GLOBAL(0x00F438A4, rct_viewport*)->zoom);
|
||||
y2 <<= 16;
|
||||
int y2 = RCT2_GLOBAL(0x00F438A4, rct_viewport*)->y + ((rotatedCoords.y - RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_y) >> RCT2_GLOBAL(0x00F438A4, rct_viewport*)->zoom);
|
||||
y2 *= 0x10000;
|
||||
uint16 screenheight = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, uint16);
|
||||
if (screenheight < 64) {
|
||||
screenheight = 64;
|
||||
|
|
Loading…
Reference in New Issue