Commit Graph
333 Commits
Author SHA1 Message Date
Duncan f84c5616e5 Port over NSF map changes (#15912) 2021-11-14 20:58:33 +00:00
ζeh Matt 14b6894e77 Remove overwriting error message in map_is_location_in_park 2021-10-28 21:21:59 +03:00
ζeh Matt 3016701a98 Prevent map_is_location_owned from overwriting the global error message 2021-10-28 21:15:24 +03:00
Sijmen cec8447c6f Refactor Viewport.cpp to use ScreenRect (#15790) 2021-10-27 00:13:38 -03:00
ζeh Matt 7a30169c28 Refactor out construction clearance into a new compilation unit 2021-10-20 22:21:54 +03:00
Hielke Morsink 9dd20ec619 Improve array formatting
For most of these cases, adding a trailing comma to the array block makes clang-format put each item on a new line, and clang-format exception blocks could be reduced where clang-format does not handle them properly.
2021-10-17 18:21:45 +02:00
Hielke Morsink c2d3ca5f85 Automatically deduce std::array types
This also improves formatting of some arrays with weird or no indention.
2021-10-14 23:27:28 +02:00
Hielke Morsink 1d62a902e7 Make scenery_small_entry_has_flag a member function (#15509) 2021-10-01 16:50:05 -03:00
frutiemaxandζeh Matt 2906cb8c89 Fix #14474: Map size can be synced in multiplayer (#15312)
* Fix #14474: Map size can be synced in multiplayer

* Bump up network version

Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2021-09-29 16:46:03 +01:00
Hielke Morsink 53c22c9b4b Check for nullptr explicitly (#15458) 2021-09-24 20:05:50 +02:00
ζeh Matt 719a5a9d8e Merge pull request #15369 from ZehMatt/refactor/tile-coords
Refactor overload map_get_first_element_at
2021-09-21 14:36:03 -07:00
Hielke Morsink 4b4b3333d6 Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
IntelOrca 4f319d6ed4 Prepare footpath handling for surfaces and railings 2021-09-12 17:52:01 +02:00
ζeh Matt 07a7946caf Remove redundant conversions 2021-09-07 22:36:16 +03:00
ζeh Matt 79ab832000 Fix overload resolution for map_get_first_element_at 2021-09-07 22:36:16 +03:00
ζeh Matt a3b0c9ac81 Add overload for map_get_first_element_at to accept TileCoordsXY 2021-09-07 22:36:15 +03:00
DuncanandTed John 940cab87d3 Map size refactors from NSF (#15112)
* Support large map sizes

* Fix top spin painting

* Fix crooked house

* Increase bb size

* Decrease limit back

* Clang format

* Remove asserts and apply review comments

* Fix rebase mistake

Co-authored-by: Ted John <ted@brambles.org>
2021-08-16 20:51:16 +01:00
Gymnasiast ada164ac92 Remove one write to gGameCommandErrorText
All callers assume the landscape data area is full if the function returns false and set that error themselves.
2021-08-07 23:10:28 +02:00
Michael Steenbeek 864de57877 Fix #14667: Unpurchaseable land tiles in Extreme Hawaiian Island 2021-08-01 17:26:43 +02:00
Gymnasiast af0d4a0b63 Integrate loc_68BABC 2021-07-19 15:14:31 +02:00
Gymnasiast f54b008ac3 Spin off MapLoc68BABCShouldContinue() 2021-07-19 15:13:19 +02:00
Gymnasiast 41e564d16c Integrate loc_68B9B7 2021-07-19 15:01:00 +02:00
Gymnasiast 95fa0e34e0 Integrate loc_68BAE6 2021-07-19 14:57:32 +02:00
duncanspumpkin ae6657dcdc Close #14903. Use map_is_edge 2021-07-19 12:17:22 +02:00
Michael Steenbeek 474e00d48b Remove map_can_construct[_with_clear]_at() and gMapGroundFlags 2021-06-13 10:13:13 +02:00
Duncan 6b1141b5a2 Fix #14848: incorrect tile element limit calculation 2021-06-10 13:22:31 +02:00
Michael Steenbeek 1031be9078 Fix #14751: Height limitation also affects trees 2021-06-08 22:02:17 +02:00
duncanspumpkin b2c0c3e246 Handle reaching tile element limits more gracefully 2021-06-06 08:28:07 +01:00
duncanspumpkin c9777535d6 Fix export 2021-06-05 21:17:03 +01:00
Ted John 81d7c3f02b Make tile elements dynamic and resizeable 2021-06-05 21:17:03 +01:00
Ted John 051a09d2b7 Update map tile loop to support large maps. 2021-06-05 21:17:03 +01:00
Duncan c34079acee Refactor LargeSceneryEntry and remove rct_scenery_entry (#14816) 2021-06-04 12:41:23 +01:00
Duncan 12c5484f44 Refactor SmallSceneryEntry (#14815) 2021-06-03 22:14:41 -03:00
Duncan 425f968a67 Rearrange WallSceneryEntry to enforce types (#14808)
* Rearrange WallSceneryEntry to enforce types

* Clang format

Correct inverted nullptr check
2021-06-03 13:26:00 +01:00
Gymnasiast 5e28586a1c Create ProvisionalFootpath struct 2021-04-14 14:56:28 +02:00
Gymnasiast b3bbdcbfd5 Remove hardcoded terrain style constants from RCT1 and MapGen 2021-03-27 17:34:10 +01:00
Michael Steenbeek d5426c3779 Fix #14123: NPE in map_obstruction_set_error_text() 2021-03-07 13:37:23 +01:00
Matt 1aa75f04b7 Add templated version for tile element insertion and cleanup code 2021-02-05 12:22:34 +02:00
Matt 71174b8de7 Make the insertion of tile elements type explicit 2021-02-04 19:00:59 +02:00
ζeh Matt 6186766a05 Introduce TileElementsView (#13975)
* Simplify TileElement type conversation

* Introduce TileElementsView

* Move TileElementsView code into TileElementsView.h

* Cleanup code and move into OpenRCT2 namespace

* Use reference instead of pointer

* Fix include

* Make GCC happy

* Move the cast functions into base

* Use the cast function instead of reinterpret_cast

* Add TileElementsView tests

* Fix iterating on TileElementBase, return pointer not reference
2021-02-04 18:58:45 +02:00
Michael Steenbeek d3a4c16270 Reserve room for tile owner 2021-01-29 16:56:33 +01:00
Michael Steenbeek 20f959c833 Use track_type_t in more places 2021-01-22 11:33:55 +01:00
Michael Steenbeek bf63a562ae Fix #11438: Crash when decreasing map size 2021-01-12 22:04:22 +01:00
ζeh Matt a6080b7996 Refactor code to dynamically add and remove viewports (#13687) 2021-01-07 19:06:49 +00:00
Michael Steenbeek abd7babc86 Get RTD from ride via a struct method, part 1 2020-12-12 22:53:50 +01:00
Adamandduncanspumpkin f09b14ef2b Split actions hpp files into separate h and cpp files (#13548)
* Split up SmallSceneryPlace/Remove

Added undo function for Remove Scenery

* Refactor: Balloon and Banner actions hpp=>h/cpp

* Refactor: rename all action *.hpp files to *.cpp

This is preparation for separation in later commits. Note that without
the complete set of commits in this branch, the code will not build.

* Refactor Clear, Climate, Custom, and Footpath actions hpp=>h/cpp

* VSCode: add src subdirectories to includePath

* Refactor Guest actions hpp=>h/cpp

* Refactor Land actions hpp=>h/cpp

* Refactor LargeScenery actions hpp=>h/cpp

* Refactor Load, Maze, Network actions hpp=>h/cpp

* Refactor Park actions hpp=>h/cpp

* Refactor/style: move private function declarations in actions *.h

Previous action .h files included private function declarations with
private member variables, before public function declarations. This
commit re-orders the header files to the following order:
- public member variables
- private member variables
- public functions
- private functions

* Refactor Pause action hpp=>h/cpp

* Refactor Peep, Place, Player actions hpp=>h/cpp

* Refactor Ride actions hpp=>h/cpp

* Refactor Scenario, Set*, Sign* actions hpp=>h/cpp

* Refactor SmallScenerySetColourAction hpp=>h/cpp

* Refactor Staff actions hpp=>h/cpp

* Refactor Surface, Tile, Track* actions hpp=>h/cpp

* Refactor Wall and Water actions hpp=>h/cpp

* Fix various includes and other compile errors

Update includes for tests.
Move static function declarations to .h files
Add explicit includes to various files that were previously implicit
(the required header was a nested include in an action hpp file, and the
action .h file does not include that header)
Move RideSetStatus string enum to the cpp file to avoid unused imports

* Xcode: modify project file for actions refactor

* Cleanup whitespace and end-of-file newlines

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-12-10 06:39:10 +00:00
ζeh Matt 645289f4ec Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00
Julia Pinheiro cba1d48226 Close #12408: Refactor CURSOR_ID to use strong enum 2020-10-11 18:01:14 +02:00
Simon Jarrett 52209af94d Rename TRACK_ELEM_* enums to TrackElemType::*
- Replace enum in Track.h with namespace and constexpr
- Find and replace all instances of TRACK_ELEM_* enums
2020-10-01 19:57:52 +01:00
Aaron van Geffen 7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00