Commit Graph

830 Commits

Author SHA1 Message Date
Gymnasiast c158854a7f
Move Park into namespace, add other park-related things to struct 2024-04-04 18:14:27 +02:00
Michał Janiszewski 06081eb23d
Fix #21691: Use correct iterator in RideCheckTrackContainsBanked (#21701) 2024-04-01 00:23:37 +02:00
ζeh Matt e3343f263f
Default initialize newly created Rides 2024-03-30 23:18:08 +01:00
Claudio Tiecher 24688ad5a3 Part of #21421: Refactor TILE_ELEMENT_DIRECTION_MASK 2024-03-25 16:17:32 +01:00
Claudio Tiecher 13e9ff84c2
Part of #21421: Replace define with constexpr (#21626)
* Part of #21421: Refactor RIDE_INITIAL_RELIABILITY in Ride.h

* Part of #21421: Refactor STATION_DEPART_FLAG and STATION_DEPART_MASK

* Part of #21421: Refactor MAX_STATION_PLATFORM_LENGTH

* Part of #21421: Refactor RIDE_RATING_UNDEFINED

* Part of #21421: Refactor TRACK_BLOCK_END

* Part of #21421: Refactor TRACK_PREVIEW_IMAGE_SIZE

* Part of #21421: Refactor based on feedback

* Part of #21421: Fix signed/unsigned mismatch on Win

* Improved consistency kTrackPreviewImageSize

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>

* Part of #21421: kMaxStationPlatformLength to int8

---------

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2024-03-24 21:49:50 +00:00
Claudio Tiecher 59958a6b8f
Part of #21421: replace define with constexpr in Ride.h (#21602) 2024-03-16 06:34:01 -03:00
Duncan 1d3bd31ab8
Deduplicate FormatStringID symbols 2024-03-10 18:15:49 +00:00
Harry-Hopkinson 56df39dcb4 Replace uint8's with EnumValue
Replace uint8's with EnumValue

Replace uint8's with EnumValue

Revertl arge change

Revert large change

Format
2024-03-04 19:04:18 +00:00
Duncan 4b6ba80a46
Move cheats to struct in GameState_t 2024-03-03 22:44:15 +01:00
mrmbernardi 4ccecd6e68
Remove forwarding functions in Window.cpp (#21516) 2024-03-03 18:04:09 +01:00
Harry Hopkinson 701bbda164
Move gEditorStep to GameState_t (#21492)
* Move gEditorStep to GameState_t

* Fix compilation on GCC

---------

Co-authored-by: Gymnasiast <m.o.steenbeek@gmail.com>
2024-03-01 20:26:20 +00:00
Gymnasiast 37a224e9b3
Move _rides to GameState_t 2024-02-27 16:34:25 +01:00
Harry Hopkinson 7797db10c8
Replace Macros and Notation in Cheats.h, common.h and Context.h. (#21437) 2024-02-23 19:30:35 -03:00
Matt 5ed5fece46
Merge pull request #21390 from Harry-Hopkinson/gMapSize-to-GameState_t
Move gMapSize to GameState_t
2024-02-13 14:14:57 +02:00
Michael Steenbeek c3380e29dd
Fix #21286: Cannot build unbanking turns with RCT1 vehicles 2024-02-12 23:23:05 +01:00
Harry-Hopkinson b755c873e5 Move gMapSize to GameState_t 2024-02-12 21:32:08 +00:00
Hielke Morsink 13351d996e #21193: Move gParkFlags to GameState_t, refactor uses
Also changed a few instances where GetGameState was called inside the same function.
The change in Peep.cpp is needed because of a function conflict. FormatStringID exists both in the global and in the OpenRCT2 namespace.
2024-01-22 16:31:35 +01:00
ζeh Matt a5dde0f8dc
Replace gCurrentTicks with the one in GameState_t 2024-01-19 16:32:19 +02:00
Michael Steenbeek adadaafdb0
Check station flags instead of hardcoded legacy IDs
PR #20483 introduced a check for covered stations, but incorrectly checked the RCT2 IDs.
This commit replaces this check with a proper flag check, which will work for any station style, including custom ones.
2024-01-06 14:46:17 +01:00
Gymnasiast cfff3c53f9
Do not use RCT1/2 limits in TrackDesign.h
Some unrelated files seemingly relied on TrackDesign.h to import RCT2.h for them.
2024-01-03 21:12:53 +01:00
James103 1d8dc111f1
Replace 2023 with 2024 in copyright headers (#21139)
Replace all instances of the year 2023 with 2024 in all copyright headers
2024-01-01 12:52:28 +01:00
mrmbernardi 98a52efb7e
Fix #5677: Balloons pass through the ground and objects (#20483) 2023-12-26 08:28:19 -03:00
Spacek531 b44e522262 rename SetBrakeClosed2 to SetBrakeClosedMultiTile 2023-10-01 18:58:06 -07:00
Spacek531 37c1b5dd7a make SetBrakesClosed2 a standalone function 2023-10-01 18:58:06 -07:00
Spacek531 44d0d1546c fix issue with tracks being treated like block brakes 2023-10-01 18:58:06 -07:00
X123M3-256 ee6b8e6605 Fix formatting 2023-10-01 18:58:04 -07:00
Spacek531 e65c42efae add to supported track pieces 2023-10-01 18:58:03 -07:00
spacek531 79730e50fd Diagonal Brakes and Block Brakes 2023-10-01 18:58:03 -07:00
Hielke Morsink 33fa50a330
Reduce duped code, fix #20693 wrong info for station shown 2023-08-07 03:16:14 +02:00
Hielke Morsink 77a263fa4e
Add braces to one-liners that don't control flow 2023-08-07 00:57:43 +02:00
Hielke Morsink 2c8ba76b49
Reduce nesting 2023-08-07 00:14:14 +02:00
Hielke Morsink 9cf01a2aca
Reduce repeated calls to tileElement.AsType 2023-08-07 00:11:23 +02:00
Aaron van Geffen d425e0a8bb Remove const qualifier from constexpr statements 2023-06-24 11:45:26 +02:00
Tiago A. Reul 93c1a9724e
Remove flag RIDE_TYPE_FLAG_HAS_NO_TRACK (#20239) (#20249)
* Remove flag RIDE_TYPE_FLAG_HAS_NO_TRACK (#20239)

* Fix a couple of logical conditions in entity/Staff.cpp

* Bump NETWORK_STREAM_VERSION and add myself to contributors.md
2023-05-26 14:08:28 +03:00
spacek531 61d820e614
Refactor special track elements list part 2 (#19951)
Part 2 of #19922
Fixes #19964

There are a lot of files changed, so this PR is structured to be easy to follow by looking at individual commits.

This PR refactors how the special track element list is created. The refactors include:

Divorces creating the list from RideConstructionWindow for modularity, including potential plugin API
Adds list of special track elements which can be re-ordered for more sensible organization
Same-named track elements will collapse into as few entries as possible
Separates up helixes from down helixes in track flags
Track flag separation was done to remove special code related to alpine coaster. Refactors to ride construction window were tested against and confirmed working with:

alpine coaster
suspended swinging coaster
hybrid coaster
inverted coaster
2023-05-07 09:13:22 +00:00
spacek531 1bbdba40b5
Implement paint code for spiral lifthill down (#19567)
* spiral lifthill down paintcode

* rename string anyway

* add some stuff I forgot and add documentation

* use static assert on SpriteGroupMultiplier

* add slope to list of opposite slopes

* bump scripting version

* update openrct2.d.ts

* improve documentation
2023-04-27 15:11:22 +01:00
kyphii 6dfc6225e2
"Reversed Trains" Option (#19305)
* Initial commit for backwards-facing trains

* Allow persistence for reversed cars across save/load

* Make log flume turntable compatible with new reversal implementation

* Style fixes + Better implementation of inverted bank angles

* Further Style Fixes

* Code cleanup from PR feedback

* Fix GetBankRotationForDrawing function declaration

* Use update flag for reversed state

* Replace modulo operation with bit mask

* Correct guest pathing destination when entering reversed cars

* More style fixes

* Add plugin support for reversed vehicles

* Fix formatting error

* Derive reversal from ride mode for car spawning

* Formatting

* Rename function to GetPaintBankRotation

* Add reversed trains modes to Multi Dimension Coaster

* Change name of isReversed plugin API parameter for consistency

* Replace reversal operating modes with separate ride setting

* Add ALLOW_REVERSED_TRAINS flag to more ride types

* Make clang-format happy

* More Formatting

* Fix ALLOW_REVERSED_TRAINS flag on a couple rides

* Exclude flat rides from Reverse Trains tickbox when cheats are enabled

* Formatting

* Use Disable Vehicle Limits cheat for checkbox appearance condition

* Use correct swinging sprites when cars are reversed

* Update changelog and Plugin/Network/Park version numbers

* Formatting

* Add separate error String ID for clarity

* Add name to contributors.md

* Fix ride vehicle preview window with reversed trains for RCT1 train types

* Bump version numbers again

---------

Co-authored-by: Trevor Finney <8711258+finneyt@users.noreply.github.com>
2023-04-21 19:22:33 +03:00
spacek531 319d759d71
fix TrackData.cpp (#19922) 2023-04-16 09:28:56 +01:00
Spacek531 6488f0397e link brake open to block brake open 2023-04-11 19:28:26 -07:00
ζeh Matt 8f82aa95b3
Move Direction out and rename it to Orientation to avoid name conflict 2023-04-07 22:46:25 +03:00
ζeh Matt 679f5aac2e
Rename members of EntitySpriteData 2023-04-07 19:47:26 +03:00
ζeh Matt dce21bc8ec
Split move sprite specific data into EntitySpriteData 2023-04-07 19:37:47 +03:00
Michael Steenbeek fd80b4c822
Refactor and clean up date handling (#19666)
* Refactor and clean up date handling

* Remove gDate, remove direct access to days_in_month

* Adjust the MultiLaunch test

* Bump network version

---------

Co-authored-by: ζeh Matt <5415177+ZehMatt@users.noreply.github.com>
2023-04-02 09:25:41 +01:00
Michael Steenbeek dd624f9bff
Replace remaining usages of money16, money32 (#19469)
* Use money64 for ride prices and shop items

* Use money64 for park entrance fee

* Use money64 for gGuestInitialCash

* Use money64 for upkeep costs

* Use money64 for ride value

* Use money64 for marketing campaign cost

* Use money64 for object prices

* Use money64 for land prices

* Use money64 for guest expenditure

* Replace remaining occurrences of money32 with money64

* Update replays

* Bump network version

---------

Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-03-02 21:55:42 +00:00
ζeh Matt d6be08a410
Apply review suggestions 2023-02-22 15:58:05 +02:00
ζeh Matt ef8d08c5e5
Add assert to test if the ride slot is actually free 2023-02-22 00:01:44 +02:00
ζeh Matt 6a5bfa5cad
Ensure all rides names are cleared on map load 2023-02-21 23:45:11 +02:00
ζeh Matt b1667d3423
Use a dedicated Ride instance for previews 2023-02-21 23:44:03 +02:00
ζeh Matt d60890f7e5
Use ride id to determine if the slot is unused 2023-02-21 23:29:59 +02:00
ζeh Matt 063d97f4f2
Use fixed size storage for Rides, cleanup interface a bit 2023-02-21 23:20:48 +02:00