1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 08:12:53 +01:00
Commit Graph

116 Commits

Author SHA1 Message Date
Gymnasiast
cded8313d7 Replace many occurrences of LocationXY16 2020-03-01 22:15:28 +01: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
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
duncanspumpkin
272e4f29a3 Further minor refactors 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
Tulio Leao
89edde6a3c Use CoordsXY on footpath_bridge_get_info_from_pos() 2020-01-12 22:27:30 -03:00
Tulio Leao
201d13577e Use CoordsXY for footpath_get_coordinates_from_pos() 2020-01-12 22:20:29 -03: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
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
Michael Steenbeek
fb2f907414 Merge pull request #10363 from duncanspumpkin/refactor
Refactor to reduce LocationXY usage
2019-12-21 16:24:24 +01:00
Gymnasiast
dcc720c1ec Remove MakeXY16() 2019-12-21 13:51:59 +01:00
duncanspumpkin
f346e439fc Change type of map selection a and b 2019-12-21 12:18:34 +00:00
duncanspumpkin
6b72b0992d Removal of LocationXY and simplify 2019-12-21 12:18:34 +00:00
Duncan
3be7d824ac Merge pull request #10397 from duncanspumpkin/refactor_gcommand
Remove gCommandPosition. Use GameActionRes instead.
2019-12-19 20:48:20 +00:00
Tulio Leao
4537c061d9 Prefer std::optional over LOCATION_NULL on Viewport (#10297) 2019-11-29 17:17:01 +01: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
cc12dbf238 Fix tile_element_height to use mapCoords instead of screenCoords 2019-11-14 10:50:10 -03:00
Tulio Leao
fe3d6f6faf Use ScreenCoordsXY for scroll_mouse* functions 2019-11-14 08:40:40 -03:00
Tulio Leao
054bc8e4ca Receive ScreenCoordsXY and return CoordsXY in Viewport 2019-11-13 18:27:59 -03:00
Tulio Leao
892c084cd8 Use ScreenCoordsXY for windows/Footpath 2019-11-11 23:10:51 -03:00
Duncan
219046af14 Merge pull request #10136 from tupaschoal/constexpr-for-openrct2ui-define
Use constexpr on openrct2-ui/*
2019-10-30 06:44:11 +00:00
Tulio Leao
afc14183e7 Use ScreenCoordsXY for tool_* functions 2019-10-29 19:02:58 -03:00
Tulio Leao
d1cec43065 Use constexpr on openrct2-ui/* 2019-10-29 18:48:04 -03: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
duncanspumpkin
5fe5f8e964 Refactor audio_play_sound_at_location to use CoordsXYZ 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
duncanspumpkin
5333dc4295 Return a SurfaceElement from get_surface_element 2019-08-19 20:04:56 +01:00
Matt
cc6321048f Refactor window_invalidate to use rct_window::Invalidate 2019-08-11 17:22:00 +02:00
Ted John
93789b9034 Add nullptr checks for get_ride in libopenrct2ui (#9795) 2019-08-09 08:06:25 +01:00
Matt
98a17fe8d9 Refactor create_sprite and remove unnecessary move_sprite_to_list 2019-07-24 17:53:51 +02: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
Michael Steenbeek
c9cbe391eb Merge pull request #8427 from Mikroscopic/minimap-fix
Fix #8385: Ghost objects rendered in minimap
2019-05-14 22:38:26 +02:00
duncanspumpkin
b9a70d02a3 Make suggested changes
Implement suggestions

Fix formatting
2019-05-12 17:31:48 +01:00
duncanspumpkin
e9e445837f Add landset/buyrights action 2019-05-12 17:29:19 +01:00
Ted John
710da039a4 Show ghost elements as white on mini-map
Also fixes refresh of map when using OpenGL drawing engine
2019-05-08 21:37:33 +01:00
Mikroscopic
80a9cf8670 Fix ghost objects rendering on minimap 2019-05-08 21:36:31 +01:00
duncanspumpkin
30a5194085 Use a vector for map selection tiles 2019-04-04 19:23:44 +01:00
duncanspumpkin
c9332b4c5d Use the game action. Fix issues with it 2019-03-17 07:20:36 +00:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
Ted John
cdec457abd Refactor peep struct 2019-02-28 20:28:58 +01:00
Richard Fine
e90e9dd73f Introduce many uses of direction_reverse
Change many of the places doing the ^2 trick to use direction_reverse instead, for improved readability.
2019-01-05 15:41:46 +00:00
Hielke Morsink
354d973a48 Use std::size instead of Util::CountOf 2018-11-23 21:59:08 +01:00