Tulio Leao
28b3ac1693
Make track_block_get_previous() use CoordsXYE
2020-05-02 11:07:18 -03:00
Tulio Leao
d58f3ec0b6
Make track_block_get_previous_from_zero() use CoordsXYZ
2020-05-02 11:07:17 -03:00
Tulio Leao
6203a5a20d
Make track_block_get_next_from_zero() use CoordsXYZ
2020-05-02 11:07:15 -03:00
Tulio Leao
76ff67d4c8
Use CoordsXY in windows/RideConstruction.cpp
2020-05-01 18:06:30 -03:00
Tulio Leao
4589560a15
Make sub_6C683D() use CoordsXYZ on parameter and return
2020-05-01 18:06:26 -03:00
Tulio Leao
4933785b1c
Make window_dropdown_show_text_custom_width() use ScreenCoordsXY
2020-05-01 15:48:20 -03:00
Michael Steenbeek
bcabc1d807
Merge pull request #11457 from Gymnasiast/refactor/rtd-forever
...
More RTD + cleanup
2020-04-27 15:11:54 +02:00
Ted John
e1c08defc8
Remove use of std::variant
2020-04-26 14:35:07 +01:00
Ted John
83fe0cf5c5
Implement strings for GameAction errors
2020-04-26 14:35:05 +01:00
Gymnasiast
2e3a4d41ce
Clean up some ride construction variables
2020-04-26 11:07:19 +02:00
Gymnasiast
8d0854804e
Replace missed check for coasters with vertical towers
2020-04-26 11:05:11 +02:00
Michał Janiszewski
c4b6897635
Address possible nullptr dereferences
2020-04-21 13:31:01 +02:00
Michael Steenbeek
e1e58423fc
Replace RideTypeHasRideGroups with flag ( #11375 )
2020-04-20 21:50:35 +02:00
Gymnasiast
19646a29a5
Remove duplicated code with function call
2020-04-19 21:13:20 +02:00
Gymnasiast
7d50a2d186
Move alternate ride type to RTD
2020-04-19 18:44:38 +02:00
Gymnasiast
99d270388b
Move ride start piece to RTD
2020-04-19 18:05:57 +02:00
Michael Steenbeek
8127437de1
Reduce direct ride type checking; move available piece lookup to RTD ( #11353 )
2020-04-19 13:32:43 +02:00
Tulio Leao
935cfe90fc
Use named casts on openrct2-ui/windows ( #11136 )
2020-04-18 13:32:48 +02:00
Gymnasiast
edd31d9f16
Move flags to RideTypeDescriptors
2020-04-17 17:03:33 +02:00
Michael Steenbeek
cfb405f0ed
Use StationIndex in many more places ( #10992 )
2020-03-26 21:38:26 +01:00
Michael Steenbeek
3f473ec3f0
Fix #6123 : Cannot build some track designs with 4 stations ( #11031 )
2020-03-25 14:20:29 +01:00
Ted John
d34dec9c27
Create ZoomLevel struct to add two new zoom levels
2020-03-23 15:54:03 +00:00
Michael Steenbeek
fd91c41a76
Name remaining ride type flags ( #10947 )
2020-03-16 22:52:06 +01:00
Michael Steenbeek
e441019b04
Refactor rct_track_preview flags ( #10906 )
...
* Refactor rct_track_preview flags
* Zero-index rct_track_preview flags
2020-03-11 15:53:16 +00:00
Michael Steenbeek
be13c1fc87
Refactor more TileCoords
2020-03-07 21:07:18 +01:00
Gymnasiast
dcf4301559
Use constant for invalid direction
2020-03-05 18:27:36 +01:00
Tulio Leao
724a6d4dcf
Make rct_window use ScreenCoordsXY
2020-03-02 20:51:01 -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
Michael Steenbeek
d395d67b95
Merge pull request #10846 from tupaschoal/const-ref-screencoords
...
Prefer const ref to send ScreenCoordsXY over
2020-03-01 14:17:51 +01: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
93926d5e5d
Move all the ride type-specific track categories to regular ones
2020-02-22 23:20:12 +01:00
Gymnasiast
dc04c5ec95
Refactor custom track piece handling
2020-02-22 23:01:34 +01:00
Michael Steenbeek
08ca829ac2
Create RideTypeDescriptors ( #10707 )
2020-02-20 11:00:03 +01:00
Tulio Leao
60e2546b2d
Improve legibility of ride placement # attempt calculation
2020-02-13 23:10:33 -03:00
Tulio Leao
d0b255d98b
Start zAttemps from 0
2020-02-10 21:55:21 -03:00
Tulio Leao
e79584fe24
Remove superflous if
2020-02-10 21:55:21 -03:00
Tulio Leao
6522b10dfa
Make Z attempts crescent
2020-02-10 21:55:21 -03:00
Tulio Leao
fabef9b050
Modify height search to also affect maze construction
2020-02-10 21:55:19 -03:00
aw20368
d2e5c29ce0
review changes (squash)
2020-02-10 21:54:41 -03:00
aw20368
c76378bc8b
Fix #8064 Ride construction errors shown as (undefined string)
...
The search for height to build track ended at a half-height, leading to (undefined string) error. Changed to always end at whole height and search as high as possible.
2020-02-10 21:54:26 -03:00
Tulio Leao
d34321fdaa
Use CoordsXY on ride_entrance_exit_place_ghost()
2020-01-19 13:30:28 -03:00
Gymnasiast
5c0a62c31a
Implement review requests
2020-01-01 23:03:41 +01:00
Gymnasiast
0d09a645fc
Refactor map_get_footpath_element() and fix #10486
2019-12-31 10:08:36 +01: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
Tulio Leao
06fb16ee88
Use CoordsXYZ for gMapSelectArrowPosition ( #10442 )
2019-12-30 16:51:35 +00:00
Michael Steenbeek
77494bbc73
Create definitions for some coords related stuff ( #10456 )
...
* Create definitions for some coords related stuff
* Use constexpr; add define for Z step
2019-12-30 15:03:51 +00:00
Tulio Leao
98110c0544
Make Map::map_invalidate*() use CoordsXY ( #10437 )
...
* Make Map::map_invalidate_element() use CoordsXY
* Make Map::map_invalidate_tile_full() use CoordsXY
* Make Map::map_invalidate_tile_zoom0() use CoordsXY
* Make Map::map_invalidate_tile_zoom1() use CoordsXY
* Make Map::map_invalidate_tile() use CoordsXY
* Use CoordsXYRangedZ for map invalidation
* Fix vehicle tile invalidation use Z instead of Y coord
* Fix BannerRemoveAction sending Z TileCoords to invalidate tile
* Fix wrong tile invalidation on peep_update_walking_break_scenery
* Prefer ToTileStart over bitwise and
2019-12-28 08:44:33 +00:00
Michael Steenbeek
d0744df22f
Merge pull request #10443 from tupaschoal/reduce-locationxy
...
Remove LocationXY usage on windows and actions
2019-12-27 15:58:26 +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
Tulio Leao
3c3e179e7f
Remove LocationXY usage on openrct2-ui\windows\RideConstruction.cpp
2019-12-27 09:22:51 -03:00
Gymnasiast
62fcbb07ca
Rename methods to GetBaseZ/GetClearanceZ
2019-12-23 20:08:37 +01:00
Gymnasiast
85ecb52e7c
Manually replace more Z occurrences
2019-12-23 20:05:26 +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
Tulio Leao
461095ab6c
Fix #10417 : Ride preview incorrectly centered
2019-12-22 01:48:28 -03:00
Michael Steenbeek
30b03d998c
Merge pull request #10409 from tupaschoal/coords-for-set-tile-elements
...
Make Map::map_set_tile_elements() use TileCoordsXY
2019-12-21 19:12:51 +01:00
Tulio Leao
5fcfc6af00
Rename map_set_tile_elements to singular
2019-12-21 10:28:52 -03:00
Tulio Leao
d7efe4de90
Make Map::map_set_tile_elements() use TileCoordsXY
2019-12-21 10:28:33 -03:00
duncanspumpkin
f346e439fc
Change type of map selection a and b
2019-12-21 12:18:34 +00:00
Tulio Leao
918624e090
Fix #10396 : Function returning TileCoordsXYZD'z coord in a CoordsXYZD object ( #10398 )
2019-12-19 15:41:22 +01:00
Tulio Leao
7c75db2b2d
Make map_get_surface_element_at only accept Coords objects
2019-12-18 23:46:50 -03:00
Tulio Leao
2cd3add373
Make CursorState store a ScreenCoordsXY object
2019-12-14 23:30:55 -03:00
Tulio Leao
af7b364946
Prefer map_is_location_valid over hardcoded map limits ( #10373 )
2019-12-14 22:50:34 +01:00
Duncan
fed417da03
Merge pull request #10356 from duncanspumpkin/label_var
...
Change the label on known var to reflect use.
2019-12-11 18:14:07 +00:00
Tulio Leao
01c62437b2
Remove Ride::ride_get_rotated_coords()
2019-12-09 16:52:47 -03:00
Tulio Leao
6f0ebfea27
Use CoordsXY and ScreenCoordsXY for rotate in Ride*.*
2019-12-04 08:02:09 -03:00
Tulio Leao
1532ee2b23
Create CoordsXY::ToTileStart() and CoordsXY::ToTileCentre()
2019-11-30 16:47:23 +01:00
Tulio Leao
4537c061d9
Prefer std::optional over LOCATION_NULL on Viewport ( #10297 )
2019-11-29 17:17:01 +01:00
Tulio Leao
831050745c
Fix #10275 : Track element preview incorrect
2019-11-22 12:10:47 +01:00
Duncan
463ef9d218
Merge pull request #10238 from duncanspumpkin/viewport_get_xy_z
...
Refactor screen_get_map_xy_with_z to use CoordsXY structs
2019-11-19 15:02:50 +00:00
Tulio Leao
7718d83b21
Simplify assignment in RideConstruction.cpp ( #10266 )
2019-11-19 16:01:22 +01:00
duncanspumpkin
1d6a923298
Refactor screen_get_map_xy_with_z to use CoordsXY structs
2019-11-19 11:20:58 +00:00
Tulio Leao
2acdc577f7
Use Coords for windows/RideConstruction
2019-11-18 19:17:54 -03:00
Tulio Leao
72b4d93ad2
Avoid dereferencing map_get_surface_element_at nullptr on libopenrct2
2019-11-18 08:01:04 -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
7e65aeaea3
Fix issues in code review
...
Implement operator== and operator!= for CoordsXYZD
Set location to null before returning from ride_get_entrance_or_exit_position_from_screen_position
2019-11-13 18:46:02 -03:00
Tulio Leao
5dfe373061
Refactor ride_get_entrance_or_exit_position_from_screen_position()
2019-11-13 09:41:58 -03:00
Tom Lankhorst
027c09553b
Reformat code with clang-format 8.0.
2019-11-04 15:11:06 +01:00
Tulio Leao
afc14183e7
Use ScreenCoordsXY for tool_* functions
2019-10-29 19:02:58 -03: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
213ba15ba5
Remove unused code and variables from function
2019-10-07 18:36:27 +01:00
duncanspumpkin
f10e4dc6b9
Remove unused variables from function call
2019-10-07 18:33:51 +01:00
Gymnasiast
f365bc3cb7
Create getters and setters for occupied quadrant
2019-08-27 21:12:48 +02:00
Gymnasiast
ec5ba20992
Create dedicated method for SetLastForTile()
2019-08-25 16:13:02 +02:00
Gymnasiast
6e200459d3
Refactor some accessors to tile element type and flags fields
2019-08-24 22:42:47 +02:00
duncanspumpkin
f39905bd2e
Clang format
2019-08-19 20:04:59 +01:00
duncanspumpkin
b77f15c4b7
Refactor map_get_highest_z to use CoordsXY
2019-08-19 20:04:59 +01:00
duncanspumpkin
5fe5f8e964
Refactor audio_play_sound_at_location to use CoordsXYZ
2019-08-19 20:04:58 +01:00
duncanspumpkin
5333dc4295
Return a SurfaceElement from get_surface_element
2019-08-19 20:04:56 +01:00
Gymnasiast
255ce3f62b
Extend tile element size to 16 bytes
2019-08-18 14:03:36 +02:00
Matt
cc6321048f
Refactor window_invalidate to use rct_window::Invalidate
2019-08-11 17:22:00 +02:00
Ted John
9954f0b725
Add nullptr checks for more instances of get_ride ( #9819 )
2019-08-09 14:20:59 +01:00
Ted John
93789b9034
Add nullptr checks for get_ride in libopenrct2ui ( #9795 )
2019-08-09 08:06:25 +01:00
Ted John
e23638548a
Reduce use of MAX_RIDES and RIDE_TYPE_NULL
2019-08-04 16:44:17 +01:00
Ted John
772475848b
Fix formatting
2019-07-29 19:18:16 +01:00
Ted John
3f45976009
Fix openrct2ui errors
2019-07-29 19:18:16 +01:00
Duncan
ab5f5b20cd
Use enum class for RCT2_SOUND ( #9618 )
...
* Use enum class for RCT2_SOUND
* Fix formatting. Fix mistaken declaration.
* Change name of enum to SoundId
* Fix clang format
2019-07-22 19:02:45 +01:00
Duncan
993709c087
Merge pull request #9321 from aw20368/fix/8723-use-rotate_map_coordinates
...
Fix #8723 Use rotate_map_coordinates to rotate coordinate
2019-06-08 07:52:52 +01:00