mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 15:24:30 +01:00
Changed function and occurences
It doesnt have to rotate three times to get an anti-clockwise return.
This commit is contained in:
@@ -1354,7 +1354,7 @@ void sub_688956()
|
||||
*
|
||||
* rct2: 0x0068881A
|
||||
*/
|
||||
void window_rotate_camera(rct_window *w)
|
||||
void window_rotate_camera(rct_window *w, int wise)
|
||||
{
|
||||
rct_viewport *viewport = w->viewport;
|
||||
if (viewport == NULL)
|
||||
@@ -1375,11 +1375,12 @@ void window_rotate_camera(rct_window *w)
|
||||
y = (viewport->view_height >> 1) + viewport->view_y;
|
||||
|
||||
sub_689174(&x, &y, &z);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
z = map_element_height(x, y);
|
||||
}
|
||||
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint32) = (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint32) + 1) % 4;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint32) = (RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint32) + wise) % 4;
|
||||
|
||||
int new_x, new_y;
|
||||
center_2d_coordinates(x, y, z, &new_x, &new_y, viewport);
|
||||
|
||||
@@ -496,7 +496,7 @@ rct_window *window_get_main();
|
||||
|
||||
void window_scroll_to_viewport(rct_window *w);
|
||||
void window_scroll_to_location(rct_window *w, int x, int y, int z);
|
||||
void window_rotate_camera(rct_window *w);
|
||||
void window_rotate_camera(rct_window *w, int wise);
|
||||
void window_zoom_set(rct_window *w, int zoomLevel);
|
||||
void window_zoom_in(rct_window *w);
|
||||
void window_zoom_out(rct_window *w);
|
||||
|
||||
Reference in New Issue
Block a user