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

13402 Commits

Author SHA1 Message Date
Michael Steenbeek
d012c8141b Merge pull request #10316 from duncanspumpkin/light_fx
Make lights work for all rotations.
2019-12-04 14:11:26 +01:00
ζeh Matt
ab5be44ccb Fix #10325: Crash when banners have no text (#10327)
* Fix #10325: Crash when banners have no text

* Update changelog.txt
2019-12-04 11:22:07 +01:00
duncanspumpkin
44998481f6 Use tile Offset 2019-12-01 15:15:44 +00:00
duncanspumpkin
ef10cb243b minor code cleanup 2019-12-01 14:53:52 +00:00
duncanspumpkin
813ed4fdac Remove commented out dead code 2019-12-01 14:52:17 +00:00
duncanspumpkin
f964d38e7d Renable light occlusion 2019-12-01 14:51:14 +00:00
duncanspumpkin
ace59e6a73 Make lights work for all rotations.
Mistake made with the coordinates confusing viewport and screen coordinates. In addition occlusion code that is depretiated was culling all lights in two rotations due to dead code.
2019-12-01 14:07:48 +00: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
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
7e96ddf1d6 Merge pull request #10289 from tupaschoal/viewport-inter-2
Use CoordsXY on ViewportInteraction.cpp
2019-11-29 09:21:08 +00: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
Ted John
569161902f Fix #9919: invalid read in vehicle_update_measurements (#10300) 2019-11-27 21:45:32 +01: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
duncanspumpkin
0c4fffb2ec Refactor viewport_adjust_for_map_height to use CoordsXYZ. 2019-11-24 21:37:35 +00:00
Duncan
966ba6b018 Merge pull request #10269 from duncanspumpkin/centre_2d
Refactor centre_2d_coordinates to use screenCoords.
2019-11-24 14:28:18 +00:00
Duncan
81566a5e90 Merge pull request #10276 from tupaschoal/viewport-inter
Use ScreenCoordsXY on viewport interactions
2019-11-24 14:27:58 +00:00
tjwrona1992
5f41e9df38 Add missing include for std::max to fix VS16.4.0P2 compilation (#10282)
* Fix errors where "std::max" was not recognized while compiling with the latest Visual Studio (2019 16.4.0 Preview 2.0) due to a missing "#include" statement.

* Ran clang-format.
2019-11-24 08:12:50 +01:00
Tulio Leao
831050745c Fix #10275: Track element preview incorrect 2019-11-22 12:10:47 +01:00
Tulio Leao
c91bdadb47 Use ScreenCoordsXY on viewport interactions 2019-11-21 17:53:28 -03:00
Duncan
dfe8335e91 Merge pull request #10273 from tupaschoal/with_z_coords
Use CoordsXY/ScreenCoordsXY for viewport*_with_z
2019-11-21 17:06:49 +00:00
Paweł Bylica
7e7e088d8e Use fs::path for some implementations in Path 2019-11-21 13:40:21 +01:00
Paweł Bylica
45002d723a Add core/FileSystem.hpp for accessing std::filesystem
This file enables access to std::filesystem as `fs` namespace
or injects third-party drop-in replacement on build configs
where std::filesystem is not available.
2019-11-21 13:40:20 +01:00
Paweł Bylica
5a8a7fe7ba Add ghc::filesystem for thirdparty/
This adds the filesystem.hpp from https://github.com/gulrak/filesystem the the src/openrct2/thirdparty directory. The header is going to be used in build configurations where std::filesystem is not available.
2019-11-21 13:40:20 +01:00
Tulio Leao
7f74e01669 Add braces to fix return on null Coords 2019-11-21 09:22:09 -03:00
Tulio Leao
a9c2e1229a Propagate error upward with LOCATION_NULL 2019-11-21 08:00:06 -03:00
duncanspumpkin
d4c15cd774 Refactor centre_2d_coordinates to use screenCoords. 2019-11-20 18:44:03 +00:00
Tulio Leao
f94970b059 Use CoordsXY/ScreenCoordsXY for viewport*_with_z
Closes #10268
2019-11-19 18:33:40 -03: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
3b8bf56b71 Use helper function 2019-11-19 11:20:59 +00:00
duncanspumpkin
421107436f Refactor helper function to take screen coords 2019-11-19 11:20:59 +00:00
duncanspumpkin
1d6a923298 Refactor screen_get_map_xy_with_z to use CoordsXY structs 2019-11-19 11:20:58 +00:00
Duncan
c04cb0b94b Merge pull request #10254 from tupaschoal/coords-for-ride-construction
Coords for ride construction
2019-11-19 11:12:51 +00:00
Tulio Leao
2acdc577f7 Use Coords for windows/RideConstruction 2019-11-18 19:17:54 -03:00
Tulio Leao
9fa355cb8c Make window_event_list use Coords for moved and cursor (#10258) 2019-11-18 23:13:32 +01:00
Duncan
5bfe31ceb9 Merge pull request #10062 from tupaschoal/nullptr-deref-avoid-surface
Avoid dereferencing map_get_surface_element_at nullptr on libopenrct2
2019-11-18 12:39:41 +00:00
Tulio Leao
72b4d93ad2 Avoid dereferencing map_get_surface_element_at nullptr on libopenrct2 2019-11-18 08:01:04 -03:00
Ted John
f7a8f5a0c7 Fix #10228: Can't import RCT1 Deluxe from Steam (#10260)
Use size of buffer rather than the size of a pointer which would always return 4 or 8 for the buffer size.
2019-11-18 10:05:16 +01:00
ζeh Matt
7744fc71e4 Fix #10256: Desync because of client advancing ahead of server ticks during map change (#10257) 2019-11-17 23:26:32 +01:00
ζeh Matt
5606b4895b Fix desync because of ride status (#10227) 2019-11-16 16:12:33 +01: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
duncanspumpkin
e4ee91f5ff Refactor get_map_coordiantes to enforce Coords struct 2019-11-14 20:28:54 +00:00
Duncan
8eb42867dd Merge pull request #10223 from duncanspumpkin/viewport_refactor
Remove global variables from get_map_coordinates_from_pos_window
2019-11-14 20:27:39 +00:00
Duncan
d6bb101f8d Merge pull request #10237 from tupaschoal/screencoords-for-mouse-functions
Use ScreenCoordsXY for scroll_mouse* functions
2019-11-14 20:24:06 +00:00
Tulio Leao
cc12dbf238 Fix tile_element_height to use mapCoords instead of screenCoords 2019-11-14 10:50:10 -03:00
Duncan
a80566027a Merge pull request #10236 from tupaschoal/coords-for-tile-inspector
Use more ScreenCoordsXY on windows/TileInspector.cpp
2019-11-14 12:52:00 +00:00