1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00
Commit Graph

106 Commits

Author SHA1 Message Date
hdpoliveira
acc6b9f878 Part of #9473: Create Vehicle::SetMapToolbar
Converted from vehicle_set_map_toolbar
2020-05-01 19:49:02 -03:00
Breno Rodrigues Guimarães
374b744477 Use Formatter to handle argument formatting for tooltips (#11379) 2020-04-21 12:38:59 +02:00
Michael Steenbeek
b4a763c751 Move naming convention to RTD (#11319) 2020-04-18 12:12:07 +02:00
Breno Guimaraes
347c402984 Fix #11286: Fix coloring of banners on tooltip
This patch moves the function that adds coloring to the buffer text into the Buffer struct with a flag.
It also changes both Banner printing and Banner tooltip to use the colored version
2020-04-16 08:06:07 -03:00
Michael Steenbeek
d91173060a Guard against null banners (#11078) 2020-04-06 22:32:27 +02:00
Michał Janiszewski
85d6fa8c8b Revert "Guard against null banners (#11078)"
This is being reverted now that we have replay records uploaded as part
of the backtrace.io information to try figuring out the root cause.

This reverts commit 47b6139546.
2020-04-03 09:56:51 +02:00
Michael Steenbeek
47b6139546 Guard against null banners (#11078) 2020-03-27 13:04:45 +01:00
Ted John
d34dec9c27 Create ZoomLevel struct to add two new zoom levels 2020-03-23 15:54:03 +00:00
Tulio Leao
09fad0ef7f Change rct_viewport to use ScreenCoordsXY 2020-03-02 20:50:58 -03:00
Michael Steenbeek
e3f5eb7275 Merge pull request #10847 from tupaschoal/const-ref-coords
Prefer const ref to send (Tile)CoordsXY(ZD) over
2020-03-01 14:38:39 +01:00
Tulio Leao
2da96e8cfc Revert to copy instead of const-ref for functions that edit content 2020-03-01 09:57:03 -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
475eed0a56 Receive CoordsXY by const ref instead of copy 2020-02-29 01:16:19 -03:00
Gymnasiast
1e6efa6eb4 Extend BannerIndex to 16 bits 2020-02-15 10:37:34 +01:00
duncanspumpkin
08ea5585ee Small refactors and cleanups 2020-01-19 17:16:42 +00:00
duncanspumpkin
a5ef8d6240 Rename rct_vehicle 2020-01-19 17:14:56 +00:00
Michael Steenbeek
d798811c4a Make GetWaterHeight return big Z (#10579)
* Make GetWaterHeight return big Z

* Restore > 0 [ci skip]
2020-01-19 15:12:48 +00:00
Duncan
d486ac4d3b Reduce direct usage of LOCATION_NULL (#10480)
* Reduce direct usage of Location_Null

Ideally we want to refactor these out to use std::optional as much as possible but for now move to using the standard interfaces.

* Remove incorrect AND with LOCATION_NULL

In the original this was a simple comparison to check for negative. Unsure how it ended up as an AND with the negative bit.
2019-12-31 09:01:17 +01:00
Michael Steenbeek
8ca0cf52a7 Replace more direct accesses to base/clearance Z with getter/setter (#10454) 2019-12-27 15:26:40 +01:00
Gymnasiast
62fcbb07ca Rename methods to GetBaseZ/GetClearanceZ 2019-12-23 20:08:37 +01:00
Gymnasiast
7d11858dbe Create getter for GetBaseHeight()/GetClearanceHeight() 2019-12-23 20:05:24 +01:00
Tulio Leao
a2c7ecc6e5 Make Map::map_get_first_element_at() use CoordsXY (#10413)
* Make Map::map_get_first_element_at() use CoordsXY

* Fix clang-format on ClearAction.hpp

* Prefer TileDIrectionDelta over hardcoded delta on RideConstruction

* Use named Direction constants

* Make Compat::map_get_first_element_at() use CoordsXY
2019-12-23 07:35:41 +00:00
duncanspumpkin
521e5db4c2 Make constant values more explicit.
Fix mistake in z coordinate conversion
2019-12-21 12:22:59 +00:00
duncanspumpkin
1f80dee4df Refactor footpath.cpp to remove LocationXY and use CoordsXY 2019-12-21 12:18:34 +00:00
Michael Steenbeek
a2b9598341 Modify code using Location8 to use isNull()/setNull() (#10403) 2019-12-21 11:34:46 +01:00
duncanspumpkin
0c6e062d5a Refactor return value of screen_coord_to_viewport_cord 2019-12-01 09:15:07 +00:00
Tulio Leao
1532ee2b23 Create CoordsXY::ToTileStart() and CoordsXY::ToTileCentre() 2019-11-30 16:47:23 +01:00
Duncan
7e96ddf1d6 Merge pull request #10289 from tupaschoal/viewport-inter-2
Use CoordsXY on ViewportInteraction.cpp
2019-11-29 09:21:08 +00:00
Tulio Leao
fb95154000 Use operator -= and += of CoordsXY 2019-11-25 23:08:31 -03:00
Tulio Leao
47935288d0 Remove raw coordinates overload of get_map_coordinates_from_pos 2019-11-25 17:45:02 -03:00
Tulio Leao
2af1f1feba Use CoordsXY on ViewportInteraction.cpp 2019-11-24 19:45:56 -03:00
Tulio Leao
c91bdadb47 Use ScreenCoordsXY on viewport interactions 2019-11-21 17:53:28 -03:00
Tulio Leao
93083780df Use ScreenCoordsXY for windows/Map (#10233)
* Use ScreenCoordsXY for windows/Footpath

- Refactor `place_park_entrance_get_map_position()` to receive `ScreenCoordsXY` and return `CoordsXYZD`
- Refactor `sub_68A15E()` to receive `ScreenCoordsXY` and return `CoordsXY`. Some of its usage are narrowing the result on purpose, as same variable is used for contexts where `int16_t` is still a hard requirement.

* Properly increment for big Z and use LOCATION_NULL
2019-11-14 23:09:27 +01:00
Tulio Leao
054bc8e4ca Receive ScreenCoordsXY and return CoordsXY in Viewport 2019-11-13 18:27:59 -03:00
duncanspumpkin
5ca553dd08 Refactor viewport_coord_to_map_coord to return a CoordXY 2019-11-01 20:04:07 +00:00
Duncan
9ad15e398b Merge pull request #10091 from tupaschoal/nullprt-deref-avoid-get_first_at
Avoid dereferencing invalid map_get_first_element_at return
2019-10-19 13:55:54 +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
Tulio Leao
35577f5b19 Avoid dereferencing invalid map_get_first_element_at return 2019-10-19 07:54:31 -03:00
duncanspumpkin
2c5ff4a0d1 Rename variables 2019-10-07 18:56:31 +01:00
duncanspumpkin
213ba15ba5 Remove unused code and variables from function 2019-10-07 18:36:27 +01:00
duncanspumpkin
c6452095ca Refactor tile_element_height to use CoordsXY 2019-08-19 20:04:57 +01:00
duncanspumpkin
9619fd384d Refactor map_is_location_owned to use CoordsXYZ 2019-08-19 20:04:56 +01:00
Ted John
60060480c2 Fix #9826: NRE in ride_construct 2019-08-09 18:29:34 +01:00
Ted John
93789b9034 Add nullptr checks for get_ride in libopenrct2ui (#9795) 2019-08-09 08:06:25 +01:00
0cufox0
b4e0df2e5f Fix review issues and formatting 2019-08-05 20:19:57 +01:00
0cufox0
8e33619b63 Refactor LargeSceneryRemoveAction 2019-08-05 20:18:01 +01:00
0cufox0
5cd8541a1c Refactor smalSceneryRemoveAction 2019-08-05 20:17:57 +01:00
0cufox0
0320f195e3 refactor wallRemoveAction 2019-08-05 19:52:47 +01:00
Ted John
7ce2f38c92 Fix formatting 2019-07-29 20:01:49 +01:00