1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00
Commit Graph

287 Commits

Author SHA1 Message Date
ζeh Matt
06e430157f Use RideId::GetNull and RideId::IsNull over constant 2022-02-12 18:11:18 +02:00
ζeh Matt
a2470c0573 Rename ride_id_t to RideId 2022-02-12 18:11:18 +02:00
Duncan
5157b57a15 OpenRCT2 Limits (#16088)
* Move over max rides to limits file

* Move max stations to limits file

* Move over max inversions, golf holes, helices, custhistsize

* Move over max trains per ride

* Bring over Max cars per train and max circuits per ride

* Port over NumColourSchemes and max vehicle colours

* Fix compilation

* Move over max awards

* Move over max peep spawns and park entrances

* Fix rebase issues

* Remove future work

* Switch style

* Update copyright
2022-02-01 20:59:48 +00:00
Gymnasiast
aa34f0f760 Drop the N postfix 2021-12-11 00:39:39 +01:00
Gymnasiast
fc3ce3294c Move over switches to normalised tile element types 2021-12-11 00:30:59 +01:00
Michael Steenbeek
2d1af0ec42 Replace many GetType() calls with GetTypeN() 2021-12-10 22:43:17 +01:00
Duncan
275d565e52 Start splitting up ride.h (#16011)
* Start splitting up ride.h

* Use cstdint instead of common.h
2021-11-26 15:03:14 +00:00
ζeh Matt
56e78d5733 Merge pull request #15985 from ZehMatt/refactor/entities2
Refactor Sprite to Entity
2021-11-25 12:53:50 -08:00
Peter Schussheim
0495b265c0 Refactor unchecked std::array subscript operator 2021-11-25 10:13:20 +01:00
ζeh Matt
03fb9b390f Rename Sprite to EntityRegistry 2021-11-24 17:04:12 +02:00
ζeh Matt
7c726e2a0c Fix includes 2021-11-24 16:48:33 +02:00
ζeh Matt
c6242fd310 More renaming 2021-11-24 15:50:18 +02:00
ζeh Matt
83b911b193 #15634: Refactor passing GameActions::Result by copy (#15951)
* Refactor to result GameActions::Result as copy instead of unique_ptr

* Remove alias GameActions::Result::Ptr

* Remove MakeResult wrapper

* Remove type forwarder in TileInspector
2021-11-24 07:35:08 +00: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
ζ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
Gymnasiast
228c1ac7f5 Fix formatting 2021-09-12 17:52:01 +02:00
IntelOrca
4f319d6ed4 Prepare footpath handling for surfaces and railings 2021-09-12 17:52:01 +02:00
Michael Steenbeek
624a32e93b Make Coords isNull/setNull functions TitleCase (#15382) 2021-09-08 20:48:53 -03:00
Michael Steenbeek
3988261e8f Set RailingsEntryIndex to null for good measure 2021-09-08 13:39:11 +02:00
ζeh Matt
07a7946caf Remove redundant conversions 2021-09-07 22:36:16 +03:00
Gymnasiast
a9e0eeccc4 Add support for surface and railings objects to PathElement
Co-authored-by: IntelOrca <ted@brambles.org>
2021-09-06 22:16:28 +02:00
Gymnasiast
4cc717ccdb Rework path surface and railings descriptor handling 2021-09-05 19:09:09 +02:00
Gymnasiast
2282f24404 Rename path surface and railings descriptors 2021-09-05 19:09:09 +02:00
frutiemax
450bf61ee4 Part of #13874: TrackSequenceProperties, Pricing and MirrorMap renamed 2021-08-29 10:45:17 -04:00
frutiemax
5f438535ad Part of #13874: Gymnasiast review 2021-08-27 17:57:10 -04:00
frutiemax
046c060e74 Part of #13874: Replace Track Sequence properties 2021-08-22 18:01:03 -04:00
Michael Steenbeek
8f5ec43486 Pass derived tile element classes to functions (#15206) 2021-08-11 23:26:46 +02:00
ζeh Matt
13aee659f0 Fix #15096: Crash placing entrance near corner in scenario editor 2021-07-27 12:02:34 +02:00
Duncan
6f81248084 Rework and refactor PathBitEntry (#14809) 2021-06-03 21:23:00 +01:00
Gymnasiast
5e28586a1c Create ProvisionalFootpath struct 2021-04-14 14:56:28 +02:00
Gymnasiast
85157d8604 Move some globals to Footpath window 2021-04-14 14:31:10 +02:00
Duncan
b65f12f1cf Use correct null value (#14421)
* Use correct null value

* Increment network version
2021-04-02 13:13:33 +01:00
Michael Steenbeek
7344b7fbfd Use 16-bit ride_id_t thoughout and raise RIDE_ID_NULL (#14411)
* Replace RIDE_ENTRY_INDEX_NULL with OBJECT_ENTRY_INDEX_NULL

Ride entries are objects like any other, so there is little point having separate constants.

* Use ride_id_t in many more places

* Change RIDE_ID_NULL to 0xFFFF

* Increment network version

* Update replays

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2021-04-01 16:02:57 +01:00
Michał Janiszewski
67b61478cf Reduce inclusion of EntityList.h 2021-02-25 10:56:27 +01:00
Matt
62baee3adb Allow passing of destination tolerance via SetDestination 2021-02-21 09:52:33 +02:00
Matt
965041b437 Remove direct access to DirectionX and DirectionY 2021-02-21 09:52:33 +02:00
Ted John
762b6ee816 Refactor viewport interaction flags and add plugin API 2021-02-18 18:10:29 +00:00
Gymnasiast
1b964c0f2e Refactor flat ride track pieces 2021-02-18 17:50:19 +01:00
Duncan
eb52391b9a Remove next_in_quadrant (#13754)
* Use std::vector of quadrants

* Prevent ptr invalidation issues

* Remove next_in_quadrant

* Make review changes

* Rebuild next_in_quadrant for S6Export

* Fix formatting

* Constexpr where possible

* Increment network version and update replays
2021-01-23 07:36:46 +00:00
Mathias Gibbens
b1e5a11bf3 Several more spelling fixes (#13752)
Signed-off-by: Mathias Gibbens <mathias@calenhad.com>

Co-authored-by: Mathias Gibbens <mathias@calenhad.com>
2021-01-10 18:23:35 +00:00
Tulio Leao
a2de9cfc70 Merge pull request #12573 from NathanIkola/Fix12334
Refactor footpath_is_connected_to_map_edge
2021-01-10 09:22:08 -03:00
ζeh Matt
acf71315b5 Cleanup variables usage and initialize them 2021-01-06 22:29:40 +01:00
Matt
efa1db826e Refactor invalidation logic to be generic to the callee 2021-01-02 16:22:28 +02:00
Dennis Devriendt
3073cca6aa Close #13624: Refactor ViewportInteractionItem to use strong enum (#13657)
* Closes #13624: Refactor ViewportInteractionItem to use strong enum
2020-12-29 15:09:15 -03:00
Michael Steenbeek
abd7babc86 Get RTD from ride via a struct method, part 1 2020-12-12 22:53:50 +01:00
Adam
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
Łukasz Pękalski
6e5105ab3b refactor: ObjectType to use strong enum
enum renaming complete
2020-11-11 16:07:01 +01:00
Manuel Vögele
69b07904c1 Make TileElement conversion preserve the const qualifier
Additionally this commit fixes some constness issues revealed by this change
2020-11-04 19:15:44 +01:00
ζeh Matt
645289f4ec Rename GameActionResult and use GameActions namespace instead (#13184) 2020-10-14 22:04:39 -03:00