mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fixes for values being shifted (#3362)
This commit is contained in:
parent
60ac228c51
commit
7eb3a90cea
|
@ -3370,7 +3370,7 @@ int ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint
|
|||
view_y2 < rotatedCoords.y) {
|
||||
goto label58;
|
||||
}
|
||||
int x2 = RCT2_GLOBAL(0x00F438A4, rct_viewport*)->x + ((rotatedCoords.x - RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_x) >> RCT2_GLOBAL(0x00F438A4, rct_viewport*)->zoom);
|
||||
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;
|
||||
uint16 screenwidth = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, uint16);
|
||||
if (screenwidth < 64) {
|
||||
|
@ -3378,7 +3378,7 @@ int ride_music_params_update(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint
|
|||
}
|
||||
int pan_x = ((x2 / screenwidth) - 0x8000) >> 4;
|
||||
|
||||
int y2 = RCT2_GLOBAL(0x00F438A4, rct_viewport*)->y + ((rotatedCoords.y - RCT2_GLOBAL(0x00F438A4, rct_viewport*)->view_y) >> RCT2_GLOBAL(0x00F438A4, rct_viewport*)->zoom);
|
||||
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;
|
||||
uint16 screenheight = RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, uint16);
|
||||
if (screenheight < 64) {
|
||||
|
|
|
@ -1660,7 +1660,7 @@ int track_place_ride(sint16 x, sint16 y, sint16 z, uint8 rideIndex, uint8** trac
|
|||
int temp_z = z;
|
||||
temp_z -= track_coordinates->z_begin;
|
||||
uint32 edi = ((track->flags & 0xF) << 17) |
|
||||
((track->flags & 0xF) << 28) |
|
||||
((uint32)(track->flags & 0xF) << 28) |
|
||||
(((track->flags >> 4) & 0x3) << 24) |
|
||||
(temp_z & 0xFFFF);
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ static void window_new_ride_populate_list()
|
|||
|
||||
quadIndex = rideType >> 5;
|
||||
bitIndex = rideType & 0x1F;
|
||||
if (RCT2_ADDRESS(0x01357404, uint32)[quadIndex] & (1 << bitIndex)) {
|
||||
if (RCT2_ADDRESS(0x01357404, uint32)[quadIndex] & (1u << bitIndex)) {
|
||||
int dh = 0;
|
||||
uint8 *rideEntryIndexPtr = get_ride_entry_indices_for_ride_type(rideType);
|
||||
|
||||
|
@ -323,7 +323,7 @@ static void window_new_ride_populate_list()
|
|||
quadIndex = rideEntryIndex >> 5;
|
||||
bitIndex = rideEntryIndex & 0x1F;
|
||||
// Skip if vehicle type is not invented yet
|
||||
if (!(RCT2_ADDRESS(0x01357424, uint32)[quadIndex] & (1 << bitIndex)))
|
||||
if (!(RCT2_ADDRESS(0x01357424, uint32)[quadIndex] & (1u << bitIndex)))
|
||||
continue;
|
||||
|
||||
// Ride entries
|
||||
|
|
Loading…
Reference in New Issue