Commit Graph
318 Commits
Author SHA1 Message Date
IntelOrca 4f319d6ed4 Prepare footpath handling for surfaces and railings 2021-09-12 17:52:01 +02: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
Helio Nunes Santos 2812be8c9a Close #12252: remove of goto in function wall_remove_at (#12279)
* Removed use of goto in function wall_remove_at
* Implemented overload of function map_get_wall_element_at
2020-07-16 17:52:45 -03:00
frutiemax 14a07359b3 Part of #11389: Use formatter class for Ride::FormatNameTo (#12041) 2020-06-24 21:02:08 -03:00
Duncan bb34213b93 MapCanConstructAt refactor (#11977)
* Start using MapCanConstructAt

* Fix #11675. Pass the full error message arguments on peep pickup

This was causing a crash as the error message arguments were being cleared which would mean eventually a nullptr dereference would happen.
2020-06-17 22:35:13 +01:00
Sohil Adwaniandduncanspumpkin 03f016e9ef Smart pointers (#11852)
* Part of #11159 Added smart pointers to a few functions

* Use camelCase for variables

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2020-06-15 19:47:07 +01:00
Michael Steenbeek 1ea1d24f00 Use constant for 255 tile element height (#11928) 2020-06-10 23:18:26 +02:00
Gymnasiast 09cc95f536 Move remaining calls to set_format_arg() 2020-06-03 14:49:04 +02:00
Hummel95 aac55d2cc0 Fix #10876: Peeps spawns can stack and are not removable (#11155) 2020-05-09 16:17:08 +02:00
Michael Steenbeek f3c0476673 Create constants for both tile element limits (#11645) 2020-05-05 15:40:33 +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
Ted John 32d72471b8 Add more tile APIs 2020-04-26 14:35:04 +01:00
Michał Janiszewski 2323cc1596 Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Michał Janiszewski c4b6897635 Address possible nullptr dereferences 2020-04-21 13:31:01 +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
Olivier Wervers b71062ce1b Fix #6530: Make land tools work consistently on park borders (#11181)
Makes all land tools behave the same
2020-04-18 08:19:03 -03:00