1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00
Commit Graph

229 Commits

Author SHA1 Message Date
Tulio Leao
724a6d4dcf Make rct_window use ScreenCoordsXY 2020-03-02 20:51:01 -03:00
Tulio Leao
09fad0ef7f Change rct_viewport to use ScreenCoordsXY 2020-03-02 20:50:58 -03:00
Tulio Leao
91c4735917 Revert to copy instead of const-ref for functions that edit content 2020-03-01 00:49:00 -03:00
Tulio Leao
9bcd20e0e6 Prefer const ref to send ScreenCoordsXY over 2020-02-29 08:25:48 -03:00
Tulio Leao
9d09f1b95c Use ScreenCoordsXY on context cursor operations (#10364) 2019-12-14 22:52:18 +01:00
Tulio Leao
721a4961a7 Fix #10304: Mouse zoom not following cursor position 2019-11-29 18:08:59 -03:00
Tulio Leao
4537c061d9 Prefer std::optional over LOCATION_NULL on Viewport (#10297) 2019-11-29 17:17:01 +01:00
Duncan
b316f447a4 Merge pull request #10285 from tupaschoal/useCoords-get-map-coords
Remove raw coordinates overload of get_map_coordinates_from_pos
2019-11-29 09:20:12 +00:00
Tulio Leao
47935288d0 Remove raw coordinates overload of get_map_coordinates_from_pos 2019-11-25 17:45:02 -03:00
duncanspumpkin
0c4fffb2ec Refactor viewport_adjust_for_map_height to use CoordsXYZ. 2019-11-24 21:37:35 +00:00
duncanspumpkin
d4c15cd774 Refactor centre_2d_coordinates to use screenCoords. 2019-11-20 18:44:03 +00:00
Tulio Leao
9fa355cb8c Make window_event_list use Coords for moved and cursor (#10258) 2019-11-18 23:13:32 +01:00
Tulio Leao
fe3d6f6faf Use ScreenCoordsXY for scroll_mouse* functions 2019-11-14 08:40:40 -03:00
Tulio Leao
ce9432964c Improve coords management on window_rotate_camera 2019-11-13 18:28:03 -03:00
Tulio Leao
c36606c051 Distinguish Screen and Map Coords on window_rotate_camera 2019-11-13 18:28:03 -03:00
Tulio Leao
47387690f5 Improve coords assignments 2019-11-13 18:28:03 -03:00
Tulio Leao
054bc8e4ca Receive ScreenCoordsXY and return CoordsXY in Viewport 2019-11-13 18:27:59 -03:00
Tulio Leao
afc14183e7 Use ScreenCoordsXY for tool_* functions 2019-10-29 19:02:58 -03:00
Tulio Leao
dbb66dd028 Remove duplicate functions (#10067)
* Reduce code duplication in src\openrct2\interface\Window.cpp

`window_resize_gui_scenario_editor` was a subset of `window_resize_gui`

* Reduce code duplication in src\openrct2\network\Twitch.cpp

Both `GetFollowers()` and `GetMessage()` were very similar

* Reduce code duplication in src/openrct2/world/SmallScenery.cpp

`map_place_non_scenery_clear_func` and `map_place_scenery_clear_func` did basically the same thing, with a single branch difference

* Reduce code duplication in src/openrct2-ui/windows/TopToolbar.cpp

Make `top_toolbar_tool_update_scenery_clear` call `top_toolbar_tool_update_land_paint` and then do the additional differing calculation it did.
2019-10-19 15:38:26 +02:00
Tulio Leao
ce1f38da25 Use ScreenCoordsXY for window functions (#10086)
* Use ScreenCoordsXY for window_create function

* Use ScreenCoordsXY for window_find_from_point function

* Use ScreenCoordsXY for window_find_widget_from_point

* Use ScreenCoordsXY for ride_contruction_tool*

* Use ScreenCoordsXY for window_event_tool*

* Use ScreenCoordsXY for window_event_scroll_mouse*

* Use ScreenCoordsXY for remaining window_event*

* Use ScreenCoordsXY for window_(set|move)_position
2019-10-19 13:07:03 +02:00
duncanspumpkin
37ef48890f Move various to use CoordsXYZ funcs instead of LocationXYZ 2019-08-19 20:04:58 +01:00
duncanspumpkin
c6452095ca Refactor tile_element_height to use CoordsXY 2019-08-19 20:04:57 +01:00
Matt
cc6321048f Refactor window_invalidate to use rct_window::Invalidate 2019-08-11 17:22:00 +02:00
Matt
2053ecb688 Refactor window_scroll_to_viewport to use rct_window::ScrollToViewport 2019-08-11 17:22:00 +02:00
Matt
b046d45c01 Refactor window_set_location to use rct_window::SetLocation 2019-08-11 17:21:56 +02:00
Ted John
cbb1bf9289 Fix #9752: window_close from ride construction window causes a crash
Re-obtain iterator after calling window close event as close event may open / close other windows.
2019-08-07 23:20:50 +01:00
Matt
4f6dbd6496 Fix #9727: Crash when multiple windows are closed during close events 2019-08-06 17:08:10 +02:00
ζeh Matt
a7f8960151 Fix #9498: Only close the most recent window when using the hotkey (#9504) 2019-07-01 22:59:31 +02:00
ζeh Matt
e149722a15 Fix #9467: Crash when windows create new window when being closed (#9470) 2019-06-27 22:28:07 +02:00
Matt
f98d027a14 Fix #9377: accumulate a list of windows to close before actual closing 2019-06-06 12:21:46 +02:00
Duncan
06c666c298 Merge pull request #9358 from ZehMatt/undo-fuckup1
Remove useless log_info
2019-06-04 18:45:34 +01:00
Duncan
f44d29f861 Merge pull request #9368 from ZehMatt/fix-9365
Fix #9365: Crash when bringing window to front
2019-06-04 18:45:22 +01:00
Matt
d6975a8f23 Fix #9365: Crash when bringing window to front 2019-06-04 07:02:55 +02:00
Hielke Morsink
4dea507e50 Fix #9360: sticky windows can be closed 2019-06-03 22:49:45 +02:00
Matt
af65811f50 Remove useless log_info 2019-06-03 18:59:23 +02:00
Matt
951f5009ef Refactor window storage to use std::list instead of std::vector 2019-05-29 19:32:18 +02:00
Ted John
f842d8a693 Fix #5103: OpenGL: ride track preview not rendered 2019-05-02 00:07:43 +00:00
Aaron van Geffen
f4602d0a34 Use SCREEN_FLAGS_EDITOR when appropriate. 2019-03-20 20:58:08 +01:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Aaron van Geffen
3be6137fde Rename event_07 to periodic_update. (#8684) 2019-02-07 17:46:52 +01:00
ζeh Matt
7d19a5bc77 Refactor memcpy to std::memcpy and memset to std::memset (#8408) 2018-12-15 22:23:31 +01:00
Matt
4bc69a0111 Introduce gCurrentRealTimeTicks and refactor some variable names. 2018-12-01 16:36:00 +01:00
Hielke Morsink
354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00
Aaron van Geffen
a5ad9a3729 Merge pull request #7971 from Osmodium/7930-part2-Add-open-folder-button
#7930 part2 add open folder button
2018-09-14 00:03:58 +02:00
Aaron van Geffen
d6769fafe2 Move title menu buttons up to compensate for new item. 2018-09-13 23:20:17 +02:00
Matt
a89b352fb2 Rename rct_sprite::unknown to rct_sprite::generic 2018-08-20 18:27:40 +02:00
Linus Unnebäck
fd07be587a Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01:00
clang-format
95ce592579 Enforce not breaking before assignments and function names
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:19 +02:00
Hielke Morsink
472320d8f3 Correct formatting up to the management folder
I went over the commits ab7f22f..8726712 (bulk format commits for game actions to management inclusive) and corrected all mistakes I found. Most of them have to do with arrays missing trailing commas, making clang-format indent the entire array or not add breaks between the values.
2018-07-23 16:00:15 +02:00
clang-format
17d2693422 clang-format interface 2018-07-23 16:00:04 +02:00